-
Notifications
You must be signed in to change notification settings - Fork 28
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
Validation mode #99
Comments
(I wrote a much longer post with some thoughts about -Werror here https://neugierig.org/software/blog/2022/01/rethinking-errors.html ) |
I think it would be good if n2 had a kind of "capabilities" config file, where each little thing that could be stricter was a separate flag. "ninja compat" mode would be one built-in configuration, and "strict" mode would be another. But projects could start out in ninja compat mode and turn on flags one by one until they eventually reach strict mode. I think there would probably multiple "editions" (like rust's editions) of strict mode as well, where we have a certain strict mode edition to start, but then when we add more checks we don't want to add them to that strict mode because it will break existing users, but instead we add a new edition of strict mode that has the checks enabled. |
It just occurred to me that a reasonable place to put configuration like this is in the ninja file itself, given that the generator is the tool where you know what settings you care about. You could imagine some sort of like
kind of block, though it would mean breaking syntax compatibility with Ninja. (Ninja already has some configurationy stuff in magic globals that ought to have been done this way) |
In various places like #80 we relax the rules to accommodate some questionable Ninja behaviors.
We currently key some of these off a "ninja compat" flag, but I wonder if it would be better to make some sort of explicit mode flag that is extra strict.
I think there are basically two categories of users of n2:
This is very similar to the question of whether you want to enable
-Werror
on a project, where you have the same two categories of people.The text was updated successfully, but these errors were encountered: