Skip to content

fix(nix): finish the crates.io wiring — relock, and follow our logos-nix - #234

Merged
dlipicar merged 2 commits into
masterfrom
chore/relock-crates-io-fixes
Sep 8, 2026
Merged

fix(nix): finish the crates.io wiring — relock, and follow our logos-nix#234
dlipicar merged 2 commits into
masterfrom
chore/relock-crates-io-fixes

Conversation

@dlipicar

@dlipicar dlipicar commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Takes a module closure to zero fetchers on the endpoint crates.io 403s. #233 wired
mkPkgsWith to logos-nix's lib.nativeOverlays; this makes the whole closure actually
use it.

Two parts

1. Relocks (lock-only — lib/common.nix takes the list, so a new overlay wires
itself in; verified lib.nativeOverlays 2 → 3 with the tree byte-identical apart from
flake.lock):

input from to
logos-nix 782d8690 30285b1 the fetchCrate overlay (logos-co/logos-nix#12)
logos-rust-sdk 6462fd15 102f867 overlays on both its package sets (logos-co/logos-rust-sdk#56)
logos-qt-sdk 5c094543 b2ebecc one mkPkgs, no second Qt (logos-co/logos-qt-sdk#54)

2. Three inputs.logos-nix.follows lines, for logos-cpp-sdk, logos-protocol and
logos-plugin-qt.

Why part 2 is needed — I got this wrong first

I originally wrote that logos-qt-sdk#54 would remove the last two crates.io/api
fetchers. Measured, it does not.

Tracing them: the closure carried two qtremoteobjects derivations sharing one output
path
— an overlaid one feeding logos-qt-sdk-lib and the module, and an un-overlaid one
feeding logos-cpp-sdk-generator, logos-protocol-lib and logos-qt-host. Those three
resolve their own logos-nix, and all three sat at 6e0f4a71, which carries no overlays
at all. #54 fixed logos-qt-sdk's package set, not theirs.

They already route packages through logos-nix.lib.forAllTargets, so they need no code
change
— just our logos-nix instead of their stale one. That matches how this flake
already pins logos-protocol and logos-plugin-qt across the same inputs.

Measured

checks.aarch64-darwin.rust-native-dep, fetchers counted by urls, an API fetcher marked
uncovered when no CDN fetcher in the closure shares its outputHash:

API CDN uncovered
master 13 12 5
+ logos-nix and rust-sdk relock 2 17 0
+ logos-qt-sdk relock 2 17 0
+ these three follows 0 17 0

The rust-sdk relock is the single biggest step: it clears memchr 2.8.0,
serde_json 1.0.149 and syn 2.0.117, which arrive via logos-lidl-gen's vendor dir and
had no CDN twin at all.

Reaching API=0 matters beyond tidiness: an API and a CDN fetcher sharing an output path
are two build goals, and on a cold cache whichever is scheduled first runs. Twinned was
mitigation; this removes the goal.

Cost

The follows also dedupe the lock: 756 → 747 nodes. nixpkgs is untouched at e9f00bd8,
and nix flake check --no-build --all-systems exits 0.

Module output paths move, as they do for any change to this repo, because flake.lock is
part of the source LOGOS_MODULE_BUILDER_ROOT points at — not because of the overlays.

Also refreshes lib/common.nix's "the two crates.io 403 fixes", stale at three.

🤖 Generated with Claude Code

dlipicar and others added 2 commits September 8, 2026 15:35
Lock-only. #233 wired mkPkgsWith to logos-nix's `lib.nativeOverlays`, and both
pins have since gone stale relative to the fixes that list carries.

  logos-nix       782d8690 -> 30285b1  (adds the fetchCrate overlay, #12)
  logos-rust-sdk  6462fd15 -> 102f867  (applies the overlays to both of its own
                                        package sets, logos-rust-sdk#56)

No source change was needed for either: lib/common.nix takes the LIST, so the
third overlay wires itself in. Verified by evaluation -- lib.nativeOverlays goes
2 -> 3 and the tree is byte-identical apart from flake.lock.

Measured on checks.aarch64-darwin.rust-native-dep, counting fetchers by `urls`
and marking an API fetcher "uncovered" when no CDN fetcher in the same closure
shares its outputHash:

  before   API=13  CDN=12  uncovered=5
  after    API= 2  CDN=17  uncovered=0

The rust-sdk half is the bigger one: it clears memchr 2.8.0, serde_json 1.0.149
and syn 2.0.117, which reach the closure through logos-lidl-gen's vendor dir and
had no CDN twin at all. The logos-nix half clears rav1e and cargo-c inside this
builder's own package set.

The 2 survivors are twinned rav1e/cargo-c coming from logos-qt-sdk, which builds
its own un-overlaid Qt; logos-co/logos-qt-sdk#54 removes them. Twinned is
mitigation, not safety -- two derivations sharing an output path are two build
goals, and on a cold cache whichever runs first wins.

nixpkgs is untouched (e9f00bd8 either side) and the lock keeps all 756 nodes.
Module output paths move, as they do for any change here, because flake.lock is
part of the source LOGOS_MODULE_BUILDER_ROOT points at.

Also refreshes lib/common.nix's "the two crates.io 403 fixes", stale at three.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The relock alone left two crates.io/api fetchers in a module closure. I said
logos-co/logos-qt-sdk#54 would remove them; measured, it does not.

Tracing them: the closure carried TWO qtremoteobjects derivations sharing one
output path -- an overlaid one feeding logos-qt-sdk-lib and the module, and an
un-overlaid one feeding logos-cpp-sdk-generator, logos-protocol-lib and
logos-qt-host. Those three resolve their OWN logos-nix, and all three sat at
6e0f4a71, which carries no overlays at all. #54 fixed logos-qt-sdk's package
set, not theirs.

They already route packages through logos-nix.lib.forAllTargets, so they need
no code change -- only our logos-nix instead of their stale one. Three
`inputs.logos-nix.follows` lines, matching how this flake already pins
logos-protocol and logos-plugin-qt across the same inputs.

  checks.aarch64-darwin.rust-native-dep, fetchers counted by `urls`:
    master                          API=13  CDN=12  uncovered=5
    + logos-nix and rust-sdk relock API= 2  CDN=17  uncovered=0
    + logos-qt-sdk relock           API= 2  CDN=17  uncovered=0
    + these three follows           API= 0  CDN=17  uncovered=0

Reaching API=0 matters beyond tidiness: an API and a CDN fetcher sharing an
output path are two build goals, and on a cold cache whichever is scheduled
first runs. Twinned was mitigation; this removes the goal.

The qt-sdk relock (5c094543 -> b2ebecc, #54) stays. It is what stops
logos-qt-sdk-lib carrying its own API fetchers, which matters to anyone
building that flake directly even though it did not move this closure.

The follows also dedupe the lock: 756 -> 747 nodes. nixpkgs is untouched at
e9f00bd8 and `nix flake check --no-build --all-systems` exits 0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@dlipicar dlipicar changed the title chore(deps): relock logos-nix and logos-rust-sdk for the crates.io fixes fix(nix): finish the crates.io wiring — relock, and follow our logos-nix Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown

📊 Doc-test reports

The four ways to wrap a C library plus the two cross-language composition tours — each scaffolded into real modules, built against this commit, loaded in logoscore, and driven — rendered alongside the commands actually run and their output (updated each run, commit bb9dc6e):

Pages can take a minute to update after the run finishes.

@dlipicar
dlipicar merged commit 9f420c2 into master Sep 8, 2026
4 checks passed
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.

1 participant