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: export a toolchain into fuel-toolchain.toml #322

Open
eightfilms opened this issue Dec 19, 2022 · 1 comment · May be fixed by #526
Open

feat: export a toolchain into fuel-toolchain.toml #322

eightfilms opened this issue Dec 19, 2022 · 1 comment · May be fixed by #526
Labels

Comments

@eightfilms
Copy link
Contributor

eightfilms commented Dec 19, 2022

This is an issue for a proposed new command: fuelup toolchain export <toolchain>

This should generate a fuel-toolchain.toml in the Sway project root containing

  1. toolchain name,
  2. components in the toolchain.

Example flow:

$ fuelup default
my-toolchain (default)
$ fuelup show
...
active toolchain
-----------------
my-toolchain (default)
  forc : 0.31.1
    - forc-client
      - forc-deploy : 0.31.1
      - forc-run : 0.31.1
    - forc-doc : 0.31.1
    - forc-explore - not found
    - forc-fmt : 0.31.1
    - forc-index : 0.1.10
    - forc-lsp : 0.31.1
    - forc-wallet - not found
  fuel-core - not found
  fuel-indexer - not found
$ fuelup toolchain export
exported 'my-toolchain' into 'fuel-toolchain.toml'

This should then create a TOML file:

[toolchain]
name = "my-toolchain"

[components]
forc = "0.31.3"  # note that 'forc-fmt', 'forc-lsp', 'forc-doc', 'forc-client' are packaged with 'forc'
forc-index = "0.1.10"

The command should fail when there's an existing fuel-toolchain.toml in the project root. A --force flag should be added to disregard the existing TOML file:

fuelup toolchain export --force <toolchain>

@eightfilms eightfilms added new feature New feature good first issue Good for newcomers labels Dec 19, 2022
@eightfilms eightfilms changed the title feat: export custom toolchain into fuel-toolchain.toml feat: export a toolchain into fuel-toolchain.toml Dec 20, 2022
@Halimao Halimao linked a pull request Nov 23, 2023 that will close this issue
@Halimao
Copy link
Contributor

Halimao commented Nov 29, 2023

@bingcicle Hi, I have drafted a PR to close this issue, again looking forward to your review~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants