keith / buildifier-prebuilt

A bazel toolchain for using prebuilt binaries for buildifier and buildozer
MIT License
35 stars 13 forks source link

buildifier rule does not build on windows #68

Closed jbedard closed 1 year ago

jbedard commented 1 year ago

Due to no windows toolchain existing? I think it should at least build even if it fails to run, otherwise it must be marked as manual to avoid even building it by default (but then it's of course manual for all platforms).

Ideally something such as target_compatible_with should be used, however that doesn't stop the toolchains from being downloaded so won't work with the usage of toolchains like today (6.1.0).

keith commented 1 year ago

I don't have a windows machine to test with but definitely happy to take PRs to make this nicer

jbedard commented 1 year ago

For now I've just tagged it as manual and probably won't put anymore time into it right now. If the issue comes up again maybe I'll give it a shot 👍

alexeagle commented 1 year ago

If the Bazel team would just give any rule author a Windows VM on GCP that works - half of the Bazel windows problems might get solved 😓

GZGavinZhao commented 1 year ago

Initial support for Windows has been merged. Currently exclude_patterns are not supported (they just get ignored). Integration tests are failing likely because of Bazel-in-Bazel weirdness, but I ran the rule on my own projects and the rule works fine. Please report back if it's not working for your project! I deliberately made it so that one doesn't need to enable runfiles on Windows, so if the rule fails for you without specifying --enable_runfiles please also let me know!