multiversx / mx-sdk-py-cli

Python Command Line Tools and SDK for interacting with the MultiversX blockchain and dApps.
Other
34 stars 36 forks source link

Do not automatically install Rust on "contract build" #371

Closed andreibancioiu closed 8 months ago

andreibancioiu commented 9 months ago

Should overcome issues such as:

Should also ameliorate https://github.com/multiversx/mx-sdk-py-cli/issues/338, since the underlying error of not being able to install sc-meta will not be hidden anymore by the error that happens at the time of running contract build: No such file or directory: sc-meta.

Additionally, do not perform Rust installation / installation check on mxpy contract templates. Currently, the output of mxpy contract templates is:

Found extra arguments in mxpy.json. Final arguments: ['contract', 'templates']
INFO     projects.templates: Checking if the necessarry dependencies are installed.                           templates.py:35
╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ We recommend using rust nightly-2023-05-26. If you'd like to overwrite your current version please run `mxpy deps install │
│ rust --overwrite`.                                                                                                        │
╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
INFO     modules: install: key=rust, tag=nightly-2023-05-26, overwrite=False                                   modules.py:283
INFO     modules: which ...
INFO     myprocess: run_process: ['sc-meta', 'templates'], in folder: None                                    myprocess.py:12
INFO     myprocess: Successful run. Output:                                                                   myprocess.py:16
...

Instead, perhaps, do ensure_rust() or something similar, that only checks for rust, without installing it.

popenta commented 8 months ago

mxpy does not automatically install Rust on any contract operation. Fixed in PR https://github.com/multiversx/mx-sdk-py-cli/pull/376.