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

Fail to generate BUILD files for gitea #2048

Closed
qzmfranklin opened this issue May 8, 2019 · 2 comments
Closed

Fail to generate BUILD files for gitea #2048

qzmfranklin opened this issue May 8, 2019 · 2 comments

Comments

@qzmfranklin
Copy link

qzmfranklin commented May 8, 2019

What version of rules_go are you using?

0.18.3

What version of gazelle are you using?

44ce230

What version of Bazel are you using?

0.24.1

Does this issue reproduce with the latest releases of all the above?

YES

What operating system and processor architecture are you using?

Ubuntu 18.04.1
Intel i7-8770k

Any other potentially useful information about your toolchain?

Nope

What did you do?

Put the following in WORKSPACE:

    go_repository(
        name = 'com_github_go_gitea_gitea',
        strip_prefix = r'''gitea''',
        urls = ['https://github.com/go-gitea/gitea/archive/v1.8.0.tar.gz'],
        importpath = r'''github.com/go-gitea/gitea''',
    )

(and a lot of other dependencies for building gitea, omitted here)

Then try building it with

bazel build @com_github_go_gitea_gitea//cmd

It yields the following errors:

INFO: Repository 'com_github_go_gitea_gitea' used the following cache hits instead of downloading the corresponding file.
 * Hash 'e4fcd167e9713f487a7e8278b6d04b587a5ec942b9fc531bb9d14e3b48e3fd1c' for http://git.corp.logiocean.com:3000/go-gitea/gitea/archive/v1.8.0.tar.gz
If the definition of 'com_github_go_gitea_gitea' was updated, verify that the hashes were also updated.
ERROR: Skipping '@com_github_go_gitea_gitea//cmd': no such package '@com_github_go_gitea_gitea//cmd': Malformed input or input contains unmappable characters: /home/zhongming/.cache/bazel/_bazel_zhongming/2aea414f4d422ad78870bb37da8563ec/external/com_github_go_gitea_gitea/integrations/gitea-repositories-meta/user2/utf8.git/refs/heads/Grüßen
WARNING: Target pattern parsing failed.
ERROR: no such package '@com_github_go_gitea_gitea//cmd': Malformed input or input contains unmappable characters: /home/zhongming/.cache/bazel/_bazel_zhongming/2aea414f4d422ad78870bb37da8563ec/external/com_github_go_gitea_gitea/integrations/gitea-repositories-meta/user2/utf8.git/refs/heads/Grüßen
INFO: Elapsed time: 1.386s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)

Admittedly, the file names that caused the errors are non-ascii. But somehow I still want to build gitea with Bazel. Help is appreciated!

@jayconrod
Copy link
Contributor

I think the root cause of this is bazelbuild/bazel#7055. I don't think that fix is in Bazel 0.24.1, but it might be in 0.25.0. Does upgrading to 0.25.0 solve your problem? If not, does Bazel built at master work?

@qzmfranklin
Copy link
Author

@jayconrod
Thanks for the info!

I tried 0.25. But it fails the build in too many other places. I cannot even reach the point of failure mentioned in this issue easily.

Seeing how much 0.25 broke, I believe it will take some time for my team will move to 0.25. Will get back to this issue when we get there.

Thanks again. Will keep an eye out for 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

2 participants