-
Notifications
You must be signed in to change notification settings - Fork 80
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
C example doesn't work outside nix-shell on macOS #209
Comments
Note that currently we test in CI:
It seems like by these tests we imply that:
It looks like GitHub Actions provide Bazelisk, so we might want to switch to pinning Bazel version using Bazelisk and letting @aherrmann @layus ping |
I think we should focus our efforts on two use-cases:
These combinations should be well tested in CI, if they are not in some cases, then this is a bug and needs to be fixed. Other combinations:
As for rules_nixpkgs's behavior in unsupported configurations. It's not so easy to determine automatically which configuration Bazel is run in. There are tricks like checking whether |
It seems to be required only by Rust right now, but it might be because we don't really test CC toolchain (see #209). Add it for all Darwin targets for now to fix Rust case.
Following #209, add --incompatible_enable_cc_toolchain_resolution flag to build action in Rust example so that changes to CC toolchain take effect.
It seems to be required only by Rust right now, but it might be because we don't really test CC toolchain (see #209). Add it for all Darwin targets for now to fix Rust case.
Following #209, add --incompatible_enable_cc_toolchain_resolution flag to build action in Rust example so that changes to CC toolchain take effect.
It seems to be required only by Rust right now, but it might be because we don't really test CC toolchain (see #209). Add it for all Darwin targets for now to fix Rust case.
Following #209, add --incompatible_enable_cc_toolchain_resolution flag to build action in Rust example so that changes to CC toolchain take effect.
@YorikSar are you able to check whether this issue still occurs after @evertedsphere's changes? |
Describe the bug
Example in
examples/toolchains/cc
fails if I run it withbazel run --config=nix :hello
:To Reproduce
Expected behavior
We shouldn't expect user to always run examples in nix-shell, but rather they should work with system Bazel and ensure reproducibility with Nix via
rules_nixpkgs
, so this should work the same as innix-shell
environment.Environment
Additional context
It seems examples don't actually use
nixpkgs_config_cc
provided byrules_nixpkgs
, they uselocal_config_cc
instead. It looks like this is because of missing flag--incompatible_enable_cc_toolchain_resolution
in config (see bazelbuild/bazel#7260). We should probably turn it on in examples and test our code outsidenix-shell
as well.The text was updated successfully, but these errors were encountered: