-
Notifications
You must be signed in to change notification settings - Fork 412
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
feat: create an alias from pkg to package #10858
Conversation
7b94d4a
to
5986294
Compare
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.
Just added monospace around pkg
command in last file, although since it's a .t
file, I'm not sure I did it correctly.
5ff3419
to
eabd5d9
Compare
@@ -0,0 +1,4 @@ | |||
The package command is an alias for the pkg command. The test ensures it breaks if | |||
the package command is not available. |
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.
Is there really a point to this? If you remove the command, doc/dune.inc
will already get updated.
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 didn't know if it would be enough to detect a regression. If you think this is enough, I can definitely remove this test 👍
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.
It should be enough. If you remove any command, the doc file gets updated. So yeah, I think you can safely drop this test.
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 have reverted the change.
d763801
to
1c3f230
Compare
bin/pkg/pkg.ml
Outdated
Cmd.info "pkg" ~doc ~man | ||
let man = | ||
[ `S "DESCRIPTION" | ||
; `P {|Commands for doing package management with dune|} |
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.
Maybe "Commands for OCaml package management"
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 just extract the code, but I can modify that 😉
Signed-off-by: Etienne Marais <[email protected]>
Signed-off-by: Etienne Marais <[email protected]>
1c3f230
to
9d9eaba
Compare
* feat: create an alias from pkg to package Signed-off-by: Etienne Marais <[email protected]>
From the interviews conducted by @leostera it appears that, intuitively, people tend to write
package
instead ofpkg
. To respond to this, I have added adune package
command, with the same sub commands asdune pkg
and a test to make sure we keep track of both.It doesn't seem that Cmdliner provides a way to do aliases, so I had to introduce a new command.