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

new_git_repository unable to handle Unicode characters in paths #551

Closed
durandj opened this issue Nov 2, 2015 · 3 comments
Closed

new_git_repository unable to handle Unicode characters in paths #551

durandj opened this issue Nov 2, 2015 · 3 comments
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) type: bug under investigation

Comments

@durandj
Copy link

durandj commented Nov 2, 2015

I tried to create a build rule for handling Boost.Preprocessor but when trying to utilize the rule I get the following exception:

Unhandled exception thrown during build; message: Unrecoverable error while evaluating node 'GIT_CLONE:https://github.com/boostorg/preprocessor.git -> /home/james/.cache/bazel/_bazel_james/35f4928b0ffdaf6f2fdaf37506ac8ad6/external/boost_preprocessor (tags/boost-1.59.0) submodules: false' (requested by nodes 'NEW_GIT_REPOSITORY:@boost_preprocessor')
INFO: Elapsed time: 4.865s
java.lang.RuntimeException: Unrecoverable error while evaluating node 'GIT_CLONE:https://github.com/boostorg/preprocessor.git -> /home/james/.cache/bazel/_bazel_james/35f4928b0ffdaf6f2fdaf37506ac8ad6/external/boost_preprocessor (tags/boost-1.59.0) submodules: false' (requested by nodes 'NEW_GIT_REPOSITORY:@boost_preprocessor')
        at com.google.devtools.build.skyframe.ParallelEvaluator$Evaluate.run(ParallelEvaluator.java:927)
        at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$2.run(AbstractQueueVisitor.java:508)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: /home/james/.cache/bazel/_bazel_james/35f4928b0ffdaf6f2fdaf37506ac8ad6/external/boost_preprocessor/doc/._Appendix A � An Introduction to Preprocessor Metaprogramming.html7647594723395082750.tmp
        at sun.nio.fs.UnixPath.encode(UnixPath.java:147)
        at sun.nio.fs.UnixPath.<init>(UnixPath.java:71)
        at sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:281)
        at java.io.File.toPath(File.java:2234)
        at org.eclipse.jgit.util.FileUtil.isFile(FileUtil.java:201)
        at org.eclipse.jgit.util.FileUtil.canExecute(FileUtil.java:210)
        at org.eclipse.jgit.util.FS_POSIX.canExecute(FS_POSIX.java:171)
        at org.eclipse.jgit.dircache.DirCacheCheckout.checkoutEntry(DirCacheCheckout.java:1181)
        at org.eclipse.jgit.dircache.DirCacheCheckout.doCheckout(DirCacheCheckout.java:450)
        at org.eclipse.jgit.dircache.DirCacheCheckout.checkout(DirCacheCheckout.java:396)
        at org.eclipse.jgit.api.CheckoutCommand.call(CheckoutCommand.java:263)
        at com.google.devtools.build.lib.bazel.repository.GitCloneFunction.compute(GitCloneFunction.java:131)
        at com.google.devtools.build.skyframe.ParallelEvaluator$Evaluate.run(ParallelEvaluator.java:891)
        ... 4 more

My WORKSPACE file contains the following entry for Boost.

new_git_repository(
        name       = "boost_preprocessor",
        build_file = "boost_preprocessor.BUILD",
        remote     = "https://github.com/boostorg/preprocessor.git",
        tag        = "boost-1.59.0",
)

Finally, my build file for the external repository is:

cc_library(
        name       = "boost_preprocessor",
        hdrs       = glob(["include/**/*.h"]),
        visibility = "//visiblity:public",
)

As far as I can tell, its because of the special character in that one file.

@kchodorow
Copy link
Contributor

Yes, unfortunately you're correct. This is kind of a dup of #374, but bazel shouldn't be crashing, so leaving this open to fix that.

@damienmg damienmg added type: feature request P3 We're not considering working on this, but happy to review a PR. (No assignee) external repositories type: bug and removed type: feature request labels Nov 17, 2015
kchodorow added a commit that referenced this issue Dec 11, 2015
Fixes #650, #551, and the stack trace parts of #625 and #330.

--
MOS_MIGRATED_REVID=109925156
@kchodorow
Copy link
Contributor

I actually can't reproduce this now, is this still happening for you?

@durandj
Copy link
Author

durandj commented Jun 15, 2016

Nope! Commit 9848461 seems to have addressed this on my system. Thanks :)
On Jun 15, 2016 9:12 AM, "Kristina" [email protected] wrote:

I actually can't reproduce this now, is this still happening for you?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#551 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AGpPjgu1BAHmvcKVwlxYy6hzcg0KX0Apks5qMAhLgaJpZM4GacBw
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) type: bug under investigation
Projects
None yet
Development

No branches or pull requests

3 participants