-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
external/local_jdk/bin/java: No such file or directory #1116
Comments
I'm not sure how this worked before, as it looks like it needs java as a runfile but kythe.bzl only declares javac and jar as attributes. I'm working on reproducing. |
I believe the runfiles for the executable should contain the java binary and the runfiles should be included in the |
The problem is the path in the runfiles. Are you switching between Bazel Doing a On Mon, Apr 4, 2016 at 11:06 PM Cody Schroeder notifications@github.com
|
The last good version that I was using is I can confirm that after doing a |
Ah, looks like the Should that be part of the |
I don't see the Xbootclasspath in the command line and I can't find it in the source code. |
Oops missing the end: Where do you find it? |
It's part of the |
It also fails if I change it to use "$(location //third_party/java/jdk/langtools:javac_jar)" rather than the hard-coded path as location fails to include the repository name prefix. |
oh I see, no the workspace name should not be part of the JAVA_RUNFILES We need to think of a way to fix that correctly (so it works with bazel On Tue, Apr 5, 2016 at 5:40 PM Cody Schroeder notifications@github.com
|
I wasn't necessarily advocating for it to be part of $JAVA_RUNFILES, but it would be nice to be able to easily form workspace/repository name agnostic paths to targets that worked reliably. I'd say it works 95% of the time now, which is occasionally frustrating. Ideally, we'd be able to support both @Head and the latest release, but as that doesn't seem feasible for the near future I would like to be able to build Kythe using the latest release, barring requirements for bugfixes, etc. that necessitate using a development version of Bazel. I would strongly like Kythe releases to be buildable with most recent Bazel release at the time the Kythe release is cut. |
I understand. Well the location way should work since a long time so for this case we should not have any problem. The correct way should be On ci.bazel.io we test for Bazel HEAD and latest release (but not earlier release, when we reach 1.0, we might start doing more). However that's another discussion, we should continue it on bazelbuild/continuous-integration#4. |
what about On Tue, Apr 5, 2016 at 10:31 PM Shahms King notifications@github.com
|
That, too, requires including the main workspace name before the path and after JAVA_RUNFILES and that only fixes the issue for the one script. Given how many scripts we have which assume either an empty workspace or that the workspace name is omitted from the path, the only viable fix for now is to simply remove the name :-( As a separate issue, we need to clean up how we're referencing the |
We should also provide a way to build the runfiles path correctly I agree. |
I just double checked and it does not contain the correct path, e.g. WORKSPACE:
bazel-out/local_linux-fastbuild/bin/kythe/java/com/google/devtools/kythe/extractors/java/standalone/javac_extractor:
and the test Cody mentioned earlier fails with the RELEASE_9 error. Happy to file a separate bug, if you'd like. |
After thinking a bit it's logical the execroot should be inside the workspace name, Can you try to replace the jvm_flags with |
That also fails. |
@kchodorow do you have anymore idea? |
Looking at the rule which defines the test, it does a (likely ill-advised) |
We want to baseline a new release candidate ASAP, this is the only block that I know of for it. We should not breakage Kythe with the next release. |
@shahms is it still an issue or do you have a workaround? |
I have a worked around this by including the workspace name in the path. While a more general workspace-agnostic runfiles path solution would be nice, I don't think it's a blocker. |
Not sure if this should be a separate bug or not, but in attempting to re-set the workspace name I discovered that on OS X runfiles does not include the workspace name, but on Linux it does. For now, I can add both paths to the bootclasspath but that's a dirty hack. I'm happy to file a separate bug for this, if so desired. |
…directory This also sets the Bazel workspace name to io_bazel_source. Fixes #848. Relevant to #1116, #1124, RELNOTES[INC]: All repositories are now directly under the x.runfiles directory in the runfiles tree (previously, external repositories were at x.runfiles/main-repo/external/other-repo. This simplifies handling remote repository runfiles considerably, but will break existing references to external repository runfiles. --- Furthermore, if a Bazel project does not provide a workspace name in the WORKSPACE file, Bazel will now default to using __main__ as the workspace name (instead of "", as previously). The repository's runfiles will appear under x.runfiles/__main__/. -- MOS_MIGRATED_REVID=120224534
*** Reason for rollback *** Broke non-Bazel projects on ci.bazel.io Fixes #1168 *** Original change description *** Move the runfiles for external repositories to under the x.runfiles/ directory This also sets the Bazel workspace name to io_bazel_source. Fixes #848. Relevant to #1116, #1124, RELNOTES[INC]: All repositories are now directly under the x.runfiles directory in the runfiles tree (previously, external repositories were at x.runfiles/main-repo/external/other-repo. This simplifies handling remote repository runfiles considerably, but will break existing references to external repository runfiles.... *** -- MOS_MIGRATED_REVID=120535721
This should work in 0.3.0. |
Commit 3f29d42 seems to break one of Kythe's custom Skylark rules. The rule tries to run a Bazel-built Java executable but cannot find the
java
binary in its runfiles. The error looks similiar to the snippet below.Skylark rule impl: https://github.com/google/kythe/blob/1a8f55a12d6/tools/build_rules/kythe.bzl#L59
Test target: https://github.com/google/kythe/blob/1a8f55a12d6/kythe/javatests/com/google/devtools/kythe/analyzers/java/testdata/pkg/BUILD#L73
Bazel command:
bazel test //kythe/javatests/com/google/devtools/kythe/analyzers/java/testdata/pkg:files_tests
The text was updated successfully, but these errors were encountered: