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

rules_go broken by Bazel@HEAD because docker env #1669

Closed
hlopko opened this issue Aug 17, 2018 · 3 comments
Closed

rules_go broken by Bazel@HEAD because docker env #1669

hlopko opened this issue Aug 17, 2018 · 3 comments
Assignees

Comments

@hlopko
Copy link
Member

hlopko commented Aug 17, 2018

Hello go team :)

CC @philwo

It seems that this PR bazelbuild/bazel#5721 will break //tests/core/go_path:go_path_test once released. I can cleanly reproduce, buildkite can as well (https://buildkite.com/bazel/bazel-with-downstream-projects-bazel/builds/386#61d56139-a891-4868-b136-e34a6f3f68f3).

Would you mind taking a look, and in case this actually is a bug in Bazel file an issue?

Thank you!

@jayconrod
Copy link
Contributor

I'll take a look at this today. Any special steps to reproduce?

Just from a quick look at the logs, it seems that we're getting a symlink but we expect a regular file. This would be inside a directory output; my understanding is that the action that produces the directory has control over the file content and metadata within it. Is that changing?

What's the story with the docker env?

@jayconrod
Copy link
Contributor

@mhlopko I've reproduced this. There's an observable change in Bazel behavior. Not sure if it's a bug or an intentional difference.

Here's a minimal gist that reproduces the problem. In this gist, a Skylark rule declares a directory output and executes a script that populates it with two files: an empty regular file, and a symlink to that file. A separate test checks that the file is a regular file, but it's actually a symlink now.

The go_path rule is a fancier version of this. It creates a directory of source files, and it allows users to specify a mode which may be "copy", "link", or "archive". With this change in behavior, I don't think it will be possible to implement the "copy" mode. That said, I don't expect this will break tools that use go_path, but it's hard to be sure.

@jayconrod
Copy link
Contributor

Closing the issue here because I think this is a regression in Bazel. Opened bazelbuild/bazel#5971 to track this.

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

No branches or pull requests

3 participants