Skip to content

devops: read workspace crate names from cargo metadata --no-deps - #6348

Open
prql-bot wants to merge 1 commit into
mainfrom
fix/taskfile-package-names
Open

prql-bot wants to merge 1 commit into
mainfrom
fix/taskfile-package-names

Conversation

@prql-bot

Copy link
Copy Markdown
Collaborator

task test-rust-api has silently stopped excluding prqlc-parser, and task build-each-crate passes Cargo package IDs where it means package names. Both read the workspace's crates with:

cargo metadata --format-version=1 | jq -r '.workspace_members[] | split(" ")[0]'

workspace_members used to hold "<name> <version> (<source>)", so splitting on the space took the name. Cargo now emits opaque package IDs with no space in them, so the split is a no-op and each entry comes out as e.g. path+file:///…/prqlc/prqlc-parser#0.13.15.

build-each-crate still works, because Cargo accepts a full package-ID spec after -p. test-rust-api does not: its without (splitLines .PACKAGES) "prqlc-parser" compares against the plain name, which no longer appears anywhere in the list, so the crate the task's summary says it excludes is tested anyway.

Reading .packages[].name under --no-deps gives the plain names directly — --no-deps restricts .packages to the workspace's own crates, which is what workspace_members was being used for.

No changelog entry: this is dev tooling with no user-facing effect. Neither task runs in CI — build-each-crate is reached only through task build-all, and nothing invokes test-rust-api.

Rendered commands, before and after

Before, from task --dry test-rust-api:

cargo test  -p=path+file:///…/prqlc/bindings/elixir/native/prql#0.13.15  -p=path+file:///…/prqlc/prqlc#0.13.15  -p=path+file:///…/prqlc/prqlc-parser#0.13.15  …

After:

cargo test  -p=prql  -p=prqlc  -p=prql-java  -p=prqlc-js  -p=prqlc-c  -p=prqlc-python  -p=prqlc-macros  -p=compile-files  -p=mdbook-prql

prqlc-parser is absent from the second, as the task's summary intends.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant