-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support setting verbosity through the environment #1370
Comments
I think in cases like this you can make a shell script to obey your environment variables. Otherwise I can think of equivalent environments where someone wants VERBOSE=1 to control the verbosity of a program other than Ninja. |
These environment variables are for ninja, so how would they be obeyed if ninja doesn't recognise them? Additionally it's not always feasable, or reasonable, to modify the command-line of tools in scripts as there may be far too numerous. What you're suggesting is each script adopt a unique way of adjusting flags passed to the command, which is also unreasonable. I've read the other PRs and issues associated with this situation and find none of the replies to be very well thought through. In each case it is simply assumed that the user has direct control over where and how |
The script would recognise them and pass e.g. |
So as I predicted, you expect every script, or even script-like thing to encode its own set of logic to pass options to ninja. That's not reasonable at all. |
No, you only need one script to do that, which you name |
I thought this was covered in the other numerous issue reports already? That's also not reasonable as it now starts to effect reproducibility build pipelines where environments are feasible to track. It also assumes people have the ability to do what you're suggesting (think secure |
You would have your script always there, then you can track
What do you mean by that? |
I'm not interested in Again, this is an unreasonable request when you manage hundreds of packages, some of which use cmake to generate ninja build scripts. Creating an unncessary wrapper to act as dependency is overly involved when traditional systems such as This again comes to notion of a secure path; systems like sudo and build/CI scripts will set |
I don't see how this changes anything?
In that case you can avoid the modification of |
And around we go |
This comment was marked as abuse.
This comment was marked as abuse.
No, when deploying to Linux my suggesting would be to put the script into |
This comment was marked as abuse.
This comment was marked as abuse.
The independent Ninja build language reimplementation https://github.com/michaelforney/samurai supports this via the environment variable SAMUFLAGS. Simply use samu anywhere you'd otherwise use ninja, or install samu as your system /usr/bin/ninja (some linux distros have options to install this competing implementation as the default, or only, ninja). |
It seems so bizarre to me that this feature was seemingly rejected for... no reason. |
Sometimes, regrettably, using the environment is the cleanest way to configure applications.
e.g. MAKEFLAGS, DISTCC_HOSTS, etc.
It would be useful if one could control ninja's verbosity through the environment.
e.g. have
VERBOSE=1 ninja
be (nearly) equivalent to
ninja -v
A nice use-case that this enables is having a single UI nob to turn on verbosity for both Ninja,
and any ninja-invoked scripts.
The text was updated successfully, but these errors were encountered: