-
Notifications
You must be signed in to change notification settings - Fork 410
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
Expose the promote mode #437
Conversation
CHANGES.md
Outdated
+ `(mode fallback)` replaces `(fallback)` | ||
+ `(mode promote)` means that targets are copied to the source tree | ||
after the rule has completed | ||
+ `(mode promote-until-clea)` is the same as `(mode promote)` except |
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.
clea
-> clean
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.
indeed, thanks
| true, Some _ -> | ||
Error "Cannot use both (fallback) and (mode ...) at the same time.\n\ | ||
(fallback) is the same as (mode fallback), \ | ||
please use the latter in new code." |
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.
Will (fallback)
be removed in 1.0?
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.
yes, we'll get the upgrade tool to translate it to (mode fallback)
This PR exposes the promote mode that was internally implemented in #370.
(mode ...)
fieldThis PR adds a
(mode <mode>)
field torule
andmenhir
stanzas. The following modes are allowed:standard
, the defaultfallback
, replaces(fallback)
promote
, after the rule has been executed copy the targets to the source treepromote-until-clean
, same aspromote
except thatjbuilder clean
delete the files copied to the source treeocamlyacc
andocamllex
extensionsTo allow using a different mode with
ocamlyacc
andocamllex
stanzas, an alternative syntax is added:--ignore-promoted-rules
argumentThe
--ignore-promoted-rules
argument is added to make jbuilder filter out rules with(mode promote)
. It is automatically set by-p/--for-release-of-packages
, to cut down dependencies during releases.