Draft
Conversation
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.
Why
Switching
upmoffbuildGoModulelets Nix cache the Go package graph at a finer granularity and avoids regenerating the Python sqlite asset when only unrelated entrypoint code changes.What changed
go2nixflake input, checked in a generatedgo2nix.toml, and exposed the pinned Nix binary and plugin needed to evaluatego2nixin this repoupmpackage frombuildGoModuletogoEnv.buildGoApplication, while keepingpypi_map.sqlitegeneration in a separate filtered derivation so it can stay cached across unrelated CLI rebuildsGOMODCACHE, and run the package build with thego2nixevaluator settingsTest plan
eval "$(nix print-dev-env)" && nix build .#go2nix-nix .#go2nix-nix-plugin --no-link >/dev/null && export GO2NIX_NIX="$(nix eval --raw .#go2nix-nix.outPath)/bin/nix" && export GO2NIX_PLUGIN="$(nix eval --raw .#go2nix-nix-plugin.outPath)/lib/nix/plugins/libgo2nix_plugin.so" && export GOMODCACHE="$(mktemp -d)" && go mod download >/dev/null && "$GO2NIX_NIX" build . --no-link --option allow-import-from-derivation true --option plugin-files "$GO2NIX_PLUGIN"nix buildbefore/after the change and a rebuild after a trivialcmd/upm/main.goedit:122.586s85.181s67.798s7.017sRevertibility
Safe to revert. This only changes the Nix build graph and CI invocation, and does not touch persisted data, network protocols, or shipped package-manager behavior.
~ written by Zerg 👾