-
Notifications
You must be signed in to change notification settings - Fork 57
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
Update the version of Rust used to 1.64 for all pkgs after 2022-09-23 #23
Conversation
This should account for FuelLabs/fuel-core@bcb86da while still allowing to use 1.63 (and in turn, already cached builds) for prior versions.
Hmm doesn't seem to be working for me 🤔
|
Ahhhh, that's because the latest published I think there are two things that we can do:
|
…tools Previously, the devShells provided the build inputs and environment from the latest *semver* release of their respective packages. This meant that the devShells could fall behind the current development requirements. This changes the devShells to instead provide the build environment of their respective *nightly* packages, ensuring that the devShells are at least up-to-date within 24 hrs. Issue previously spotted [here](#23 (comment)).
…tools Previously, the devShells provided the build inputs and environment from the latest *semver* release of their respective packages. This meant that the devShells could fall behind the current development requirements. This changes the devShells to instead provide the build environment of their respective *nightly* packages, ensuring that the devShells are at least up-to-date within 24 hrs. Issue previously spotted [here](#23 (comment)).
Is there a way we could specify a specific revision instead of a date? As I imagine this will make the nix shell somewhat unstable when rust updates occur since devs would have to wait for a nightly build to convince the shell to use the correct rust version. |
Also if we plan on being able to use these dev-shells in CI due to the improved build caching, we'll need to support a different way to configure the version of rust to use. Since this current approach would lead to a chicken and egg problem between this flake and fuel-core when trying to upgrade the Rust version in the future. |
I went with using the fuel package's manifest date as currently the repo only refreshes these manifests once a night, and in turn only learns about new fuel package versions and nightlies once a night. We could make this more frequent (or potentially hook into events from our other repos somehow? Never worked out how to do this for I'm not sure if there's an easy way to override the Rust version from the command line 🤔 It is possible by wrapping {
fuel-dev,
pkgs,
}:
pkgs.mkShell {
name = "fuel-dev-env";
# Required inputs come from the `fuel-dev` devShell.
inputsFrom = [fuel-dev];
buildInputs = with pkgs; [
cargo-bloat
cargo-deps
cargo-generate # For sway integration test generation.
graphviz
libusb # in case of hardware wallet stuff.
mdbook
pkgconfig
rust-analyzer
];
shellHook = ''
# Use fuel email for fuel-related dev.
export GIT_AUTHOR_EMAIL='mitchell.nordine@fuel.sh'
'';
inherit (fuel-dev) LIBCLANG_PATH ROCKSDB_LIB_DIR PROTOC NIX_CFLAGS_COMPILE;
} One could add a newer Rust version to the
True, in general we probably want to avoid having this kind of cyclic dependency between repositories either way. I think the proper approach might be for I've only really included the That said, if the fuel-core team is keen, having the Ideally, |
This makes a lot of sense, and would work better with nix plugins for IDE's and the like. E.g. https://github.com/nix-community/nix-direnv#nix-direnv |
Let's land this in the meantime anyways so that the upcoming nightlies build :) |
…tools (#26) Previously, the devShells provided the build inputs and environment from the latest *semver* release of their respective packages. This meant that the devShells could fall behind the current development requirements. This changes the devShells to instead provide the build environment of their respective *nightly* packages, ensuring that the devShells are at least up-to-date within 24 hrs. Issue previously spotted [here](#23 (comment)).
It looks like my previous rust-overlay update in #23 was a little early and didn't include 1.64 yet. #23 didn't show any issues yet as none of the packages at the time of that commit were released after 2022-09-23, and so we didn't hit the error until the latest nightlies merged into `master` with #27 which also didn't show any issues as it was was opened before #23 was merged :') This should fix it! It's probably worth enabling the same branch protection we have on the Sway repo where merging a PR requires it's up to date with `master` to avoid cases like this.
It looks like my previous rust-overlay update in #23 was a little early and didn't include 1.64 yet. #23 didn't show any issues yet as none of the packages at the time of that commit were released after 2022-09-23, and so we didn't hit the error until the latest nightlies merged into `master` with #27 which also didn't show any issues as it was was opened before #23 was merged :') This should fix it! It's probably worth enabling the same branch protection we have on the Sway repo where merging a PR requires it's up to date with `master` to avoid cases like this.
This should account for FuelLabs/fuel-core@bcb86da while still allowing to use 1.63 (and in turn, already cached builds) for prior versions.