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

Throw error if Rust is not installed for contract operations: new, build, clean #376

Merged
merged 2 commits into from
Dec 14, 2023

Conversation

popenta
Copy link
Contributor

@popenta popenta commented Dec 14, 2023

Previously, if one tried to build a contract using mxpy and it did not have Rust installed, mxpy would install it on the spot. Now, it does not install it anymore, it throws an error saying:

Rust is not installed on your machine. Please run `mxpy deps install rust --overwrite` and try again.

This was done to make it easier for people to debug in case the installation failed. If sc-meta's dependencies we're not installed it would fail the installation, but still proceed to try the contract build.

Fixes issue #371.

@popenta popenta self-assigned this Dec 14, 2023
RUST_MODULE_KEY = "rust"
rust_module = Rust(RUST_MODULE_KEY)
if not rust_module.is_installed(""):
tag = config.get_dependency_tag(RUST_MODULE_KEY)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If not required, perhaps use "" instead?

@popenta popenta merged commit e79c3d6 into main Dec 14, 2023
9 checks passed
@popenta popenta deleted the remove-rust-autoinstall branch December 14, 2023 12:19
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.

3 participants