-
Notifications
You must be signed in to change notification settings - Fork 143
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
Support project specific toolchains with fuel-toolchain.toml
#65
Comments
Given that we follow how cargo does things it's probably better to continue to use the same structure namely have a separate file for configuration. There may be additional components that are added to this configuration file over time and it would be less work to append to the config rather than parsing out of |
We also have to consider how this interplays with workspaces, since we want to intentionally depart from Cargo's behavior for workspaces. |
+1 to @Braqzen's point of keeping the separation of concerns between |
fuel-toolchain.toml
Following a discussion with @mitchmindtree, it seems like we can emulate a part of [toolchain]
channel = "nightly-2020-07-10"
components = [ "rustfmt", "rustc-dev" ]
targets = [ "wasm32-unknown-unknown", "thumbv2-none-eabi" ]
profile = "minimal" In Rust, |
Updated proposed look of [toolchain]
channel = "latest" This pins the current project toolchain to the TOML also accepts an optional table [toolchain]
channel = "latest"
[components]
forc = "0.31.3" This means that all other components will be derived from the |
As discussed, we also need to ensure toolchains are pinned to a specific channel version. E.g. nightly will be easy as we can use the date: [toolchain]
channel = "nightly-2022-12-20" Perhaps we can use a date for [toolchain]
channel = "latest-2022-12-20" but in the case there were multiple [toolchain]
channel = "latest-2022-12-20@3"
# or
channel = "latest-2022-12-20-3" In the case that there were multiple releases in one day, but the specific release wasn't specified, perhaps we can assume the first of that day? @bingcicle I know we discussed using an every increasing index for the |
I left specifying the dates out of this issue for now because I was going to create a new issue and PR for it following #317 since it might require more thought - will cross-post your comment there |
Though I will say that even with the date tagged to the channel, we will probably still need some form of lock or index file. I don't think forcing devs to specify the date explicitly would be good DevEx. First off, when thinking about how devs will interact with
IMO the feature we ship here should aim to make these 2 steps easy. Specifying a date will easily fix the issue with number 2 - we tweak the CI a bit to save previous published For number 1 - on a day-to-day basis while working on projects with a toolchain you would not know or care what date the I think |
I don't think we should consider landing this feature without some form of locking. In my mind, the locking-to-a-specific-set-of-tools is the main purpose of this feature - to get closer to ensuring that others building the project can do so with a known set of working tools.
For these reasons, I was imagining that the more common approach would be to generate this file using a rustup command that uses the currently installed toolchain. That said, I also don't think specifying a date is so bad? E.g. we could have
Hmmm in my mind, the main purpose for this file is for fuelup to be able to automatically fetch and use known, working versions for each of the tools for the project. I'm logging off for the day now, but maybe we can have another chat on this tomorrow? |
Finalized version of how this might look: We will only allow specifying toolchains with dates, eg. Reason: just Sample TOML: [toolchain]
channel = "latest-2022-12-22" PR #317 will be updated to support this format instead. |
Following some conversations on changes in forc from 0.14.5 -> 0.15.1 causing SwaySwap to break, I think there's space for fuelup to support usage of project-specific toolchains (which is basically rustup's override mechanic, described here).
Will expand on this when I have more thoughts regarding this but my preliminary idea is that, instead of having a
rust-toolchain.toml
, we can have an entry withinForc.toml
(would this create issues with parsing the toml?) stating which version of forc is built with the project.fuelup
can detect this and decide which version offorc
to run for that project.I think this idea is also mentioned here in the original issue created by @adlerjohn.
We would need to support the toolchain pattern #63 for this.
cc: @mitchmindtree @Braqzen for comments and ideas
The text was updated successfully, but these errors were encountered: