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

Please constrain the pkg_msi rule to Windows #2

Open
saurabhaditya opened this issue Nov 25, 2020 · 2 comments
Open

Please constrain the pkg_msi rule to Windows #2

saurabhaditya opened this issue Nov 25, 2020 · 2 comments

Comments

@saurabhaditya
Copy link
Contributor

What do you think of this rule to have a constraint to only be built on the platforms it can actually be built in? I believe wix toolset only works on Windows, at least until wixtoolset/issues#4381

pkg_msi = rule(

If I use this rule as is, my build will always fail on a non-Windows build agent.
If you agree we need to do this, then we can figure out how to do this, from the documentation:
https://docs.bazel.build/versions/master/be/platform.html

I guess in the meanwhile a workaround can be to use a build target constraint with target_compatible_with as in the Bazel documentation https://docs.bazel.build/versions/master/platforms.html#skipping-incompatible-targets

@jpieper
Copy link
Member

jpieper commented Nov 25, 2020

Pull requests are welcome, although I don't think target_compatible_with works until bazel 4.0 and I'd prefer to stay compatible with 3.4 for the time being.

In my projects, I construct suitable top level targets for each platform, so instead of doing bazel test //... you do bazel test //:windows

@saurabhaditya
Copy link
Contributor Author

saurabhaditya commented Apr 15, 2021 via email

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

No branches or pull requests

2 participants