esy-issues icon indicating copy to clipboard operation
esy-issues copied to clipboard

Add `esy.sandboxEnv`

Open andreypopp opened this issue 8 years ago • 0 comments

Add new key in package.json called esy.sandboxEnv.

Motivation:

  • Set OCAMLRUNPARAM=b so we can have stack traces.
  • Override C compiler (e.g. choose between clang or gcc)

It should have the same format as esy.exportedEnv but the mechanics should be the following:

  • Only top level package's esy.sandboxEnv is considered.
  • Env vars in esy.sandboxEnv should be propagated to all package's builds.
  • Make sure those env vars participate in build cache key.

See https://github.com/jordwalke/esy/blob/9eed98f8024c3a64502387f021db7fe10ed0680a/lib/Sandbox.js#L189-L205 for the existing sandox env config. The proposed esy.sandboxEnv key is a mechanism to override this environment.

andreypopp avatar Jan 13 '17 09:01 andreypopp