Closed sashaaldrick closed 1 week ago
I don't think the build script would make changes to the submodules. I'd be happy to have it detect and warn the user instead.
why not @nategraf ? aren't the submodules part of the build process?
So, my main issue is with running git submodule update
. If the user has checked out a different commit in their submodule, git
will checkout the submodule commit from HEAD
instead, this undoing a potential intentional change. I'd be ok with git submodule init
which only runs on first clone, and I'd be ok with warning the user that they have a dirty state for the submodules. But update feels like it could be in contention with the intentions of the user.
I've added two functions to the build.rs
script to facilitate what we discussed yesterday @nategraf. These will now run: git submodule init
on first clone, and then give warnings about dirty state.
My only dislike is that it took a lot of space in the build.rs file, which was very clean before. I could add a git.rs
and import the relevant functions to build.rs, but also not sure about adding another file for this. What do you recommend @nategraf ?
added to
methods/build.rs
:to automatically keep local libraries up to date on build.