chore: add devenv development environment#38
Merged
Conversation
Add a devenv (devenv.sh) config pinning the Go toolchain to match go.mod along with golangci-lint, golines, goimports, gopls, and dlv, so the dev environment is reproducible across machines. Includes convenience scripts (build/test/test-race/lint/bench/modernize) wrapping the canonical commands. Wire up direnv auto-activation via .envrc, ignore devenv's generated state in .gitignore (keeping devenv.lock tracked), and document the optional setup in the README. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
What
Adds an optional devenv development environment so contributors build against a reproducible, pinned toolchain.
devenv.nix— Go toolchain (matchinggo.mod'sgo 1.26) plusgolangci-lint(the exact.golangci.ymlversion),golines,goimports,gopls,dlv, andmake. Convenience scripts wrap the canonical commands:build,test,test-race,lint,bench,modernize.devenv.yaml— pins nixpkgs torollingso the Go version tracksgo.mod.devenv.lock— committed lockfile for reproducibility..envrc— direnv auto-activation (use devenv)..gitignore— ignore devenv's generated state (.devenv*,devenv.local.nix,.direnv/), keepingdevenv.locktracked.Using devenv is entirely optional — a plain
goinstall continues to work.Verification
Built the environment via
devenv shelland confirmed the toolchain resolves:go 1.26.3— matchesgo.modgolangci-lint 2.12.2— matches.golangci.ymlgolines,goimports,dlv,makeall on PATHdirenv exportloads the shell cleanly (.envrchash valid)🤖 Generated with Claude Code