Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Align Rust builder behavior by grouping binaries using the Abi field instead of Environment, matching other languages (e.g., Zig).
- Renamed
EnvironmenttoAbiintargets.goand updated field mappings. - Updated
ParseandBuildlogic to assign and includeAbi. - Adjusted tests to reflect the new
Abifield and simplified target selection.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| internal/builders/rust/targets.go | Renamed key and struct field from Environment to Abi. |
| internal/builders/rust/build.go | Changed parse/build steps to set and include Abi instead of environment. |
| internal/builders/rust/build_test.go | Updated tests for the new Abi field, removed dynamic helpers, and hardcoded a target. |
Comments suppressed due to low confidence (2)
internal/builders/rust/build_test.go:84
- [nitpick] Hardcoding the target triple makes this test non-portable. Consider deriving the target from test inputs or using the parsed
options.Targetto allow running tests on different host environments.
target := "aarch64-unknown-linux-gnu"
internal/builders/rust/build_test.go:111
- [nitpick] OS and architecture are hardcoded in the expected artifact; instead, pull these values from
options.Target(e.g.,options.Target.Os) to ensure the test adapts to different platforms.
Goos: "linux",
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5866 +/- ##
=======================================
Coverage 82.73% 82.73%
=======================================
Files 164 164
Lines 16497 16498 +1
=======================================
+ Hits 13649 13650 +1
Misses 2256 2256
Partials 592 592 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
The
GroupByPlatform()method used in archives already considers theAbiextra field.For some reason, in the Rust builder, it was being called environment instead.
Changed it to
Abiso it works the same as Zig et al.Also updated the tests.
With this patch, the reproducible works as expected:
closes #5865