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

Allow StampWithIjar to use default shell env #8

Merged

Conversation

adam-singer
Copy link

Description

When action StampWithIjar runs it does not allow environment variables to be passed in using --action_env command line flag. This can lead to problems when ijar is executed on systems that have compiled it with a tool chain picked up from the environment but not available on the host system in standard locations.

The difference with this change is when build --action_env=LD_LIBRARY_PATH or any other --action_env env flag is passed it will be threaded into the rules_scala action command environment for StampWithIjar.

Motivation

Tool chains that are picked up from the environment on a host are used to compile native code, but that host does not have proper libc libraries to support execution without knowing LD_LIBRARY_PATH where shared libraries exist that do contain symbols compiled against.

@blorente
Copy link

Thank you for the detailed description! I would be a lot more apprehensive of the change without it.

@blorente blorente merged commit 4dd3013 into twitter-forks:master Feb 25, 2021
@hrfuller
Copy link
Collaborator

Could you use the actions.run environment to set this with a select()-able config value which changes the value of LD_LIBRARY_PATH in the environment based on the platform. I think that might be a better solution than having to pass --action_env which will effect all actions in the build which use_default_shell_env=True.

@adam-singer
Copy link
Author

@hrfuller could you expand on an example of what that would look like? I'm not familiar with that functionality

wisechengyi pushed a commit that referenced this pull request Mar 2, 2021
### Description

Originally it was unknown to me that we could use flags to directly disable the stamping of scala imports using 
`build --@io_bazel_rules_scala//scala/settings:stamp_scala_import=False` in the `.bazelrc` file. Discussion in 
 bazelbuild#1232 cleared that up. 

### Motivation

Reverting #8 as it is not needed.
cattibrie pushed a commit that referenced this pull request Mar 9, 2021
### Description

Originally it was unknown to me that we could use flags to directly disable the stamping of scala imports using 
`build --@io_bazel_rules_scala//scala/settings:stamp_scala_import=False` in the `.bazelrc` file. Discussion in 
 bazelbuild#1232 cleared that up. 

### Motivation

Reverting #8 as it is not needed.
cattibrie pushed a commit that referenced this pull request Mar 11, 2021
### Description

Originally it was unknown to me that we could use flags to directly disable the stamping of scala imports using 
`build --@io_bazel_rules_scala//scala/settings:stamp_scala_import=False` in the `.bazelrc` file. Discussion in 
 bazelbuild#1232 cleared that up. 

### Motivation

Reverting #8 as it is not needed.
adam-singer added a commit that referenced this pull request Oct 5, 2021
### Description

Originally it was unknown to me that we could use flags to directly disable the stamping of scala imports using 
`build --@io_bazel_rules_scala//scala/settings:stamp_scala_import=False` in the `.bazelrc` file. Discussion in 
 bazelbuild#1232 cleared that up. 

### Motivation

Reverting #8 as it is not needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants