chore: switch under nix/just#43
Conversation
WalkthroughThe pull request introduces several new configuration and build management files and updates an existing test file. A new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Justfile as Task Runner
participant Generator as go generate
participant Tidy as go mod tidy
participant Linter as golangci-lint
User->>Justfile: Execute pre-commit
Justfile->>Generator: Run generate
Generator-->>Justfile: Generation complete
Justfile->>Tidy: Run tidy
Tidy-->>Justfile: Tidy complete
Justfile->>Linter: Run lint
Linter-->>Justfile: Lint complete
Justfile-->>User: Pre-commit process finished
Assessment against linked issues
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
081d831 to
3d7697e
Compare
There was a problem hiding this comment.
Caution
Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 1
🧹 Nitpick comments (6)
Justfile (6)
9-10: Consider documenting the build tags usage.The lint command looks good, but it would be helpful to document why the
--build-tags itflag is needed. This would help new contributors understand what these tags are used for.lint: + # Run linter with integration test tags to catch issues in test code as well @golangci-lint run --fix --build-tags it --timeout 5m
18-22: Consider adding a comment about the test tags.Similar to the lint command, it would be helpful to document why the
-tags itflag is needed for tests.tests: + # Run tests with race detection and coverage, including integration tests @go test -race -covermode=atomic \ -coverprofile coverage.txt \ -tags it \ ./...
24-25: Document OpenAPI specification source.This command assumes the existence of an
openapi.yamlfile. Consider adding a comment about where this file should be located or how it should be generated.generate-client: + # Generate Go client SDK from the OpenAPI specification @speakeasy generate sdk -s openapi.yaml -o ./pkg/client -l go
27-32: Clarify the distinction between release commands.Having three different release commands (
release-local,release-ci, andrelease) might be confusing for new contributors. Consider adding comments to explain when each should be used.release-local: + # For local testing of releases without publishing @goreleaser release --nightly --skip=publish --clean release-ci: + # For CI builds to create nightly releases @goreleaser release --nightly --clean
33-35: Add a newline at the end of the file.The file doesn't end with a newline, which is a best practice in Unix/Linux environments and can cause warnings with some tools.
release: @goreleaser release --clean - +
1-35: Consider adding tool validation.The Justfile assumes several tools are available (
golangci-lint,go,speakeasy, andgoreleaser). Consider adding a command to check if these dependencies are installed.You could add a command like this:
check-deps: @echo "Checking dependencies..." @command -v go >/dev/null 2>&1 || echo "go is not installed" @command -v golangci-lint >/dev/null 2>&1 || echo "golangci-lint is not installed" @command -v speakeasy >/dev/null 2>&1 || echo "speakeasy is not installed" @command -v goreleaser >/dev/null 2>&1 || echo "goreleaser is not installed"And then make other commands depend on it:
pre-commit: check-deps generate tidy lint
🛑 Comments failed to post (1)
flake.nix (1)
15-15: 💡 Verification agent
🧩 Analysis chain
Verify Go version compatibility.
goVersion = 23seems to reference Go 1.23, which might be a future version. Please verify this is intentional.
🌐 Web query:
What is the latest stable version of Go as of April 2024?💡 Result:
The latest stable version of Go as of April 2024 was Go 1.22.2, released on April 3, 2024[7]. This release included security fixes for the
net/httppackage and bug fixes across multiple components like the compiler and linker[7].Key details:
- Versioning Scheme: Go uses
go1.[major].[patch], where even minor numbers (like 22 ingo1.22) represent stable releases[1][4].- Support Policy: Each major release receives updates until two newer versions exist. Go 1.22.x was supported through February 2025[5][6].
- Features in 1.22:
- Loop variable per-iteration initialization to prevent accidental sharing[10]
- Integer range loops (
for i := range 10)[10]- New
math/rand/v2package[10]Earlier patches in the 1.22 series (1.22.0 and 1.22.1) were released in February and March 2024 respectively[7][10]. The 1.23.x series began development in August 2024[5][10].
Citations:
- 1: https://en.wikipedia.org/wiki/Go_(programming_language)
- 2: http://xahlee.info/golang/golang_version_dates.html
- 3: https://cloud.google.com/appengine/docs/standard/go/release-notes
- 4: https://tip.golang.org/doc/go1.24
- 5: https://endoflife.date/go
- 6: https://versionlog.com/golang/
- 7: https://go.dev/doc/devel/release
- 8: https://www.gitclear.com/open_repos/golang/go/releases
- 9: https://github.com/golang/tools/releases
- 10: https://antonz.org/which-go/
Action Required: Verify or Update Go Version in flake.nix
It appears that the code sets:
goVersion = 23;This would imply using Go 1.23, yet as of April 2024 the latest stable release is Go 1.22.2. Please confirm whether you intended to target the upcoming Go 1.23 release (e.g., for testing future features) or if this is an oversight that should be corrected to match the stable version.
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (5)
README.md (3)
5-7: Specify language for fenced code block in "Generate client code" section.The fenced code block starting at line 5 does not specify a language. To comply with markdownlint (MD040) and improve syntax highlighting, consider updating it to include a language identifier (e.g.,
shif these are shell commands).-``` +```sh🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
5-5: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
11-13: Add language identifier for "Tests" fenced code block.The code block containing the
just testscommand lacks an explicit language specifier. Adding one (such assh) can enhance readability and satisfy markdownlint recommendations.-``` +```sh🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
11-11: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
17-19: Include language tag for "Lint" fenced code block.Similar to the previous blocks, please specify a language (e.g.,
sh) for the fenced block that contains thejust lintcommand, to meet markdownlint MD040 guidelines.-``` +```sh🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
17-17: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
flake.nix (2)
73-73: Remove debugging statementThe
ls -alcommand appears to be a debugging statement that should be removed before merging to production.- ls -al
87-101: Consider documenting proprietary software usageThe development shell includes
goreleaser-profrom NUR, which is likely proprietary software (explaining theallowUnfree = truesetting). Consider adding a comment about this to inform users whyallowUnfreeis needed.devShells = forEachSupportedSystem ({ pkgs, system }: { default = pkgs.mkShell { + # Note: allowUnfree is enabled for goreleaser-pro packages = with pkgs; [ go gotools golangci-lint ginkgo pkgs.nur.repos.goreleaser.goreleaser-pro self.packages.${system}.speakeasy just ]; }; } );
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (3)
.github/workflows/main.ymlis excluded by!**/*.yml.github/workflows/releases.ymlis excluded by!**/*.ymlflake.lockis excluded by!**/*.lock,!**/*.lock
📒 Files selected for processing (6)
.envrc(1 hunks)Earthfile(1 hunks)Justfile(1 hunks)README.md(1 hunks)flake.nix(1 hunks)pkg/api/clients_test.go(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
- pkg/api/clients_test.go
- .envrc
- Earthfile
- Justfile
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md
11-11: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
17-17: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
🔇 Additional comments (2)
flake.nix (2)
58-78: LGTM on Speakeasy package derivationThe Speakeasy package derivation is well-structured with proper version handling, platform-specific configurations, and hash verification for security.
1-103: Overall well-structured flake configurationThe flake configuration is well-organized with clear separation of inputs, outputs, package definitions, and development shell configuration. It properly handles multi-architecture support and includes all necessary development tools for the project.
|
|
||
| outputs = { self, nixpkgs, nur }: | ||
| let | ||
| goVersion = 23; |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Verify Go version 23
The Go version is set to 23, which seems unusually high. As of April 2024, the latest stable version of Go was 1.22.x. Please verify if this is intentional or if it should be a lower number.
🌐 Web query:
What is the latest stable version of Go as of April 2024?
💡 Result:
The latest stable version of Go as of April 2024 was Go 1.22, specifically 1.22.2 released on April 3, 2024[7][9]. This release included security fixes for the net/http package and various bug fixes across compiler components, the linker, and standard libraries like encoding/gob[7].
Key points about the release timeline:
- Go 1.22.0 initially launched on February 6, 2024, introducing features like range-over-function integers and workspace vendoring support[9].
- The language maintained backward compatibility through minor updates like 1.22.1 (March 5, 2024) and 1.22.2 (April 3, 2024), addressing security vulnerabilities and runtime issues[7].
By April 2024, Go 1.23 and 1.24 had not yet been released (they arrived in August 2024 and February 2025 respectively)[5][7]. The standard support policy ensured Go 1.22 remained actively maintained until two subsequent major versions were released[5][6].
Citations:
- 1: https://en.wikipedia.org/wiki/Go_(programming_language)
- 2: http://xahlee.info/golang/golang_version_dates.html
- 3: https://cloud.google.com/appengine/docs/standard/go/release-notes
- 4: https://tip.golang.org/doc/go1.24
- 5: https://endoflife.date/go
- 6: https://versionlog.com/golang/
- 7: https://go.dev/doc/devel/release
- 8: https://www.gitclear.com/open_repos/golang/go/releases
- 9: https://blog.stackademic.com/go-1-22-unveiled-climbing-tiobe-charts-and-embracing-semantic-evolution-61bbfc9d27e2
- 10: https://blog.jetbrains.com/go/2024/04/04/goland-2024-1-is-out/
Attention: Incorrect Go Version Detected
The flake.nix file sets goVersion = 23;, which appears inconsistent with the latest stable Go release. As of April 2024, the stable version was Go 1.22 (specifically 1.22.2). Please verify whether the version "23" is intentional (for example, if it signifies a custom internal versioning system) or if it should be updated to reflect the latest stable Go version.
- File: flake.nix
- Line: 15
3d7697e to
b19e9db
Compare
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
README.md (1)
17-19: LGTM: Command updated to use 'just' and missing language specifierThis change aligns with the PR objective, but the code blocks should have a language specified.
-``` -just lint -``` +```bash +just lint +```Also, apply the same language specifier to the other code blocks:
-``` -just generate-client -``` +```bash +just generate-client +```-``` -just tests -``` +```bash +just tests +```🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
17-17: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (3)
.github/workflows/main.ymlis excluded by!**/*.yml.github/workflows/releases.ymlis excluded by!**/*.ymlflake.lockis excluded by!**/*.lock,!**/*.lock
📒 Files selected for processing (6)
.envrc(1 hunks)Earthfile(1 hunks)Justfile(1 hunks)README.md(1 hunks)flake.nix(1 hunks)pkg/api/clients_test.go(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (3)
- pkg/api/clients_test.go
- .envrc
- Justfile
🧰 Additional context used
🪛 markdownlint-cli2 (0.17.2)
README.md
11-11: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
17-17: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
🔇 Additional comments (5)
README.md (2)
5-7: LGTM: Command updated to use 'just'This change aligns with the PR objective of switching to using 'just' for task management.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
5-5: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
11-13: LGTM: Command updated to use 'just'This change aligns with the PR objective of switching to using 'just' for task management.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
11-11: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
Earthfile (1)
39-44: LGTM: Simplified openapi sectionThe openapi section has been simplified to only save the artifact, which aligns with the PR objective of moving functionality to just/nix. I assume the functionality previously provided by the removed sections (
tests,lint,pre-commit, andtidy) has been migrated to the Justfile.flake.nix (2)
15-15: Verify the Go version settingThe Go version is set to 23, which seems unusually high. As of April 2024, the latest stable version of Go was 1.22.x. Please verify if this is intentional or if it should be a lower number.
1-103: Overall LGTM: Good development environment setupThis Nix flake configuration provides a comprehensive multi-architecture development environment with all the necessary tools for the project. The inclusion of the
justpackage in the development shell aligns with the PR objective of switching to nix/just for command running.
41ed0a6 to
ba65a64
Compare
ba65a64 to
2af6056
Compare
Fixes AUT-1