Skip to content

Conversation

@rgrinberg
Copy link
Member

@rgrinberg rgrinberg commented Oct 25, 2025

Introduce an alias unused-libs that will error out if it detects any used libraries.

  • add a way to add intentionally unused libraries
  • add some docs
  • add a test demonstrate that some unused dependency cannot be detected
  • changes

Fixes #650

@rgrinberg rgrinberg marked this pull request as ready for review October 25, 2025 03:03
Alizter
Alizter previously approved these changes Oct 27, 2025
@rgrinberg rgrinberg force-pushed the ocamlobjinfo-multi-files branch from ff31b91 to 5ea10af Compare October 27, 2025 15:33
@rgrinberg rgrinberg changed the title refactor: ocamlobjinfo with multiple files feature: add an unused-libs alias Oct 27, 2025
@rgrinberg rgrinberg requested a review from nojb October 27, 2025 15:34
@rgrinberg rgrinberg marked this pull request as draft October 27, 2025 15:34
Signed-off-by: Rudi Grinberg <[email protected]>
@rgrinberg rgrinberg force-pushed the ocamlobjinfo-multi-files branch 4 times, most recently from b909b3d to 49e8456 Compare October 27, 2025 21:08
Introduce an alias to detect unused libraries in libraries and
executable stanzas.

This stanza relies on information extracted using ocamlobjinfo to detect
which modules are actually used

Signed-off-by: Rudi Grinberg <[email protected]>
@rgrinberg rgrinberg force-pushed the ocamlobjinfo-multi-files branch from 49e8456 to 848e13e Compare October 27, 2025 21:20
@@ -0,0 +1,2 @@
- Introduce an `unused-libs` stanza to detect unused libraries (#12623, fixes
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
- Introduce an `unused-libs` stanza to detect unused libraries (#12623, fixes
- Introduce an `unused-libs` alias to detect unused libraries (#12623, fixes

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.

Dune should warn about dependencies on unused libraries

2 participants