Skip to content

Cannot checkout Boost from subrepo #374

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

Open
Yzrsah opened this issue Oct 14, 2018 · 8 comments
Open

Cannot checkout Boost from subrepo #374

Yzrsah opened this issue Oct 14, 2018 · 8 comments

Comments

@Yzrsah
Copy link

Yzrsah commented Oct 14, 2018

According to the Boost Getting-Started document, we should setup Boost by doing this:

git clone --recursive https://github.com/boostorg/boost
cd boost
git checkout boost-1.68.0
./bootstrap.sh
./b2 headers

When attempting to do so:

git subrepo clone https://github.com/boostorg/boost
cd boost
git checkout boost-1.68.0
error: pathspec 'boost-1.68.0' did not match any file(s) known to git.

How can this be resolved?

@Yzrsah Yzrsah changed the title Cannot get boost Cannot checkout boost from subrepo Oct 14, 2018
@Yzrsah Yzrsah changed the title Cannot checkout boost from subrepo Cannot checkout Boost from subrepo Oct 14, 2018
@grimmySwe
Copy link
Collaborator

You should use git subrepo clone -b boost-1.68.0 https://github.com/boostorg/boost to connect your local subrepo to the upstream branch. If you want to update it later, you can just git subrepo clone -f -b boost-1.69.0 https://github.com/boostorg/boost

@Yzrsah
Copy link
Author

Yzrsah commented Oct 16, 2018

Could it be possible to have a new command that makes this easier, or more expressive?
The default "git checkout branch" kinda has the simplicity.
-f -b is easy enough, but it is a bit "syntatic"

@grimmySwe
Copy link
Collaborator

@zyrsha there is a difference that the regular checkout doesn't update anything in the repo, it just changes the working copy. For git-subrepo case, switching branch will actually create a new commit in your parent directory.

@grimmySwe
Copy link
Collaborator

There is some discussion in #336 regarding the checkout, so if you got this issue working, we can track the checkout there.

@Yzrsah
Copy link
Author

Yzrsah commented Oct 16, 2018

After cloning a Boost branch with subrepo, it fails to bootstrap and all the sources are missing.
This is due to the submodules not checking out.
The regular method suggested by Boost uses "clone -r" for recursive, or "git submodule update --init"
But subrepo has no such option for updating all submodules or recursive clone.
What is the best way to do this with subrepo?

@grimmySwe
Copy link
Collaborator

There are a lot of issues on using submodules with subrepo (#262), our main approach right now is that if you want to use submodules or subrepos, you are best of using the in the entire structure. git-subrepo tries hard to be transparent but that causes problem with submodules as they want to know where in the structure they are.

@Yzrsah
Copy link
Author

Yzrsah commented Oct 16, 2018

I see. This makes a genuine concern for Boost. That one is actually rare, it has to do with their efforts to modularize Boost in order to reduce the heaviness of the library dependency. Perhaps the issue can be kept open in case any solutions can be found in the future.

@grimmySwe
Copy link
Collaborator

As a workaround you could download Boost as a binary and unpack it as a part of your build steps. Unless of course you plan to actually change things inside Boost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants