Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

improve env var strategy #238

Closed
Closed

Description

@nrc

env vars are global mutable state and we should be more careful with them. They have caused problems with the way we run tests and could cause issues elsewhere.

I have a PR which removes use of CARGO_TARGET_DIR. So remaining we have RUSTFLAGS when we run Cargo, and then we try to preserve the env vars which Cargo uses to run rustc whenever we call rustc. I don't see a way around RUSTFLAGS, and given that it never changes I don't feel too bad about it. The setting and unsetting of the rustc env vars makes me twitchy though. I would hope we could just set them when we get them from Cargo and unset them if we call Cargo again, rather than every time we use rustc (which feels racey). I'd love to get rid of them completely but that would require some deep surgery on rustc and possibly Cargo too.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions