-
Notifications
You must be signed in to change notification settings - Fork 413
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
Empty DUNE_PROFILE should be ignored #4633
Comments
It's a small change which I'm happy to make, given the "nod"! |
xref #3959 |
Why doesn't opam clear the environment in the sandbox? |
opam (mostly) doesn't scrub the environment (it's an extremely difficult thing to do reliably - cf. Visual Studio configuration, etc.) - in the absence of package variables, it's actually relied on (😱) for some things (you can feed configuration to a package this way, but it's obviously a horribly hacky thing to do). opam 2.1 will scrub newly introduced OPAM* environment variables (ocaml/opam#4660) and for 2.2 we'll aim to scrub all OPAM* environment variables, having assessed its impact (ocaml/opam#4661) but I think it's extremely unlikely that opam will ever scrub any other environment variables. |
I don't buy the Visual Studio example (why would the build of packages care about this?) but I can believe it is tricky in general. So back to Dune, it seems that we should plain ignore the DUNE_PROFILE variable when we pass |
I was referring to the Visual Studio Command Prompts which are a vast host of batch files which set the environment variables to use the compilers. |
Oh, that makes sense |
My religious fervour remains, but this issue is essentially a duplicate of #3959, so closing until such time as it bites more significantly 🙂 |
This isn't useful, and empty environment variables cannot (reliably) be specified on Windows. My pseudo-religious opinion on this is that an empty environment variable should always be treated as unset in cross-platform development.
Related to #4632 - at the moment an opam package must specify
-p --profile=release
if it wants to guarantee that it actually gets the release profile with-p
(since opam doesn't have a syntax to unset ernvironment variables).The text was updated successfully, but these errors were encountered: