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

Move finding the ancestor vcs to the source tree #4505

Closed
wants to merge 2 commits into from
Closed

Move finding the ancestor vcs to the source tree #4505

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Apr 20, 2021

This PR is based on #4504.

Parts of Dune needs to find out what vcs a given source directory is controlled by. When there is no vcs at the root of the workspace and we need the vcs of the root, we look up the file system.

At the moment, this lookup is shared with the root discovery code. Moving it to Source_tree makes Source_tree a bit more self-contained and removes the need for the Source_tree.init initialisation function. It also means that we might list directories above the root twice:

  • once for the root directory
  • once for figuring out the root vcs, if we need to do that

This is a bit sad, however this case is already pretty rare and will become even more rare after #4459.

We don't do that in Dune at the moment, but it is used by the Jenga
rules inside Jane Street.

Signed-off-by: Jeremie Dimino <[email protected]>
@ghost ghost requested review from rgrinberg, snowleopard and aalekseyev April 20, 2021 16:51
@ghost ghost closed this Apr 21, 2021
This pull request was closed.
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.

1 participant