-
Notifications
You must be signed in to change notification settings - Fork 413
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
Improve validation of arguments to dune init (#3046, #3088) #3103
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
72b7dbc
Correct doc comment on atom converter
shonfeder b0ff6f2
Add Dune_lang.Atom.of_valid_string
shonfeder 9cd77d9
[#3046] Fix dune init validation and error handling
shonfeder e9b8e5b
[#3046] Add test cases against reported bug
shonfeder 7dbac0d
[#3046] Update tests
shonfeder e122185
[#3046] Cleanup formatting
shonfeder a538d71
[#3046] Rename of_valid_string to parse
shonfeder 880c90b
Merge remote-tracking branch 'upstream/master' into init-command-bug-…
shonfeder 94c0b3d
[#3046] Update testing recipe
shonfeder bda820c
[#3046] Add TODO for separating out public_name types
shonfeder ae463a1
[#3046] Update CHANGES.md
shonfeder 8b0bfab
Merge branch 'master' into init-command-bug-3046
shonfeder File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Perhaps this should be separate for libraries and binaries. Public libraries already have their own type:
Lib_name.t
.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 idea in principle, but after playing around with this a bit it looks like it will require a fair bit of converting back and forth from
string
s toLib_name.t
s (just validated strings, afaict) toDune_lang.Atom.t
s, without any evident benefit in safety or clarity.In order to achieve the end goal of enabling granular updates to existing dune configs, I think we'll want read the CLI params into proper
Lib.t
s instead of having to muck about with theDune_lang
asts. At that point, I think this approach will make more sense. So, assuming you don't object, I'm leaving this as a TODO for now.Thanks for the good suggestion.