-
Notifications
You must be signed in to change notification settings - Fork 392
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: keep menhir .conflicts files (#6865) #9025
Conversation
This comment was marked as off-topic.
This comment was marked as off-topic.
I don't understand. I added a test demonstrating that it does work in Note at this moment I can only test with Or else I don't understand what not working means (which may very well be the case). |
@Tchou I apologise, I read a little fast earlier. Let me take a closer look. You can disregard my comment from earlier. |
$ dune build a/test.exe --debug-dependency-path | ||
Warning: one state has shift/reduce conflicts. | ||
Warning: one shift/reduce conflict was arbitrarily resolved. | ||
$ ls _build/default/a/parser.conflicts | ||
_build/default/a/parser.conflicts |
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.
Could you do dune build _build/default/a/parser.conflicts
directly so that we can see Dune recognizes it as a target and isn't producing it by accident. You can also do 2> /dev/null
to remove the output and remove --debug-dependency-path
so that the test is a little easier to read.
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 reason I ask is that if Dune isn't actually aware of the .conflicts file in this situation then it cannot be depended on, or expected to persist between builds.
Add the .conflicts file to targets of menhir stanzas when the --explain flag is present and menhir is not called with --only-tokens. It also fixes a similar bug where .cmly files where also not kept with sandboxing enabled. Both types of files are also now correctly recognized as targets. Signed-off-by: Kim Nguyễn <kim@nguyen.vg>
New attempt (the diff with main is small so I squashed and force pushed since the solution I ended up with handle both cases). I think this works well but the intricacies and differences of
|
@Tchou What's left to undraft this? |
Hi,
I have gone through dune sources and I cannot understand how to do get the expanded include file, from within the menhir plugin. Ideally it should go like this:
I couldn't understand dune's architecture well enough to know whether this is possible. |
Hello Kim! @rgrinberg or @snowleopard will correct me, but I understand that at the moment targets must be statically known by Dune, so it is not possible to have the set of targets depend on things like |
Replaced by #9512 |
Add the .conflicts file to targets of menhir stanzas when the --explain flag is present and menhir is not called with --only-tokens.