theoremlp / rules_multitool

Bazel rules for ergonomic tool definitions
Apache License 2.0
24 stars 5 forks source link

support windows #44

Closed peakschris closed 5 months ago

peakschris commented 5 months ago

I am working on some windows issues for rules_lint, and it seems that one of the challenges is that rules_multitool, used in rules_lint, doesn't support windows, so we can't add dependencies on windows binaries. What would be involved in supporting windows as a platform?

mark-thm commented 5 months ago

we’re not windows users and don’t have windows test environments, so I can’t speak to a full set of things that you’ll run into. At a minimum:

peakschris commented 5 months ago

Thanks! I'll give this a go and create a PR.

this ruleset depends on Bazel’s symlink action, unclear if/how that’s handled on Windows

bazel symlink action works fine if startup --windows_enable_symlink is used. If not, bazel does a copy inside this API. We can require symlinks, I don't know why anyone would not use them in current windows versions.

the cwd targets assume presence of bash, unclear if you’d need a different approach on Windows

We are already dependent on bash for many things, it's hard to run bazel on windows without it. Bash can be a prerequisite.

peakschris commented 5 months ago

I have created https://github.com/theoremlp/rules_multitool/pull/45, I hope this can be considered once I've ironed out the bugs. Any help you can offer in suggesting improvements would be awesome.

mark-thm commented 5 months ago

45 has merged, I'd be grateful if you could take the most recent commit for a spin in a repo of yours somewhere just to validate everything is functional before I cut a full release.

peakschris commented 5 months ago

@mark-thm it's working nicely, thank you again!