Skip to content
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

Global activation env vars ignored when platform-specific ones are provided #2383

Open
2 tasks done
hameerabbasi opened this issue Oct 30, 2024 · 1 comment · May be fixed by #2396
Open
2 tasks done

Global activation env vars ignored when platform-specific ones are provided #2383

hameerabbasi opened this issue Oct 30, 2024 · 1 comment · May be fixed by #2396
Labels
🐞 bug Something isn't working 👋 good first issue Good for newcomers

Comments

@hameerabbasi
Copy link

Checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pixi, using pixi --version.

Reproducible example

[project]
authors = ["Hameer Abbasi <2190658+hameerabbasi@users.noreply.github.com>"]
channels = ["conda-forge"]
name = "sparse"
platforms = ["osx-arm64", "osx-64", "linux-64", "win-64"]

[feature.finch.activation.env]
SPARSE_BACKEND = "Finch"

# Change this to your platform
[feature.finch.target.osx-arm64.activation.env]
PYTHONFAULTHANDLER = "${HOME}/faulthandler.log"

[feature.mlir.activation.env]
SPARSE_BACKEND = "MLIR"

[environments]
finch-dev = {features = ["finch"], no-default-feature = true}
mlir-dev = {features = ["mlir"], no-default-feature = true}
❯ pixi run -e finch-dev 'echo $SPARSE_BACKEND'

❯ pixi run -e mlir-dev 'echo $SPARSE_BACKEND'
MLIR
❯ pixi run -e finch-dev 'echo $PYTHONFAULTHANDLER'
/Users/habbasi/faulthandler.log

Issue description

If both platform-agnostic and platform-specific env vars are provided, the platform-agnostic ones are ignored entirely.

Expected behavior

Global env vars should be overridable by platform-specific ones, but platform-agnostic ones should take precedence if present.

@hameerabbasi hameerabbasi changed the title Pixi seems to be ignoring global activation env vars when OS-specific ones are provided Global activation env vars ignored when platform-specific ones are provided Oct 31, 2024
@ruben-arts
Copy link
Contributor

You are correct, I would say this is a bug.

@ruben-arts ruben-arts added 🐞 bug Something isn't working 👋 good first issue Good for newcomers labels Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 👋 good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants