-
Notifications
You must be signed in to change notification settings - Fork 415
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
Add a diff command asking for files whitout rule for their generation #2396
Comments
Maybe the documentation could be improved though. A PR clarifying all this would definitely be welcome. |
I see, thanks for the answer, I'll continue with forcing the generation |
Alright, I'm closing this PR then. Feel free to re-open it if you find another issue with this method. |
@diml maybe something simpler would be to change the semantics of |
That would work yes. However, it should be the second argument that is optional given that the corrected file comes second. We can enable that new behaviour when using the dune 2.x language |
sounds good! |
Hello, I'm currently working on mdx, one of the part of the project generates
.corrected
files for further promotion.However, I have encountered a problem in the tests:
When mdx does not generate any
.corrected
file in the case where the test would want it to do so,dune runtest
does not raise any errors, and the problem is just ignored:Considering a test running mdx which is supposed to generate a
.corrected
file:If ocaml-mdx doesnt generate the correction,
diff?
will ignore it, the problem will not be raised and I cant usediff
as I dont have any rules for the generation of the corrected file.I could solve it by creating a rule executing mdx and having the corrected file in it's targets and then use
diff
instead ofdiff?
, which is I suppose the current adviced approach.But as
diff?
was specifically done for this kind of tests, it feels kinda weird not to use it, also, my problem can lead to bugs, as other people on other project could not be aware of this dilemma and usediff?
anyway.This is why I was thinking that adding a third diff command could be a nice addition: An hybrid diff which does not ask the rules for the generation of the files (like
diff?
) but which throws if the files does not exist (likediff
).What do you think about it ? (I might have been a bit unclear, but I would be glad to discuss about it)
The text was updated successfully, but these errors were encountered: