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

go_test: pass cdeps files to linker after split test recompilation #2625

Merged
merged 2 commits into from
Aug 26, 2020

Conversation

jayconrod
Copy link
Contributor

When a test contains both internal and external files, and the
external files indirectly import the library under test, some package
need to be recompiled so that the packages that import the library
under test are compiled with the internal test archive instead. This
was implemented in #2579.

That change caused a regression: the recompiled archives didn't
include input files from cdeps dependencies. This change adds a new
GoArchiveData field to track direct dependencies. That can be used to
rebuild a depset of all the needed files.

Fixes #2622

When a test contains both internal and external files, and the
external files indirectly import the library under test, some package
need to be recompiled so that the packages that import the library
under test are compiled with the internal test archive instead. This
was implemented in bazelbuild#2579.

That change caused a regression: the recompiled archives didn't
include input files from cdeps dependencies. This change adds a new
GoArchiveData field to track direct dependencies. That can be used to
rebuild a depset of all the needed files.

Fixes bazelbuild#2622
@jayconrod jayconrod merged commit 384d290 into bazelbuild:master Aug 26, 2020
@jayconrod jayconrod deleted the fix-test-cgo-link branch August 26, 2020 17:16
jayconrod pushed a commit that referenced this pull request Sep 22, 2020
…2625)

When a test contains both internal and external files, and the
external files indirectly import the library under test, some package
need to be recompiled so that the packages that import the library
under test are compiled with the internal test archive instead. This
was implemented in #2579.

That change caused a regression: the recompiled archives didn't
include input files from cdeps dependencies. This change adds a new
GoArchiveData field to track direct dependencies. That can be used to
rebuild a depset of all the needed files.

Fixes #2622
jayconrod pushed a commit that referenced this pull request Sep 22, 2020
…2625)

When a test contains both internal and external files, and the
external files indirectly import the library under test, some package
need to be recompiled so that the packages that import the library
under test are compiled with the internal test archive instead. This
was implemented in #2579.

That change caused a regression: the recompiled archives didn't
include input files from cdeps dependencies. This change adds a new
GoArchiveData field to track direct dependencies. That can be used to
rebuild a depset of all the needed files.

Fixes #2622
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.

Linker error when recompiling archives with cdeps dependency
2 participants