Skip to content
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

Merged
merged 2 commits into from
Sep 5, 2024

Conversation

maiste
Copy link
Collaborator

@maiste maiste commented Aug 29, 2024

From the interviews conducted by @leostera it appears that, intuitively, people tend to write package instead of pkg. To respond to this, I have added a dune package command, with the same sub commands as dune 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.

Copy link
Collaborator

@christinerose christinerose left a 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.

@maiste maiste force-pushed the feat/change-naming branch 4 times, most recently from 5ff3419 to eabd5d9 Compare September 5, 2024 09:08
@@ -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.
Copy link
Member

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.

Copy link
Collaborator Author

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 👍

Copy link
Member

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.

Copy link
Collaborator Author

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.

@maiste maiste force-pushed the feat/change-naming branch 2 times, most recently from d763801 to 1c3f230 Compare September 5, 2024 12:01
bin/main.ml Show resolved Hide resolved
bin/pkg/pkg.ml Outdated
Cmd.info "pkg" ~doc ~man
let man =
[ `S "DESCRIPTION"
; `P {|Commands for doing package management with dune|}
Copy link
Collaborator

@Leonidas-from-XIV Leonidas-from-XIV Sep 5, 2024

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"

Copy link
Collaborator Author

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 😉

@maiste maiste force-pushed the feat/change-naming branch from 1c3f230 to 9d9eaba Compare September 5, 2024 16:00
@rgrinberg rgrinberg merged commit 77592f5 into ocaml:main Sep 5, 2024
25 checks passed
@maiste maiste deleted the feat/change-naming branch September 6, 2024 07:38
anmonteiro pushed a commit to anmonteiro/dune that referenced this pull request Nov 17, 2024
* feat: create an alias from pkg to package

Signed-off-by: Etienne Marais <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants