Skip to content

Conversation

@fmeum
Copy link
Contributor

@fmeum fmeum commented Jun 11, 2024


Changes are visible to end-users: yes/no

  • Searched for relevant documentation and updated as needed: yes/no
  • Breaking change (forces users to change their own code or config): yes/no
  • Suggested release notes appear below: yes/no

Test plan

  • Covered by existing test cases
  • New test cases added
  • Manual testing; please provide instructions so we can reproduce:

Copy link
Member

@alexeagle alexeagle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thanks!

Is there any consequence for compiling the stdlib without cgo support? Is it possible to change it in rules_go instead to be "pure" so it doesn't attempt to use a cc toolchain?

(makes me wonder if --host_platform be renamed --exec_platform to match how the cfg attribute on rule declaration is changing...)

@fmeum
Copy link
Contributor Author

fmeum commented Jun 11, 2024

Is there any consequence for compiling the stdlib without cgo support? Is it possible to change it in rules_go instead to be "pure" so it doesn't attempt to use a cc toolchain?

The non-Bazel Go toolchain also uses CGo on Linux if available and we wouldn't want to deviate from that. The differences are minor, but do affect subtle things like DNS resolution.

(makes me wonder if --host_platform be renamed --exec_platform to match how the cfg attribute on rule declaration is changing...)

I think it's named appropriately in this case as it really is the platform of the machine running bazel. Everything else should go into --extra_execution_platforms.

@alexeagle
Copy link
Member

Nice thanks for answering :)

@alexeagle alexeagle merged commit 24a27d4 into aspect-build:go Jun 11, 2024
alexeagle pushed a commit that referenced this pull request Jun 11, 2024
alexeagle pushed a commit that referenced this pull request Jun 11, 2024
alexeagle added a commit that referenced this pull request Jun 11, 2024
* chore: ensure we don't try to compile any C++ code

We don't have any C++ code in this repo, and want to make sure that our examples don't transitively depend on building protoc from source.

* Update MODULE.bazel

Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>

* Disable CGo (#17)

* chore: buildifier

---------

Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
@fmeum fmeum deleted the go branch June 11, 2024 21:15
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

Successfully merging this pull request may close these issues.

2 participants