You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The source code of the ./tools command that runs build steps is found in "build-tools/src/main.rs". There are two variables, release and force_color, which are set at the beginning of the script. They are used to set the color output and release mode flags for all invocations to cargo that the build script performs. But repeating each of these arguments each time cargo is called is verbose and error-prone.
There's already a function that is called to generate arguments to be passed on to cargo, cargo_args_for_crate, which is used right now to load features options from the Configuration.toml file. If the logic for adding the "--release" flag and the "--color=always" flag were added to the vector of arguments cargo_args_for_crate returns, then there can be just one set of arguments injected into each cargo call in the script, and the variables release and force_color (and all the places where they are used) can be deleted.
The source code of the
./tools
command that runs build steps is found in "build-tools/src/main.rs". There are two variables,release
andforce_color
, which are set at the beginning of the script. They are used to set the color output and release mode flags for all invocations tocargo
that the build script performs. But repeating each of these arguments each time cargo is called is verbose and error-prone.There's already a function that is called to generate arguments to be passed on to cargo,
cargo_args_for_crate
, which is used right now to load features options from the Configuration.toml file. If the logic for adding the "--release" flag and the "--color=always" flag were added to the vector of argumentscargo_args_for_crate
returns, then there can be just one set of arguments injected into each cargo call in the script, and the variablesrelease
andforce_color
(and all the places where they are used) can be deleted.edit-text/build-tools/src/main.rs
Lines 321 to 336 in 4156a85
The text was updated successfully, but these errors were encountered: