Skip to content

fetch_cargo_deps.py: ensure CARGO_HOME is used#1804

Merged
climbfuji merged 1 commit intofeature/update_to_spack_v1from
AlexanderRichert-NOAA-patch-1
Oct 30, 2025
Merged

fetch_cargo_deps.py: ensure CARGO_HOME is used#1804
climbfuji merged 1 commit intofeature/update_to_spack_v1from
AlexanderRichert-NOAA-patch-1

Conversation

@AlexanderRichert-NOAA
Copy link
Copy Markdown
Collaborator

Description

This PR ensures that CARGO_HOME is used (rather than the default of ~/.cargo) when fetching cargo deps, and also gets rid of the llnl.* deprecation warning for fetch_cargo_deps.py.

Dependencies

none

Issues addressed

none

Applications affected

most

Systems affected

all

Testing

  • CI: Note whether the automatic tests (GitHub actions tests that run automatically for every commit) pass or not
    • GitHub actions CI tests pass
  • Additional testing: Add information on any additional tests conducted
    • Acorn (manual test)

Checklist

  • This PR addresses one issue/problem/enhancement or has a very good reason for not doing so.
  • These changes have been tested on the affected systems and applications.
  • All dependency PRs/issues have been resolved and this PR can be merged.
  • All necessary updates to the documentation on readthedocs are included in this PR
  • All necessary updates to the spack-stack wiki will be made when this PR is merged

cargo_exe = Executable(cargo_wrapper)

env = EnvironmentModifications()
env.set("CARGO_HOME", cargo_home)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am surprised this is needed, because of lines 44-47 above

cargo_home = os.getenv("CARGO_HOME")
if not cargo_home:
    raise SpackError("CARGO_HOME must be set")

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. It seems that maybe there's something about the Executable logic that's not automatically propagating it? 🤷

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed something similar with the wrapper script, #!/usr/bin/env bash doesn't work anymore. I had to change it to just #!/bin/bash in PR #1798

@climbfuji climbfuji merged commit 1013b41 into feature/update_to_spack_v1 Oct 30, 2025
7 checks passed
@climbfuji climbfuji deleted the AlexanderRichert-NOAA-patch-1 branch October 30, 2025 11:28
@climbfuji climbfuji restored the AlexanderRichert-NOAA-patch-1 branch October 30, 2025 11:28
@climbfuji climbfuji deleted the AlexanderRichert-NOAA-patch-1 branch January 30, 2026 15:48
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.

2 participants