fix(nix): finish the crates.io wiring — relock, and follow our logos-nix - #234
Merged
Conversation
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>
📊 Doc-test reportsThe 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 Pages can take a minute to update after the run finishes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Takes a module closure to zero fetchers on the endpoint crates.io 403s. #233 wired
mkPkgsWithto logos-nix'slib.nativeOverlays; this makes the whole closure actuallyuse it.
Two parts
1. Relocks (lock-only —
lib/common.nixtakes the list, so a new overlay wiresitself in; verified
lib.nativeOverlays2 → 3 with the tree byte-identical apart fromflake.lock):logos-nix782d869030285b1fetchCrateoverlay (logos-co/logos-nix#12)logos-rust-sdk6462fd15102f867logos-qt-sdk5c094543b2ebeccmkPkgs, no second Qt (logos-co/logos-qt-sdk#54)2. Three
inputs.logos-nix.followslines, forlogos-cpp-sdk,logos-protocolandlogos-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/apifetchers. Measured, it does not.
Tracing them: the closure carried two
qtremoteobjectsderivations sharing one outputpath — an overlaid one feeding
logos-qt-sdk-liband the module, and an un-overlaid onefeeding
logos-cpp-sdk-generator,logos-protocol-libandlogos-qt-host. Those threeresolve their own logos-nix, and all three sat at
6e0f4a71, which carries no overlaysat all. #54 fixed logos-qt-sdk's package set, not theirs.
They already route packages through
logos-nix.lib.forAllTargets, so they need no codechange — just our logos-nix instead of their stale one. That matches how this flake
already pins
logos-protocolandlogos-plugin-qtacross the same inputs.Measured
checks.aarch64-darwin.rust-native-dep, fetchers counted byurls, an API fetcher markeduncovered when no CDN fetcher in the closure shares its
outputHash:The rust-sdk relock is the single biggest step: it clears
memchr 2.8.0,serde_json 1.0.149andsyn 2.0.117, which arrive vialogos-lidl-gen's vendor dir andhad 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-systemsexits 0.Module output paths move, as they do for any change to this repo, because
flake.lockispart of the source
LOGOS_MODULE_BUILDER_ROOTpoints 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