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

opam admin check: Set with-test and with-doc to false by default #6335

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kit-ty-kate
Copy link
Member

Queued on top of #6331

Currently opam admin check sets with-test and with-doc to true by default, which in my opinion makes little sense, especially in light of #4541 as it does not take into account user behaviour at all but some hypothetical "what if someone had OPAMWITHTEST=1 and OPAMWITHDOC=1 always set in their environment".

This draft PR flips the default for those two variables to use what the actual default everywhere else is (with-test=false and with-doc=false). It also gets rid of -i which has no purpose anymore.

Instead this PR introduces three more arguments: --with-test, --with-doc and --with-dev-setup. However in light of #4541 i'm not sure this is a good idea and i don't this anyone uses opam admin check without -i currently, which makes the introduction of those replacements seem useless. What do you think?

Related to #5805

@kit-ty-kate kit-ty-kate added the PR: QUEUED Pending pull request, waiting for other work to be merged or closed label Dec 10, 2024
@kit-ty-kate kit-ty-kate added this to the 2.4.0~alpha1 milestone Dec 10, 2024
@hannesm
Copy link
Member

hannesm commented Dec 12, 2024

I like this.

src/client/opamAdminCommand.ml Outdated Show resolved Hide resolved
src/client/opamAdminCommand.ml Outdated Show resolved Hide resolved
src/client/opamAdminCommand.ml Outdated Show resolved Hide resolved
@kit-ty-kate kit-ty-kate force-pushed the admin-check-test-doc-dev-setup branch from 281ec79 to df17b06 Compare December 16, 2024 14:40
@kit-ty-kate kit-ty-kate removed the PR: QUEUED Pending pull request, waiting for other work to be merged or closed label Dec 16, 2024
@kit-ty-kate kit-ty-kate force-pushed the admin-check-test-doc-dev-setup branch from df17b06 to 82450a7 Compare December 16, 2024 14:47
@kit-ty-kate kit-ty-kate marked this pull request as ready for review December 16, 2024 14:47
@kit-ty-kate
Copy link
Member Author

After reflection i chose to not add new arguments --with-test, --with-doc and --with-dev-setup as they would be highly misleading as they would set the variable globally instead of the intended per package, the former does not make sense and is not possible to have elsewhere in opam anyway.

The PR is now ready to review

@kit-ty-kate kit-ty-kate requested a review from rjbou December 17, 2024 18:51
@@ -114,6 +114,8 @@ users)
## Admin
* ◈ Add `opam admin compare-versions` to compare package versions for sanity checks [#6197 @mbarbin]
* [BUG] Fix `opam admin check` in the presence of the `with-dev-setup` variable [#6331 @kit-ty-kate - fix #6329]
* ✘ The `-i`/`--ignore-test-doc` argument has been removed from `opam admin check` [#6335 @kit-ty-kate]
* ✘ `opam admin check` now sets `with-test` and `with-doc` to `false` instead of `true` [#6335 @kit-ty-kate]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
*`opam admin check` now sets `with-test` and `with-doc` to `false` instead of `true` [#6335 @kit-ty-kate]
*`opam admin check` now sets `with-test`, `with-doc`, and `with-dev-setup` to `false` instead of `true` [#6335 @kit-ty-kate]

@rjbou
Copy link
Collaborator

rjbou commented Jan 15, 2025

After reflection i chose to not add new arguments --with-test, --with-doc and --with-dev-setup as they would be highly misleading as they would set the variable globally instead of the intended per package, the former does not make sense and is not possible to have elsewhere in opam anyway.

Agree. Plus, as there is no way to request check for a single package there is nothing else to add.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants