Stale .gitmodules in pinned repository causes solve to fail
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 1.9k
- Forks
- 500
- Avg merge
- 15h 21m
- Merged PRs (30d)
- 277
Description
It can happen that a repository that the user pins has a stale .gitmodules file. We try hard to honour that file at the moment and try to initialise those sub-modules, however if those paths don't actually exist any longer in the repository we get an error like:
Error: Submodule definition https://github.com/ocurrent/ocurrent.git
references non-existing path ocurrent in repo
Hint: Make sure the submodule is initialized and committed in the source
repository
Git is more forgiving in this circumstance and will skip these silently. The user that is pinning likely cannot do much about that file unless they clone, modify and pin locally.
Since we do a best-effort initialisation of the submodules, I think it would also be sensible to skip ones that don't make sense instead of erorring. We can even emit a warning during solving about it if people might find that useful.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing submodule initialization during solving and how the pinned repository's .gitmodules entries are handled. Reproduce the stale-path error, then verify that non-existing submodule paths are skipped without failing the solve, with any warning behavior covered by the relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, ocaml
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100