← Back to issue list

Add source option for git submodules

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#1640675
Type
issue
State
open
Author
~guruofquality
Labels
Created
Updated
Closed

Current evaluation

Feature request to add a source-submodules option to the git source so only listed submodules are cloned instead of all recursively. The requested option was implemented in merged PR canonical/snapcraft#3629, so the issue is outdated and ready to close.

Suggested action: close stale

Reason: The issue is inactive (last activity 3540 days ago, 0 comments, no labels) and the exact feature requested — a source-submodules option where an empty list skips all submodules and omission fetches all — was implemented and merged in canonical/snapcraft#3629 ('sources: make submodule fetching configurable'). Since the feature now exists, the issue is no longer applicable.

Impact: 20 Quick Win: 12.0 Staleness: 95 Complexity: 40 Confidence: 85 Support Request: 10

Issue body

Currently the git support recursively clones all submodules in a git repository regardless. However, in many cases either none or only some of the submodules are required. Submodules can contain extra repositories not needed for building like precompiled binaries or alternative copies of a dependency already packaged along with the OS. This can add unwanted time, network traffic, and even gigabytes of disk-space -- which could be easily avoided. This bug requests adding a source-submodules option which specifies a list of explicit submodules to clone. An unspecified source-submodules option will continue to clone all submodules recursively, and an empty list for source-submodules can be used to specify that no submodules should be cloned. Since the git submodule command can be passed a list of paths, a new source-submodules option should map fairly well to the git command line arguments. And the current recursive arguments could be added conditionally based on the presence of source-submodules: https://github.com/snapcore/snapcraft/blob/master/snapcraft/internal/sources.py#L215

Evaluation history

Date Model Scores Action Summary
qwen/qwen3.8-27b
Impact: 20
Quick Win: 12.0
Staleness: 95
Complexity: 40
Confidence: 85
Support Request: 10
close stale Feature request to add a source-submodules option to the git source so only listed submodules are cloned instead of all recursively. The requested option was implemented in merged PR canonical/snapcraft#3629, so the issue is outdated and ready to close.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 25
Confidence: 80
Support Request: 10
close stale Request to add a source-submodules option to control git submodule cloning in snapcraft. Unlabelled, zero comments, and inactive for over nine years.
qwen/qwen3.6-35b-a3b
Staleness: 98
Complexity: 30
Confidence: 85
Support Request: 10
close stale Feature request to add a configurable option for cloning specific git submodules instead of all recursively. Unlabeled, no maintainer interaction, and inactive for over 9 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 40
Confidence: 90
Support Request: 10
close stale Feature request to add a source-submodules option for controlling git submodule cloning in snapcraft. Open for ~9.5 years with no comments, labels, or maintainer interaction.
qwen3.6-35b-a3b-mtp-q6
Staleness: 98
Complexity: 15
Confidence: 95
Support Request: 0
close stale Proposes a source-submodules option to selectively clone git submodules instead of recursively downloading all. Unassigned, inactive for years, and awaiting triage to evaluate implementation and default behavior.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: canonical/snapcraft#3629 (confidence 90%)

    Merged PR adding the source-submodules option with the exact semantics requested (explicit list, empty list = none, omitted = all recursive).

Related issues

Issue Project State Summary Similarity
#3629 sources: make submodule fetching configurable snapcraft merged Merged. Adds source-submodules configuration to snapcraft.yaml, enabling users to specify which git submodules to fetch, skip all with an empty list, or omit to fetch all by default. Approved and merged following successful CI checks.
75%
#1536698 Git source doesn't support submodules snapcraft (launchpad) closed Abandoned. Snapcraft does not fetch Git submodules during source builds, and the issue was closed without resolution or implementation.
70%