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

[FR]: Add windows support for CLI versions > 5.5.0 #598

Open
RobertDiebels opened this issue Jan 5, 2024 · 7 comments
Open

[FR]: Add windows support for CLI versions > 5.5.0 #598

RobertDiebels opened this issue Jan 5, 2024 · 7 comments
Labels
enhancement New feature or request funding needed Contribute to https://opencollective.com/aspect-build windows Specific to Windows

Comments

@RobertDiebels
Copy link

RobertDiebels commented Jan 5, 2024

What is the current behavior?

According to the docs:
"Windows releases are no longer published as of v5.5.0. This is due to a new dependency on go-tree-sitter which has a CGO dependency that makes cross compiling to Windows difficult."

Describe the feature

I would like to have Windows support for Aspect CLI. I'm trying to build the most recent version of rules_ts and it fails due to a dependency on Aspect CLI.

I've looked in the treesitter-go repository, but there is no open issue that mentions cross-compilation failure. I realize that this an upstream issue, but if you could at least file an issue with them detailing the issue then they can have a look at it.

@RobertDiebels RobertDiebels added the enhancement New feature or request label Jan 5, 2024
@github-actions github-actions bot added the untriaged Requires traige label Jan 5, 2024
@alexeagle alexeagle added windows Specific to Windows and removed untriaged Requires traige labels Mar 27, 2024
@alexeagle
Copy link
Member

Yeah, this is a problem, we haven't had time to dig into it. A bug bounty would be helpful here, since we don't have many Bazel users on Windows asking for it.

@alexeagle alexeagle added the funding needed Contribute to https://opencollective.com/aspect-build label Mar 27, 2024
@RobertDiebels
Copy link
Author

@alexeagle Is there anything I can do to move this along? I'm willing and able to create a PR, I just need a nudge into the right direction, which might undercut the need for funding.

@alexeagle
Copy link
Member

Sure, the hard part is cross-compiling the Go binary including cgo dependencies.
Without that we could try some GHA release automation changes to build the exe on a Windows runner, though process changes are harder to contribute

@RobertDiebels
Copy link
Author

@alexeagle Does Aspect cross-compile the Go binary? Or is this done elsewhere? Could you point me to where this occurs so I can take a look at it?

@alexeagle
Copy link
Member

You can build the //release package, see https://github.com/aspect-build/aspect-cli/blob/main/release/release.bzl#L38

@RobertDiebels
Copy link
Author

@alexeagle Awesome thank you, do you think it would be worth trying to swap out the llvm toolchain for the zig-based hermetic_cc_toolchain from Uber?

Zig isn't as battle-tested as LLVM, but their compiler has CC as a first-class use case and they released version 0.12.0 2 days ago.

I'd like to check with you before I attempt to swap out LLVM to make sure you'd be willing to adopt zig (either partially just for windows, or fully for all binaries) as not to waste time/effort in an attempt.

@alexeagle
Copy link
Member

This repo is synced with our internal monorepo so changing the toolchain is likely breaking for something else, and so this is an area where it's hard for us to accept external contribution.
All things equal I think I'm more comfortable relying on GHA windows machines for releases rather than more complexity in our Bazel toolchain. @gregmagolan WDYT?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request funding needed Contribute to https://opencollective.com/aspect-build windows Specific to Windows
Projects
Status: No status
Development

No branches or pull requests

2 participants