Skip to content

Decouple Nanvix OS artifact download from z configure#58

Merged
ppenna merged 1 commit into
devfrom
fix/decouple-os-artifacts-from-configure
Jun 10, 2026
Merged

Decouple Nanvix OS artifact download from z configure#58
ppenna merged 1 commit into
devfrom
fix/decouple-os-artifacts-from-configure

Conversation

@ppenna

@ppenna ppenna commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Problem

download_steps() (executed during ./z configure) downloads the
nanvix/nanvix OS release via gh release download to stage
libposix.a, user.ld, and the nanvixd binaries into the install
prefix. These artifacts are consumed only by z test (smoke +
integration tests) and z verify — never by configure, build, or install.

Coupling the download to configure forces a hard gh (+ GitHub auth)
dependency on every build. This breaks building GCC in minimal environments
such as container image builds, where gh is not installed/authenticated.
Concretely, it broke the nanvix/toolchain-gcc Docker build at
./z configure --stage=0 with "Failed to download Nanvix release."

Fix

  • Remove the OS-artifact download from download_steps() (configure path).
  • Add a dedicated, idempotent download_nanvix_os_artifacts() function.
  • Call it on demand at the start of test_steps() and verify_steps().

configure/build/install no longer depend on gh; test/verify
fetch the artifacts on demand (and skip if already present). gh remains a
required package for the test/verify workflows.

Validation

  • bash -n z passes; shellcheck -S error z is clean.
  • Confirmed newlib/binutils z scripts do not download OS artifacts, so this
    is the only place the coupling existed.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

The `download_steps()` routine (run during `./z configure`) fetched the
nanvix/nanvix OS release via `gh release download` to stage libposix.a,
user.ld and the nanvixd binaries into the install prefix. Those artifacts
are only consumed by `z test` (smoke + integration tests) and `z verify`;
they are not needed to configure, build, or install the compiler.

Coupling that download to configure forced a `gh` dependency (and GitHub
authentication) onto every build, which breaks compiling GCC in minimal
environments such as container image builds where `gh` is unavailable.

Move the download into a dedicated `download_nanvix_os_artifacts()`
function and invoke it on demand at the start of `test_steps` and
`verify_steps`. `configure`/`build`/`install` no longer require `gh`.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 10, 2026 05:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR decouples downloading Nanvix OS release artifacts (used only by z test / z verify) from the z configure workflow, removing the hard dependency on the GitHub CLI (gh) for minimal build environments.

Changes:

  • Remove Nanvix OS artifact download logic from download_steps() (configure path).
  • Introduce download_nanvix_os_artifacts() as a dedicated, idempotent on-demand fetcher.
  • Invoke OS artifact download at the start of test_steps() and verify_steps().
Show a summary per file
File Description
z Moves Nanvix OS artifact fetching out of configure-time downloads and into on-demand test/verify steps via a new helper function.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread z
[[ -f "${install_location}/libexec/nanvixd/kernel.elf" ]] && \
[[ -f "${install_location}/libexec/nanvixd/linuxd.elf" ]] && \
[[ -f "${install_location}/libexec/nanvixd/uservm.elf" ]]; then
echo "Nanvix OS libraries already present in '${install_location}/lib/'."
@ppenna ppenna merged commit 1b897b1 into dev Jun 10, 2026
3 checks passed
@ppenna ppenna deleted the fix/decouple-os-artifacts-from-configure branch June 10, 2026 06:26
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

Successfully merging this pull request may close these issues.

2 participants