Skip to content

Conversation

@ElectreAAS
Copy link
Collaborator

@ElectreAAS ElectreAAS commented Oct 17, 2025

Initial problem

When we have 2 modules with the same name, the one that is closer should be picked up.
The behaviour is correct within the bootstrapped dune, but not normal dune.

In bin, include_subdirs qualified was introduced in #12478.
Working on #12585, we realized there was a bug.

Fix

In 36b4592, Ali fixed the bug!

@ElectreAAS ElectreAAS requested a review from rgrinberg October 17, 2025 11:05
@Alizter Alizter force-pushed the repro-include-subdir-bug branch 2 times, most recently from 5380d48 to 36b4592 Compare October 17, 2025 14:07
@Alizter
Copy link
Collaborator

Alizter commented Oct 17, 2025

I've pushed a fix for this. It involves reversing the order of the parents we collect for a module. This meant however I had to reverse the order of the place we generate deps, but it seems to have resolved things for the better.

@ElectreAAS ElectreAAS changed the title Add 2 tests showing difference between bootstrap & dune w.r.t include-subdirs Fix difference between bootstrap & dune behaviour w.r.t include-subdirs ambiguity Oct 17, 2025
@Alizter Alizter marked this pull request as draft October 17, 2025 14:47
@Alizter Alizter force-pushed the repro-include-subdir-bug branch from 008438e to a3d03d9 Compare October 17, 2025 15:19
Copy link
Member

@rgrinberg rgrinberg left a comment

Choose a reason for hiding this comment

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

Let's get @anmonteiro to look as well

@rgrinberg rgrinberg requested a review from anmonteiro October 17, 2025 15:24
@Alizter Alizter marked this pull request as ready for review October 17, 2025 15:26
@ElectreAAS
Copy link
Collaborator Author

Rebasing #12585 on top of this shows that this isn't a complete fix.
Review carefully, and don't merge too quickly ^^

@Alizter
Copy link
Collaborator

Alizter commented Oct 17, 2025

Specifically this won't fix all the issues encountered in #12585, but it will fix this one.

@Alizter Alizter force-pushed the repro-include-subdir-bug branch from a3d03d9 to 5505247 Compare October 21, 2025 09:18
@Alizter Alizter merged commit c468e55 into ocaml:main Oct 21, 2025
26 checks passed
Alizter added a commit to Alizter/dune that referenced this pull request Oct 23, 2025
shonfeder pushed a commit that referenced this pull request Oct 23, 2025
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