-
Notifications
You must be signed in to change notification settings - Fork 409
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
fix: --ignore-promoted-rules should work on internal rules #8518
fix: --ignore-promoted-rules should work on internal rules #8518
Conversation
9c2705c
to
248bc99
Compare
a7280fc
to
f9709ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix is fairly straightforward and the code is actually sort of simpler than before which is nice but I would like to understand the until_clean
setting. Or making the API a bit more self-descriptive.
f9709ed
to
b6ba92a
Compare
Added a description. Let me know what you think of it. |
src/dune_rules/rule_mode_decoder.mli
Outdated
|
||
(** [is_ignored mode ~until_clean] will return if rule with [mode] should be | ||
ignored. [until_clean] is used to set if [(promote (until-clean))] is | ||
ignored as considerd by this function. Old versions of dune would |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a typo here, but asides from this this makes it much easier to understand how this parameter should be used. Thanks.
(This might possibly be a case where a default argument could make sense, since in new code we don't want to use `Ignore
I assume?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually think we should consider just removing the old behavior and making the breaking change. The reason is that preserving the old behavior makes it impossible to build old projects without modifying the source directory. This is quite a pain for those packaging software that uses dune.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I vaguely remember a plan to deprecate the other promote modes, would it be possible to interpret them as (mode promote)
from now on? (With a warning)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only one that is deprecated is patch_back_source_tree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rgrinberg You mean, without patching the dune-lang version to whatever will include this change? Maybe worth asking @glondu if this would be helpful enough to break compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean, without patching the dune-lang version to whatever will include this change?
Yes. Especially given that updating the dune version in the project file might run into other errors, patching isn't a reasonable workaround.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might be right, as probably nobody depends on the existing incorrect behaviour.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, they do 😂
In any case, we can just have them release a new version and then do this change.
Internal promotion rules such as generating opam files weren't being ignored under --ignored-promoted-rules. Signed-off-by: Rudi Grinberg <[email protected]> <!-- ps-id: af82808a-164d-4f37-aefc-155d2b6b4eca -->
b6ba92a
to
7f6e38b
Compare
CHANGES: - Modules that were declared in `(modules_without_implementation)`, `(private_modules)` or `(virtual_modules)` but not declared in `(modules)` will raise an error. (ocaml/dune#7674, @Alizter) - `enabled_if` now supports `arch_sixtyfour` variable (ocaml/dune#8023, fixes ocaml/dune#7997, @Alizter)- Use `posix_spawn` instead of `fork` on MacOS. This gives us a performance boost and allows us to re-enable thread. (ocaml/dune#8090, @rgrinberg) - Experimental: Added a `$ dune monitor` command that can connect to a running `dune build` in watch mode and display the errors and progress. (ocaml/dune#8152, @Alizter) - No longer emit linkopts(javascript) in META files (ocaml/dune#8168, @hhugo) - The `progress` RPC procedure now has an extra field for the `In_progress` constructor for the number of failed jobs. (ocaml/dune#8212, @Alizter) - Add a `--preview` flag to `dune fmt` which causes it to print out the changes it would make without applying them (ocaml/dune#8289, @gridbugs) - Introduce `(source_trees ..)` to the install stanza to allow installing entire source trees. (ocaml/dune#8349, @rgrinberg) - Deprecate install destination paths beginning with ".." to prevent packages escaping their designated installation directories. (ocaml/dune#8350, @gridbugs) - Stop signing source files with substitutions. Sign only binaries instead (ocaml/dune#8361, fixes ocaml/dune#8360, @anmonteiro) - Add `--stop-on-first-error` option to `dune build` which will terminate the build when the first error is encountered. (ocaml/dune#8400, @pmwhite and @Alizter)- Dune now displays the number of errors when waiting for changes in watch mode. (ocaml/dune#8408, fixes ocaml/dune#6889, @Alizter) - Add `with_prefix` keyword for changing the prefix of the destination of installed files matched by globs. (ocaml/dune#8416, @gridbugs) - Added experimental `--display tui` option for Dune that opens an interactive Terminal User Interface (TUI) when Dune is running. Press '?' to open up a help screen when running for more information. (ocaml/dune#8429, @Alizter and @rgrinberg) - Add a `warnings` field to `dune-project` files as a unified mechanism to enable or disable dune warnings (@rgrinberg, 8448) - `dune exec`: support syntax like `%{bin:program}`. This can appear anywhere in the command line, so things like `dune exec time %{bin:program}` now work. (ocaml/dune#6035, ocaml/dune#8474, fixes ocaml/dune#2691, @emillon, @Leonidas-from-XIV) - RPC message styles are now serialised meaning that RPC diagnostics keep their Ansi styling. (ocaml/dune#8516, fixes ocaml/dune#6921, @Alizter)- Ignore internal promote rules when `--ignore-promoted-rules` is set (ocaml/dune#8518, fix ocaml/dune#8417, @rgrinberg) - Truncate output from actions that produce too much output (@tov, ocaml/dune#8351) - Allow libraries to shadow OCaml builtin libraries. Previously, builtin libraries would always take precedence. (@rgrinberg, ocaml/dune#8558) - Remove warning against `.dune` files generated by pre dune 2.0 (ocaml/dune#8611, @rgrinberg) - `dune utop` no longer links `utop` in "custom" mode, which should make this command considerably faster. (ocaml/dune#8631, fixes ocaml/dune#6894, @nojb) - Ensure that package names in `dune-project` are valid opam package names. (ocaml/dune#8331, @emillon) - dune init: parse `--public` as a public name (ocaml/dune#8603, fixes ocaml/dune#7108, @emillon) - Remove versions 0.1 and 0.2 of the experimental ctypes extension. (ocaml/dune#8293, @emillon)
Fixes ocaml#8703 This is a lighter change than the original in ocaml#8518. Signed-off-by: Etienne Millon <[email protected]>
Fixes ocaml#8703 This is a lighter change than the original in ocaml#8518. Signed-off-by: Etienne Millon <[email protected]>
Fixes #8703 This is a lighter change than the original in #8518. Signed-off-by: Etienne Millon <[email protected]>
CHANGES: - Turn internal promote rules into fallback rules when `--ignore-promoted-rules` is set (ocaml/dune#8518, ocaml/dune#8706, fix ocaml/dune#8417, fix ocaml/dune#8703, @rgrinberg, @emillon) - Make copy sandbox support directory targets. (ocaml/dune#8705, fixes ocaml/dune#7724, @emillon)
…caml#8518)" This reverts commit 853490b.
…caml#8518)" This reverts commit 853490b. Signed-off-by: Rudi Grinberg <[email protected]>
…caml#8518)" This reverts commit 853490b. Signed-off-by: Rudi Grinberg <[email protected]>
* refactor: simplify left over type signature Signed-off-by: Rudi Grinberg <[email protected]> * Revert "refactor: simplify left over type signature" This reverts commit ec929ce. Signed-off-by: Rudi Grinberg <[email protected]> * Revert "fix: make ignored rules fallback (#8706)" This reverts commit b326c30. Signed-off-by: Rudi Grinberg <[email protected]> * Revert "fix: --ignore-promoted-rules should work on internal rules (#8518)" This reverts commit 853490b. Signed-off-by: Rudi Grinberg <[email protected]> * test: promote Signed-off-by: Rudi Grinberg <[email protected]> --------- Signed-off-by: Rudi Grinberg <[email protected]>
Internal promotion rules such as generating opam files weren't being
ignored under --ignored-promoted-rules.
Signed-off-by: Rudi Grinberg [email protected]