Skip to content

Delete legacy cgo code path#2218

Merged
jayconrod merged 1 commit intobazel-contrib:masterfrom
jayconrod:delete-legacy
Sep 13, 2019
Merged

Delete legacy cgo code path#2218
jayconrod merged 1 commit intobazel-contrib:masterfrom
jayconrod:delete-legacy

Conversation

@jayconrod
Copy link
Copy Markdown
Collaborator

Since the GoCompilePkg action now supports building archives with cgo
code in a single action, there's no need for the legacy cgo path,
which created a nest of rules for each library with cgo = True. This
legacy path has been removed to simplify maintenance.

As a result, setting 'objc = True' is now an error. Objective C files
should either be included in srcs (they can be built with
GoCompilePkg) or extracted into a separate objc_library and listed in
cdeps.

Additionally, the cgo_archives field of GoSource has been removed,
since it's not used by GoCompilePkg.

Updates #2170

Since the GoCompilePkg action now supports building archives with cgo
code in a single action, there's no need for the legacy cgo path,
which created a nest of rules for each library with cgo = True. This
legacy path has been removed to simplify maintenance.

As a result, setting 'objc = True' is now an error. Objective C files
should either be included in srcs (they can be built with
GoCompilePkg) or extracted into a separate objc_library and listed in
cdeps.

Additionally, the cgo_archives field of GoSource has been removed,
since it's not used by GoCompilePkg.

Updates bazel-contrib#2170
@jayconrod jayconrod merged commit d31ac79 into bazel-contrib:master Sep 13, 2019
@jayconrod jayconrod deleted the delete-legacy branch September 13, 2019 18:59
yushan26 pushed a commit to yushan26/rules_go that referenced this pull request Jun 16, 2025
…rib#2218)

This `semver` function may turn out to be useful in validating
the input for the `python.*override` tag classes to be added in
a followup PR. Because this is a refactor of an existing code and
adding tests, I decided to split it out.

For a POC see bazel-contrib#2151, work towards bazel-contrib#2081.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants