Skip to content

builder: support appending to non-existant archive#2767

Merged
jayconrod merged 1 commit intobazel-contrib:masterfrom
jayconrod:fix-export
Dec 22, 2020
Merged

builder: support appending to non-existant archive#2767
jayconrod merged 1 commit intobazel-contrib:masterfrom
jayconrod:fix-export

Conversation

@jayconrod
Copy link
Copy Markdown
Collaborator

In Go 1.16, 'go tool pack r' reports an error if the archive doesn't
already exist (arguably a bug). The builder relied on this behavior
(arguably also a bug).

The builder will now create an empty archive before calling
'go tool pack r'. Note that 'go tool pack c' has some extra
functionality (copying export data) beyond creating the archive, so we
can't use that directly.

Fixes #2762

In Go 1.16, 'go tool pack r' reports an error if the archive doesn't
already exist (arguably a bug). The builder relied on this behavior
(arguably also a bug).

The builder will now create an empty archive before calling
'go tool pack r'. Note that 'go tool pack c' has some extra
functionality (copying export data) beyond creating the archive, so we
can't use that directly.

Fixes bazel-contrib#2762
@google-cla google-cla bot added the cla: yes label Dec 22, 2020
@jayconrod jayconrod merged commit 3e4f1b4 into bazel-contrib:master Dec 22, 2020
@jayconrod jayconrod deleted the fix-export branch December 22, 2020 18:22
jayconrod pushed a commit that referenced this pull request Dec 23, 2020
In Go 1.16, 'go tool pack r' reports an error if the archive doesn't
already exist (arguably a bug). The builder relied on this behavior
(arguably also a bug).

The builder will now create an empty archive before calling
'go tool pack r'. Note that 'go tool pack c' has some extra
functionality (copying export data) beyond creating the archive, so we
can't use that directly.

Fixes #2762
jayconrod pushed a commit that referenced this pull request Dec 23, 2020
In Go 1.16, 'go tool pack r' reports an error if the archive doesn't
already exist (arguably a bug). The builder relied on this behavior
(arguably also a bug).

The builder will now create an empty archive before calling
'go tool pack r'. Note that 'go tool pack c' has some extra
functionality (copying export data) beyond creating the archive, so we
can't use that directly.

Fixes #2762
yushan26 pushed a commit to yushan26/rules_go that referenced this pull request Jun 16, 2025
These are just bugfixes to already merged code:
* Fix nested bracket parsing in PEP508 marker parser.
* Fix the sys_platform constants, which I noticed in bazel-contrib#2629 but they got
  also pointed out in bazel-contrib#2766.
* Port some of python tests for requirement parsing and improve the
  implementation. Those tests will be removed in bazel-contrib#2629.
* Move the platform related code to a separate file.
* Rename `pep508_req.bzl` to `pep508_requirement.bzl` to follow the
  convention.


All of the bug fixes have added tests.

Work towards bazel-contrib#2423.
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.

GoCompilePkg: pack: open hello.x: no such file or directory

1 participant