Skip to content
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

Fixing order of --warn_error #2952

Merged
merged 3 commits into from
Jun 6, 2023
Merged

Fixing order of --warn_error #2952

merged 3 commits into from
Jun 6, 2023

Conversation

mtzguido
Copy link
Member

The --warn_error option is accumulated by successive uses, with latter uses overriding the former, hence --warn_error @1..100 --warn_error -50 will ignore error 50, but make 1..49 and 51..100 fatal.

However, combinations within a single --warn_error option use have the order reversed, the equivalent to the above is --warn_error [email protected].

This PR changes that, so the order within a single invocation is left-to-right as for separate invocations, and hence --warn_error A --warn_error B is the same as --warn_error AB. Earlier settings are overridden by latter ones (i.e. to the right, or more deeply nested within #push-options).

Motivated by #2950

@mtzguido
Copy link
Member Author

None of our projects seem to rely on the current behavior (I got an everest green). Pinging @tahina-pro and @msprotz just in case they have any thoughts. (FWIW this is also what OCaml does).

@mtzguido mtzguido merged commit 211b0cc into master Jun 6, 2023
@mtzguido mtzguido deleted the guido_warn_error branch June 6, 2023 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant