Refactor crate loops in CI wasm
jobs
#1990
Merged
+31
−6
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.
This is a minor refactoring that should not affect behavior. There are two changes:
Use a
bash
array for the long list of crates without feature toggles, to make clear what crates are covered in this loop, and so any changes to the list produce clearer diffs, and to improve the general readability of the workflow.In each loop, rename the variable from
name
tocrate
, to make the meaning clearer. The other significant kind of loop in this job is overfeature
, so this makes the contrast clear. (Other loops over array items in other jobs in the workflow, where the general variable namename
could be used, already instead use the more specific variable namespackage
andcmd
.)This may slightly mitigate #1988 in that it makes it easier for the big list to be manually inspected, but it does not fix that issue.
I'm doing this before opening a PR related to #1989 since otherwise there is likely to be a conflict between them. (Such a PR may modify the bodies of the loops--to verify that they work with
-p
as intended--which for each loop would modify a line adjacent to the line modified here.)