Skip to content

pkg/pkg.mk: fix sparse checkout initialization#22113

Open
crasbe wants to merge 2 commits intoRIOT-OS:masterfrom
crasbe:pr/fix_sparse_checkout
Open

pkg/pkg.mk: fix sparse checkout initialization#22113
crasbe wants to merge 2 commits intoRIOT-OS:masterfrom
crasbe:pr/fix_sparse_checkout

Conversation

@crasbe
Copy link
Contributor

@crasbe crasbe commented Feb 27, 2026

Contribution description

The sparse checkout was not initialized properly which resulted in some systems fetching the full folders (cone mode) instead of the selected files only (non-cone mode).
This fixes a regression introduced in #22039.

It only appeared on some machines which seems to depend on global git settings, which is why it neither happened on my machine nor on skyleaf.

Testing procedure

Testing was done by @RainbowSimon here: #22111 (comment)

Unfortunately I can't reproduce it on my machine.

Issues/PRs references

Fixes #22111.
Regression introduced in #22039.

The sparse checkout was not initialized properly which resulted
in some systems fetching the full folders (cone mode) instead of
the selected files only (non-cone mode).
This fixes a regression introduced in RIOT-OS#22039.
@crasbe crasbe requested a review from mguetschow February 27, 2026 19:21
@crasbe crasbe added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Feb 27, 2026
@github-actions github-actions bot added Area: build system Area: Build system Area: pkg Area: External package ports labels Feb 27, 2026
@riot-ci
Copy link

riot-ci commented Feb 27, 2026

Murdock results

✔️ PASSED

fb763fb fixup! pkg/pkg.mk: fix sparse checkout initialization

Success Failures Total Runtime
11005 0 11005 10m:49s

Artifacts

@AnnsAnns
Copy link
Member

I tried to understand the referenced issue and after reading through the git doc it seems like --no-cone is something that should be avoided, at least they highly recommend avoiding using --no-cone.

I'm not a git expert when it comes to such advanced stuff but is there any other solution by chance?

@crasbe
Copy link
Contributor Author

crasbe commented Feb 28, 2026

I tried to understand the referenced issue and after reading through the git doc it seems like --no-cone is something that should be avoided, at least they highly recommend avoiding using --no-cone.

I'm not a git expert when it comes to such advanced stuff but is there any other solution by chance?

Not really, because cone mode only supports full directories, which defeats the purpose for the vendor header stuff. Fetching the full directory would be 200+MB whereas fetching only the required headers is ~15MB.

Apparently non-cone mode is deprecated, but there are no plans to remove it. It's just meant to discourage people from using it. But as long as there's no viable alternative, I don't know what else to do.

Mind you, we already were using non-cone mode, just implicitly not explicitly and that's why it broke on some machines and worked on others.

@AnnsAnns
Copy link
Member

AnnsAnns commented Mar 1, 2026

When running this within the docker I get ```
Receiving objects: 100% (1/1), 36.99 KiB | 2.31 MiB/s, done.
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 1 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
Receiving objects: 100% (1/1), 18.96 KiB | 18.96 MiB/s, done.
cp: cannot stat '/data/riotbuild/riotbase/build/nrf5x_nrfx_mdk/nrf52/mdk/nrf52_bitfields.h': No such file or directory
cp: cannot stat '/data/riotbuild/riotbase/build/nrf5x_nrfx_mdk/nrf52/mdk/nrf52810_bitfields.h': No such file or directory
cp: cannot stat '/data/riotbuild/riotbase/build/nrf5x_nrfx_mdk/nrf52/mdk/nrf52810_name_change.h': No such file or directory
cp: cannot stat '/data/riotbuild/riotbase/build/nrf5x_nrfx_mdk/nrf52/mdk/nrf52810_peripherals.h': No such file or directory
cp: cannot stat '/data/riotbuild/riotbase/build/nrf5x_nrfx_mdk/nrf52/mdk/nrf52811_bitfields.h': No such file or directory
cp: cannot stat '/data/riotbuild/riotbase/build/nrf5x_nrfx_mdk/nrf52/mdk/nrf52811_peripherals.h': No such file or directory
cp: cannot stat '/data/riotbuild/riotbase/build/nrf5x_nrfx_mdk/nrf52/mdk/nrf52833_bitfields.h': No such file or directory
cp: cannot stat '/data/riotbuild/riotbase/build/nrf5x_nrfx_mdk/nrf52/mdk/nrf52833_peripherals.h': No such file or directory
cp: cannot stat '/data/riotbuild/riotbase/build/nrf5x_nrfx_mdk/nrf52/mdk/nrf52840_bitfields.h': No such file or directory
cp: cannot stat '/data/riotbuild/riotbase/build/nrf5x_nrfx_mdk/nrf52/mdk/nrf52840_name_change.h': No such file or directory
cp: cannot stat '/data/riotbuild/riotbase/build/nrf5x_nrfx_mdk/nrf52/mdk/nrf52840_peripherals.h': No such file or directory
make[1]: *** [/data/riotbuild/riotbase/cpu/nrf5x_common/Makefile.nrfx:76: all] Error 1
make: *** [/data/riotbuild/riotbase/cpu/nrf5x_common/Makefile.include:28: /data/riotbuild/riotbase/build/nrf5x_nrfx_mdk/nrf52/vendor/nrf52.h] Error 2
make: *** [/home/ann/projects/RIOT/makefiles/docker.inc.mk:395: ..in-docker-container] Error 2


I don't have a non docker setup at home right now so I can't test further right now

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

Labels

Area: build system Area: Build system Area: pkg Area: External package ports CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nimble does not compile on nrf52

3 participants