Skip to content

Conversation

@Flamefire
Copy link
Contributor

@Flamefire Flamefire commented Nov 21, 2025

(created using eb --new-pr)

Requires:

Can be tested with just easybuilders/easybuild-easyblocks#3993 and easybuilders/easybuild-easyblocks#3995 which includes the other cargo changes

General question: What shall we do when crates are given but offline = False like in this case?

  • Currently when offline=False we do not add the "source overrides" and the folder where the crates are extracted to is essentially unused as Cargo doesn't know it even exists
  • If we add the source override, e.g. of crates.io, it will not be able to download anything from crates.io so everything would need to be specified as crates except for git sources
  • If we set the env variable CARGO_NET_OFFLINE nothing will be downloaded at all

Options:

  1. Error out when crates and offline=False is given
  2. print_warning only
  3. Do the overrides independently of offline but for crates.io only if there are crates.io crates set. This allows downloading of e.g. git sources when not given in crates. This allows some flexibility but I don't know if we ever need that or if it would work.

@github-actions github-actions bot added 2024a issues & PRs related to 2024a common toolchains change labels Nov 21, 2025
@Flamefire
Copy link
Contributor Author

Test report by @Flamefire
Using easyblocks from PR(s) easybuilders/easybuild-easyblocks#3993, easybuilders/easybuild-easyblocks#3995
SUCCESS
Build succeeded for 1 out of 1 (total: 11 mins 18 secs) (1 easyconfigs in total)
i7152 - Linux Rocky Linux 9.6, x86_64, AMD EPYC 7702 64-Core Processor (zen2), Python 3.9.21
See https://gist.github.com/Flamefire/aa78e928481c358483d15ad8e07b3251 for a full test report.

@Micket
Copy link
Contributor

Micket commented Nov 21, 2025

Oh I added offline = False option just in case someone didn't want to cache the crates, so mixing doesn't make sense.

@Flamefire
Copy link
Contributor Author

What do you mean by "cache" crates exactly?

The 4 cases:

  • offline = True && crates: Regular case
  • offline = True && not crates: Just disable download, maybe provided by other means
  • offline = False && not crates: Download during build
  • offline = False && crates: (currently) same as without crates

So shall we make the 4th case an error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2024a issues & PRs related to 2024a common toolchains change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants