Skip to content

Conversation

@benodiwal
Copy link
Contributor

Closes #2678

@benodiwal benodiwal force-pushed the fix/duplicate-dependencies-warning branch 2 times, most recently from 29f875e to b11d34d Compare December 5, 2025 08:07
@Alizter Alizter self-requested a review December 5, 2025 08:51
> (package
> (name test-pkg)
> (allow_empty)
> (depends (ocaml (>= 4.08)) (ocaml (< 5.0))))
Copy link
Member

Choose a reason for hiding this comment

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

The test says that this syntax is valid, but duplicating constraints is also perfectly valid as far as opam is concerned. So I think we should have a better criteria for things to reject rather than just them being accepted by opam.

Personally, I'd reject this form as well because any separate constrains like this can be combined into a single constraint.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it. I have added the logic to reject these as well.

@benodiwal benodiwal force-pushed the fix/duplicate-dependencies-warning branch 3 times, most recently from 6fd7018 to 4e5af9a Compare December 7, 2025 21:10
@Alizter Alizter requested review from Alizter and removed request for Alizter December 8, 2025 07:46
@benodiwal benodiwal force-pushed the fix/duplicate-dependencies-warning branch from 4e5af9a to e8a762a Compare December 10, 2025 23:44
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.

Warn about duplicate dependencies in package definitions

2 participants