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

Support building flakes from a Git repo url with submodules #5434

Merged
merged 1 commit into from
Nov 8, 2021

Conversation

timothyklim
Copy link
Contributor

@timothyklim timothyklim commented Oct 26, 2021

This patch can support workaround for #5284: nix build "git+file://$(pwd)?submodules=1".

@timothyklim
Copy link
Contributor Author

/cc @edolstra

@maydayv7
Copy link

Seconding, hope this is merged as soon as possible

@knedlsepp
Copy link
Member

knedlsepp commented Oct 27, 2021

Nice. One thing that I'm still wondering is how we would prevent flakes behaving differently depending on the version of nix they're run with.
Let's say for the next nix release git-submodules will be off by default, but opt-in using ?submodules=1.
My personal preference would be to have git-submodules be on by-default. (@edolstra also mentioned that git-submodules should be on by-default which received quite a few positive reactions)
It seems that we would break backwards compatibility by changing git-submodules to be on by default, but opt-out-able using submodules=0 in a potential nix-2.5.

(Of course nothing I mentioned above is really related to this PR as it leaves the default untouched.)

@maydayv7
Copy link

Off by default, but opt-in to use, seems to be the most ideal scenario (and the one implied by this PR), since both backwards-compatability, as well as the functionality if required, is maintained

@knedlsepp
Copy link
Member

knedlsepp commented Oct 27, 2021

Off by default, but opt-in to use, seems to be the most ideal scenario (and the one implied by this PR), since both backwards-compatability, as well as the functionality if required, is maintained

Well nix-2.4 has not been released yet, so one scenario could also be that before the 2.4 release git-submodules becomes the default with the option to opt-out. IMO disabling submodules is mostly a performance optimization which could be done in different ways. It does however severly impact the UX of the nix command. nix build "git+file://$(pwd)?submodules=1" is not exactly simple to remember.

In #5284 it doesn't seem that edolstra has fundamentally changed his view on submodules ideally being turned on by default, so I'm really uncertain what will be the outcome of all this.

@kaii-zen
Copy link
Contributor

kaii-zen commented Nov 4, 2021

... siphoning submodules stakeholders to #5497

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.

5 participants