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

Build changes needed to support Go 1.12 #1896

Closed
4 of 6 tasks
jayconrod opened this issue Jan 10, 2019 · 2 comments
Closed
4 of 6 tasks

Build changes needed to support Go 1.12 #1896

jayconrod opened this issue Jan 10, 2019 · 2 comments

Comments

@jayconrod
Copy link
Contributor

jayconrod commented Jan 10, 2019

This is a catch-all issue for 1.12 related changes.

  • Deprecate go_vet_test and direct usage of vet in nogo because go tool vet no longer works. nogo(vet = True) should use the analysis framework instead of invoking vet.
  • Generate symabis files for packages with assembly. The assembler now requires this.
  • Ensure cgo .o files in archives don't have their extensions truncated. The linker will no longer blindly link files.
  • Create a cache directory and set GOCACHE when building the standard library.
  • Update to a newer Gazelle that can build fetch_repo and gazelle correctly (needed for tests).
  • Fix or disable tests that rely on removed features.
jayconrod pushed a commit to jayconrod/rules_go that referenced this issue Jan 10, 2019
nogo no longer invokes vet at all. Setting 'vet = True' is handled by
a wrapper, which adds the equivalent libraries from
@org_golang_x_tools//go/analysis/passes.

'vet = True' was originally needed before the vet analyses had been
migrated to the analysis framework. There is no need for it anymore,
and the command line interface for vet is changing in Go 1.12.

Updates bazelbuild#1896
Fixes bazelbuild#1800
jayconrod pushed a commit to jayconrod/rules_go that referenced this issue Jan 10, 2019
Go 1.12 requires the assembler to generate a symabis file, which is
passed to the compiler. The compile action will now do this when there
are assembly sources.

In the future, we'll combine GoCompile, GoAsm, and other actions into
a single GoCompile action per package. Because of this plan,
generating the symabis file is not a separate action.

Updates bazelbuild#1896
jayconrod pushed a commit to jayconrod/rules_go that referenced this issue Jan 10, 2019
The .a format limits file names to 16 characters. There are various
extensions to this format which support longer names, but Go doesn't
recognize them and generally doesn't need them. Before Go 1.12, the
linker passed all extra files (other than the compiled Go code and the
export data) to the external link.

In Go 1.12, the linker only passes on .o files. The GoPack action
simply truncated long file names, which meant .o files were sometimes
ignored. GoPack will now preserve file extensions.

Updates bazelbuild#1896
jayconrod pushed a commit to jayconrod/rules_go that referenced this issue Jan 10, 2019
A GOCACHE directory is required by 'go build', starting in Go
1.12. Normally the location is inferred from HOME or other environment
variables, but there's aren't set in the Bazel sandbox. To build the
standard library, we create a temporary cache that is deleted at the
end of the GoStdLib action.

Updates bazelbuild#1896
jayconrod added a commit that referenced this issue Jan 11, 2019
nogo no longer invokes vet at all. Setting 'vet = True' is handled by
a wrapper, which adds the equivalent libraries from
@org_golang_x_tools//go/analysis/passes.

'vet = True' was originally needed before the vet analyses had been
migrated to the analysis framework. There is no need for it anymore,
and the command line interface for vet is changing in Go 1.12.

Updates #1896
Fixes #1800
jayconrod added a commit that referenced this issue Jan 11, 2019
Go 1.12 requires the assembler to generate a symabis file, which is
passed to the compiler. The compile action will now do this when there
are assembly sources.

In the future, we'll combine GoCompile, GoAsm, and other actions into
a single GoCompile action per package. Because of this plan,
generating the symabis file is not a separate action.

Updates #1896
jayconrod added a commit that referenced this issue Jan 11, 2019
The .a format limits file names to 16 characters. There are various
extensions to this format which support longer names, but Go doesn't
recognize them and generally doesn't need them. Before Go 1.12, the
linker passed all extra files (other than the compiled Go code and the
export data) to the external link.

In Go 1.12, the linker only passes on .o files. The GoPack action
simply truncated long file names, which meant .o files were sometimes
ignored. GoPack will now preserve file extensions.

Updates #1896
jayconrod added a commit that referenced this issue Jan 11, 2019
A GOCACHE directory is required by 'go build', starting in Go
1.12. Normally the location is inferred from HOME or other environment
variables, but there's aren't set in the Bazel sandbox. To build the
standard library, we create a temporary cache that is deleted at the
end of the GoStdLib action.

Updates #1896
jayconrod pushed a commit to jayconrod/rules_go that referenced this issue Jan 11, 2019
Needed for go_repository that sets GOCACHE correctly, which is needed
for Go 1.12.

Updates bazelbuild#1896
jayconrod added a commit that referenced this issue Jan 15, 2019
Needed for go_repository that sets GOCACHE correctly, which is needed
for Go 1.12.

Updates #1896
jayconrod added a commit that referenced this issue Jan 19, 2019
Go 1.12 requires the assembler to generate a symabis file, which is
passed to the compiler. The compile action will now do this when there
are assembly sources.

In the future, we'll combine GoCompile, GoAsm, and other actions into
a single GoCompile action per package. Because of this plan,
generating the symabis file is not a separate action.

Updates #1896
jayconrod added a commit that referenced this issue Jan 19, 2019
The .a format limits file names to 16 characters. There are various
extensions to this format which support longer names, but Go doesn't
recognize them and generally doesn't need them. Before Go 1.12, the
linker passed all extra files (other than the compiled Go code and the
export data) to the external link.

In Go 1.12, the linker only passes on .o files. The GoPack action
simply truncated long file names, which meant .o files were sometimes
ignored. GoPack will now preserve file extensions.

Updates #1896
jayconrod added a commit that referenced this issue Jan 19, 2019
A GOCACHE directory is required by 'go build', starting in Go
1.12. Normally the location is inferred from HOME or other environment
variables, but there's aren't set in the Bazel sandbox. To build the
standard library, we create a temporary cache that is deleted at the
end of the GoStdLib action.

Updates #1896
jayconrod added a commit that referenced this issue Jan 19, 2019
Needed for go_repository that sets GOCACHE correctly, which is needed
for Go 1.12.

Updates #1896
@robfig
Copy link
Contributor

robfig commented Sep 24, 2021

@jayconrod good to close this out?

@jayconrod
Copy link
Contributor Author

Yep this can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants