-
Notifications
You must be signed in to change notification settings - Fork 205
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 --help ux for Canton sandbox #12990
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
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
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.
Should we rather consider going the
git
way and doing anhelp
subcommand? I.e.daml help sandbox
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 don’t see how that helps. You still have help for the sandbox wrapper and for the underlying canton JAR. Git doesn’t have that issue
git status --help
andgit help status
are the same help text.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, but it doesn't have
git status --status-help
. I would agree with you if you could havedaml sandbox --help
. Right now as a user I would prefer to see the help text for Canton by typing that. I expect some confusion from users over usingdaml sandbox --help
vs.daml sandbox --canton-help
.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.
A few comments to explain why we’re in this situation: Canton itself does not have any special sandbox mode or even a separate JAR. So we need some wrapper that turns Canton into a somewhat usable sandbox by specifying certain options and config files. This wrapper has to make some choices like ports. It also provides some UX niceties that people expect in sandbox and make it easier to migrate like options to turn on static time. The idea here is that in 95% of cases, you only ever need to interact with the wrapper directly and you don’t have to care that there is an underlying Canton JAR.
However, Canton has thousands of options and we clearly don’t want to replicate all of them in the wrapper. So for advanced usages you might need to look at the Canton help.
I fully agree that the UX isn’t great and somewhat leaks how things are implemented internally. I don’t really have a better suggestion though. We can try to parse Canton’s --help output and integrate it but that seems super hacky and is bound to fail in the future. We could make
daml sandbox -- --help
work but I’m not sure that’s really better (it still leaks implementation details of there being an underlying wrapper) and it’s not discoverable. --canton-help has the advantage that it shows up if you just type --help.