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

Absolute submodule paths would be welcome. #505

Closed
gl-yziquel opened this issue Jun 12, 2024 · 6 comments
Closed

Absolute submodule paths would be welcome. #505

gl-yziquel opened this issue Jun 12, 2024 · 6 comments

Comments

@gl-yziquel
Copy link

Paths of submodules are relative in this repository.

My internal build system, in which I wish to integrate clingo, fares better when submodule paths are relative.

I raised a similar issue on swi-prolog:

SWI-Prolog/swipl-devel#1283

I know this may be a contentious issue. But I'd really suggest making the paths of submodules absolute instead of relative: relative paths behave incorrectly when double cloning git repositories.

@rkaminsk
Copy link
Member

We use relative paths to consistently checkout via ssh/https. Afaik this is not possible with absolute paths. I don't want to change this setup.

@gl-yziquel
Copy link
Author

We use relative paths to consistently checkout via ssh/https. Afaik this is not possible with absolute paths. I don't want to change this setup.

Sure. I just wanted to make aware of what it implies on the other side. It makes cloning a clone really problematic.

@rkaminsk
Copy link
Member

There should however be very few users with this use case. I trust this can be resolved with a little bit of scripting.

@gl-yziquel
Copy link
Author

That kind of scripting ? Yes...

for submodule in $(grep -E "^\[submodule" .gitmodules | sed 's/^\[submodule "//;s/"\]//'); do git config submodule.$submodule.url "$(git config --file /path/to/my/local/git/clone/of/swipl-devel/.git/config --get submodule.$submodule.url)"; done

That use case arises pretty naturally, though: 1. you want to archive the repositories (which is pretty natural) and 2. you want to build from the archived repositories out of source tree (pretty natural too).

  1. requires a clone. 2. requires a clone of a clone. And here comes the problem.

I've just bumped into that same problem with the potassco-asp-course/course repo too.

Granted: many people do not archive code they download, and they do not build it, in this era of docker containers. They should, however.

@rkaminsk
Copy link
Member

I really want to keep the current setup. Note however that the releases do not contain submodules. There is one final commit that bundles the contents of the submodules. As long as you do not want to provide development snapshots, there should be no trouble.

@gl-yziquel
Copy link
Author

I really want to keep the current setup.

Your call. Just making you aware of the issue.

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

No branches or pull requests

2 participants