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

Remove environment pollution, other cleanup and simplifications #73

Merged
merged 13 commits into from
Mar 21, 2023

Conversation

andreibancioiu
Copy link
Contributor

@andreibancioiu andreibancioiu commented Mar 18, 2023

1

For less undesired side-effects, the extension does not automatically patch settings.json anymore. It's the responsibility of the VSCode user to adjust settings.json and include necessary PATHs and variables - only as needed (e.g. if the user does rely on the Rust installation in ~/multiversx-sdk as opposed to a separate installation):

For Linux:

{
    "terminal.integrated.env.linux": {
        "PATH": "${env:HOME}/multiversx-sdk:${env:HOME}/multiversx-sdk/vendor-rust/bin:${env:HOME}/multiversx-sdk/vmtools:${env:PATH}",
        "RUSTUP_HOME": "${env:HOME}/multiversx-sdk/vendor-rust",
        "CARGO_HOME": "${env:HOME}/multiversx-sdk/vendor-rust"
    },
    "rust-analyzer.server.extraEnv": {
        "PATH": "${env:HOME}/multiversx-sdk:${env:HOME}/multiversx-sdk/vendor-rust/bin:${env:HOME}/multiversx-sdk/vmtools:${env:PATH}",
        "RUSTUP_HOME": "${env:HOME}/multiversx-sdk/vendor-rust",
        "CARGO_HOME": "${env:HOME}/multiversx-sdk/vendor-rust"
    }
}

For MacOS:

{
    "terminal.integrated.env.osx": {
        "PATH": "${env:HOME}/multiversx-sdk:${env:HOME}/multiversx-sdk/vendor-rust/bin:${env:HOME}/multiversx-sdk/vmtools:${env:PATH}",
        "RUSTUP_HOME": "${env:HOME}/multiversx-sdk/vendor-rust",
        "CARGO_HOME": "${env:HOME}/multiversx-sdk/vendor-rust"
    },
    "rust-analyzer.server.extraEnv": {
        "PATH": "${env:HOME}/multiversx-sdk:${env:HOME}/multiversx-sdk/vendor-rust/bin:${env:HOME}/multiversx-sdk/vmtools:${env:PATH}",
        "RUSTUP_HOME": "${env:HOME}/multiversx-sdk/vendor-rust",
        "CARGO_HOME": "${env:HOME}/multiversx-sdk/vendor-rust"
    }
}

2

Rust-based contract interaction snippets will arise soon.

Writing contract interaction snippets in bash is now discouraged. We've dropped support for invoking such interaction snippets directly from the VSCode extension UI.

Existing bash-based interaction snippets can still be invoked from the CLI, as follows (example for the adder contract):

export PROJECT=$(pwd)
export USERS=~/multiversx-sdk/testwallets/latest/users

source interactions/testnet.snippets.sh && deploy
source interactions/testnet.snippets.sh && add

3

In the past, we've patched both launchItems and tasks collections of launch.json and tasks.json. Now we don't anymore.

4

Do not patch anymore .gitignore. This must be the responsibility of the user (with aid from the contract template system).

@andreibancioiu andreibancioiu self-assigned this Mar 18, 2023
@andreibancioiu andreibancioiu marked this pull request as ready for review March 20, 2023 11:37
psorinionut
psorinionut previously approved these changes Mar 20, 2023
@andreibancioiu andreibancioiu merged commit b850f6f into master Mar 21, 2023
@andreibancioiu andreibancioiu deleted the feat/next branch March 21, 2023 11:00
@andreibancioiu andreibancioiu changed the title Next: cleanup, simplifications, improvements Remove environment pollution, other cleanup and simplifications Mar 21, 2023
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.

None yet

5 participants