fix(ci): correct workspace member parsing and relay rustfmt violation#177
Open
fix(ci): correct workspace member parsing and relay rustfmt violation#177
Conversation
The sed range '/\[workspace\]/,/\[/' in determine-workspace-members.sh stopped at "members = [" (which itself contains "["), so the multiline member list was never captured. This left WORKSPACE_MEMBERS as a one-element array of the empty string, which propagated through to the matrix and caused `cargo check -p ` (blank package) to exit 101. Replace the broken sed pattern with awk that tracks when it enters the members array and exits on the closing "]". Also guard readarray against an empty MEMBERS_LIST to prevent the empty-element array from recurring. Separately, collapse a split match-arm pattern in rsky-relay/src/server/ server.rs that rustfmt flagged in the formatting job. Co-Authored-By: Claude Sonnet 4.6 <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.
Summary
Fixes two independent CI failures exposed by PR #170.
1.
checkjob — empty package name (determine-workspace-members.sh)The sed range used to extract workspace members:
sed -n '/\[workspace\]/,/\[/p' Cargo.tomlstops at the first line containing
[after[workspace], which ismembers = [itself. The member names on subsequent lines are never captured, soreadarrayreceives an empty string and producesWORKSPACE_MEMBERS=("")— a one-element array of the empty string.When
.github/changes are detected (as in PR #170 addingdependabot.yml), the script includes all "members" in the matrix, including the empty string. This causescargo check -p(blank package name) to exit 101.Fix: replace the broken sed range with
awkthat properly tracks entry into and exit from themembers = [...]block, and guardreadarrayagainst an empty result.2.
formattingjob — rustfmt violation inrsky-relaycargo fmt -- --checkflagged a split match-arm inrsky-relay/src/server/server.rsintroduced by the host-banning PR (96e4858). Collapsed to the single line rustfmt expects.Changes
Checklist
🤖 Generated with Claude Code