← Back to issue list

sources: make submodule fetching configurable

View original Github issue

Metadata

Project
snapcraft
Number
#3629
Type
pull request
State
merged
Author
mr-cal
Labels
—
Created
Updated
Closed

Current evaluation

Merged #3629 via 383c1f1ce, adding source-submodules to select specific Git submodules, fetch none with [], or fetch all by default.

Resolution: closed resolved

Reason: PR #3629 was merged into main by commit 383c1f1ce, with implementation commit 195d509bd. The change makes Git submodule fetching configurable through source-submodules.

Evaluated by: mr-cal-bot

No scores available.

Issue body

- [X] Have you followed the [guidelines for contributing](https://github.com/snapcore/snapcraft/blob/master/CONTRIBUTING.md)? - [X] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? - [X] Have you successfully run `./runtests.sh static`? - [X] Have you successfully run `./runtests.sh tests/unit`? ----- Alternative solution from https://github.com/snapcore/snapcraft/pull/3623 https://bugs.launchpad.net/snapcraft/+bug/1957767 Configure which submodules to fetch from the source tree in snapcraft.yaml with `source-submodules: <list-of-submodules>`. #### Defined If `source-submodules` is defined, only the listed submodules are fetched. ``` parts: git-test: plugin: dump source-type: git source: git@github.com... source-submodules: - submodule_1 - dir1/submodule_2 ``` #### Defined and Empty If `source-submodules` in defined and empty, no submodules are fetched. ``` parts: git-test: plugin: dump source-type: git source: git@github.com... source-submodules: [] ``` #### Not Defined If `source-submodules` is not defined, all submodules are fetched (default behavior). #### Note If a submodule is fetched, any submodules of that submodules are fetched too. I don't think the behavior needs to be any more nuanced (i.e. no need to define which submodules to fetch recursively and which to fetch non-recursively).

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Merged #3629 via 383c1f1ce, adding source-submodules to select specific Git submodules, fetch none with [], or fetch all by default.
stealth/space-bunny-alpha — closed resolved Merged #3629, adding source-submodules to select Git submodules; an empty list fetches none, while omission preserves fetching all.
qwen/qwen3.6-35b-a3b — — 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.
qwen3.6-35b-a3b-mtp-q6 — — Merged into main. Adds source-submodules configuration to snapcraft.yaml for controlling git submodule fetching. Specify a list to fetch only those, an empty list to skip fetching, or omit the key to fetch all submodules by default.

Update history

No update history recorded yet.

Related work

  • Related To: snapcraft#3623 (confidence 99%)

    The alternative PR was closed as superseded by the merged implementation in #3629.

  • Related To: snapcraft#3635 (confidence 94%)

    A follow-up backport of the configurable submodule implementation to the 7.0 branch.

Related issues

Issue Project State Summary Similarity
#169 sources: make submodule fetching configurable craft-parts merged Merged craft-parts#169 via commit 3891f255, adding configurable Git submodule fetching, including selected submodules, disabling them with an empty list, or fetching all by default.
84%
#3635 sources: make submodule fetching configurable snapcraft merged Merged into snapcraft/7.0 as 4fabb9a1d, backporting #3629 to add configurable Git submodule fetching through source-submodules.
80%
#3623 sources: make submodule recursion configurable snapcraft closed PR #3623 adding source-recurse-submodules was closed as superseded by #3629, which added source-submodules (list/empty/all) and was merged in 383c1f1ce.
73%