-
Notifications
You must be signed in to change notification settings - Fork 5
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
Wrap the dotnet executable to set default environment variables #102
Wrap the dotnet executable to set default environment variables #102
Conversation
Co-Authored-By: Jacob Parker <[email protected]>
…es_csharp into dotnet/wrap-the-dotnet-exe
This reverts commit 80e56d3.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Just some minor stuff/questions.
Were you able to do your testing on Mac? |
Yes, for commit 8d0ef05 I changed to list initialization and enforced Seems that the MacOS version of |
default = Label(_TEMPLATE), | ||
allow_single_file = True | ||
), | ||
"src": attr.label_list( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this file isn't really used at compile time so it's a tiny bit weird to call it src
, but that's fine. This is an internal rule.
|
||
/* | ||
dotnet requires these environment variables to be set. | ||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: inconsistent comment style in this file
While working on #98 I encountered difficulty while trying to run the
dotnet.exe
cross-platform. It has the requirement that the environment variablesHOME, DOTNET_CLI_HOME, APPDATA, PROGRAMFILES
are defined.Although constants could works (conditional by OS), this means that properties of a bazel dir could impact how a build compiles. Instead, this PR creates a wrapper
dotnetw
that sets environment variables before execution.This is a draft at the moment while I iron about some edge cases (and refactor the wrapper)
Related to #10