Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI/xtask for Validating State of Dependency Tree #6981

Open
cwfitzgerald opened this issue Jan 23, 2025 · 2 comments
Open

CI/xtask for Validating State of Dependency Tree #6981

cwfitzgerald opened this issue Jan 23, 2025 · 2 comments
Labels
area: infrastructure Testing, building, coordinating issues type: enhancement New feature or request

Comments

@cwfitzgerald
Copy link
Member

cargo tree is a very useful tool for evaluating the dependency tree on a given platform, package, and feature set.

We should build a set of queries that tests for/against the presence of dependencies on certain platforms in certain situations. There's no obvious programmatic output, but a regex done in an xtask would be plenty.

Discovered as part of the absolute chaos that is #6980 and to validate #6949. Possible queries:

  • cargo tree -p wgpu --target wasm32-unknown-unknown -e normal does not contain wgpu-core
  • cargo tree -p wgpu --target wasm32-unknown-unknown --features wgsl,spirv -e normal does not contain wgpu-core
  • cargo tree -p wgpu --target x86_64-pc-windows-msvc -e normal does not contain web-sys
    etc.
@cwfitzgerald cwfitzgerald added area: infrastructure Testing, building, coordinating issues type: enhancement New feature or request labels Jan 23, 2025
@kpreid
Copy link
Contributor

kpreid commented Jan 24, 2025

Instead of parsing cargo tree, how about using cargo deny? You would need a separate config file for each "query", but it would do the job.

@cwfitzgerald
Copy link
Member Author

It seems a bit heavy handed imo - all I'm thinking of doing for "parsing" here is substring searches or maybe a light regex, plus it's nice it's included in the install of cargo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: infrastructure Testing, building, coordinating issues type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants