-
Notifications
You must be signed in to change notification settings - Fork 33
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
Proposal for automated generation of dune diff rules in examples/ #231
Conversation
- Generating the diff rules using a helper program should make it easier to add new examples.
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 like this but I don't think we need to check in dune.inc
, do we?
From my understanding, the This forces to check in the file This process can be likened to a fixpoint operation. If a new rule is added to While I acknowledge my familiarity with this pattern might influence my |
Just one more thing to mention:
I put this to good use while I was developing the code that generates the rule. I could visualize the incremental changes to the dune file until I was satisfied with the result (dune promote). A word of caution though: once you experience the efficiency of the expect-test workflow, it's hard to go back. Consider yourself warned! 😃 |
Oh that's great, thank you for the explanation. Then it's perfect, I'm merging this. That makes me think that maybe
What do you think? I like expect tests, I just don't use them enough :-). |
Hello team,
I'd like to propose a change related to the diff rules used under the examples/ directory, which were recently added in #230.
The idea is to automate the generation of these diff rules using a helper program. The generated rules would be written to the
dune.inc
file, which is then included in the main dune file. If there are any changes, runningdune promote
would update thedune.inc
file accordingly.I understand that this introduces a bit more complexity into the dune files, and it might be a matter of personal preference. Therefore, I thought it would be best to propose this change as a separate PR, so you can decide whether the benefits outweigh the added complexity.
In the future, this setup could potentially be replaced by generic dune rules, once they are supported. Until then, using gen-dune type helper programs is not an uncommon workaround that I've found to be quite effective.
I look forward to hearing your thoughts on this proposal.