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

Add --exclude to exclude the given packages from the publishing process #161

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

kit-ty-kate
Copy link
Contributor

Fixes #144

Copy link
Member

@dra27 dra27 left a comment

Choose a reason for hiding this comment

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

I would simplify the type for ~exclude to be just string list, but more importantly I think the code should check that the exclusions refer to packages found (that would mean, for example, that --exclude opam-admni will fail instead of continuing to publish opam-admin anyway.

src/publishMain.ml Outdated Show resolved Hide resolved
@kit-ty-kate
Copy link
Contributor Author

that would mean, for example, that --exclude opam-admni will fail instead of continuing to publish opam-admin anyway.

done

@kit-ty-kate kit-ty-kate requested a review from dra27 July 15, 2024 15:04
Comment on lines +294 to +296
OpamConsole.error_and_exit `Not_found
"Excluded package '%s' not found"
(OpamPackage.Name.to_string name)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why errorring instead of a warning and continue ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was a request from David (see above). I think it's fair to error on this since it avoid issues for users later down the line if they do not see the warning or if the opam-publish is used as part of an automated system

Copy link
Contributor

Choose a reason for hiding this comment

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

lgtm! Indeed, i looked at the code, didn't see David comment.

Copy link
Member

@dra27 dra27 left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@dra27 dra27 merged commit 9f66832 into ocaml-opam:master Jul 29, 2024
1 check passed
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.

[Feature request] Add --exclude to exclude some packages from an "opam-publish URL"
3 participants