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

feat(cli): add feature to disable downloads #3465

Merged
merged 5 commits into from
Jan 17, 2025

Conversation

CathalMullan
Copy link
Contributor

@CathalMullan CathalMullan commented Dec 28, 2024

Resolves #3457, #3417

  • Added 'no-downloads' feature to CLI.
  • Switched to using rustc instead of rustup to determine what targets are installed.
  • Lookup wasm-bindgen-cli from path when 'no-downloads' is enabled.
  • Don't try and install targets using rustup when 'no-downloads' is enabled.
  • Enable 'no-downloads' feature for Nix CI job.

Would have liked to have added tests, but mocking PATH is a little tricky to do safely across multiple tests.

Mainly need this for NixOS, but I suppose other environments may not want auto-downloading of tools either.

Also worth mentioning that the NixOS wiki now has a Dioxus page: https://wiki.nixos.org/wiki/Dioxus

@CathalMullan CathalMullan force-pushed the cli-disable-downloads branch from 10ae561 to bcde22f Compare January 1, 2025 00:59
@jkelleyrtp jkelleyrtp added this to the 0.6.2 milestone Jan 9, 2025
@jkelleyrtp jkelleyrtp requested a review from a team as a code owner January 17, 2025 00:09
@jkelleyrtp
Copy link
Member

Thanks for the PR! I made a few changes

  • Remove the need for a trait - just compressed the two implementations together
  • Wired up no-downloads to be available regardless of the feature. You can now add this dynamically with NO_DOWNLOADS=1 or set the no_downloads cli setting at runtime.
  • left the original structure in-tact

Whens checks pass I'll merge and release in 0.6.2 shortly

@jkelleyrtp jkelleyrtp merged commit c7951b7 into DioxusLabs:main Jan 17, 2025
16 of 17 checks passed
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.

Option to stop Dioxus CLI from ignoring tooling in PATH
2 participants