Skip to content

fix: use warning mechanism for duplicate deps warning#12986

Merged
rgrinberg merged 2 commits intoocaml:mainfrom
benodiwal:fix/duplicate-dependencies-warning
Dec 17, 2025
Merged

fix: use warning mechanism for duplicate deps warning#12986
rgrinberg merged 2 commits intoocaml:mainfrom
benodiwal:fix/duplicate-dependencies-warning

Conversation

@benodiwal
Copy link
Copy Markdown
Contributor

@benodiwal benodiwal commented Dec 16, 2025

This PR updates the duplicate dependencies warning to use Dune's warning mechanism allowing users to disable it via the (warnings ...) field in dune-project. @rgrinberg

NOTE: The previous custom hint about combining constraints with (and ...) has been moved to the main warning message body, since Warning_emit replaces hints with the standard "To disable this warning..." text. @Alizter

@benodiwal benodiwal marked this pull request as draft December 16, 2025 18:38
@benodiwal benodiwal force-pushed the fix/duplicate-dependencies-warning branch 2 times, most recently from 672e146 to 0aa747b Compare December 16, 2025 18:49
@benodiwal benodiwal marked this pull request as ready for review December 16, 2025 18:49
@benodiwal benodiwal force-pushed the fix/duplicate-dependencies-warning branch from 9bea345 to 48617ce Compare December 16, 2025 21:19
Signed-off-by: Sachin Beniwal <s474996633@gmail.com>
Signed-off-by: Sachin Beniwal <s474996633@gmail.com>
@benodiwal benodiwal force-pushed the fix/duplicate-dependencies-warning branch from 48617ce to d9f9f3f Compare December 17, 2025 09:08
@rgrinberg rgrinberg merged commit 17e0490 into ocaml:main Dec 17, 2025
30 checks passed
@rgrinberg
Copy link
Copy Markdown
Member

Thanks

davesnx added a commit to davesnx/dune that referenced this pull request Dec 18, 2025
…without-system

* 'main' of github.com:/ocaml/dune: (113 commits)
  fix: use warning mechanism for duplicate deps warning (ocaml#12986)
  Remove reliance on the log file in some cram test (ocaml#12989)
  Remove [set_log_file] (ocaml#12987)
  fix: account for workspace binaries when generating rules for `./.bin` (ocaml#12952)
  Revert "Fix/duplicate dependencies warning" (ocaml#12984)
  refactor: make Package_dependency.decode return located value
  refactor: use Option.iter
  chore: updated 2678.md
  fix: hint message and added CR
  refactor: convert check_dups to list fold
  fix: use ~hints parameter for hints
  fix: warn on all duplicate package names in dependencies
  chore: added entry for CHANGES.md
  tests: removed unncessary dune-project file
  tests: refactor
  fix: added warning for duplicate dependencies in package definitions
  fix: tests
  fix: refactor
  fix: misleading comment in helpers.sh
  fix: remove disabled test stanza for deleted tests
  ...
jonludlam pushed a commit to jonludlam/dune that referenced this pull request Jan 14, 2026
This PR updates the duplicate dependencies warning to use Dune's warning
mechanism allowing users to disable it via the (warnings ...) field in
dune-project.

---------

Signed-off-by: Sachin Beniwal <s474996633@gmail.com>
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.

2 participants