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

increase the use of scala_toolchain #530

Closed
wants to merge 4 commits into from
Closed

Conversation

johnynek
Copy link
Member

closes #380 related to #170

@ittaiz @ianoc-stripe please take a look.

I will test our largest repo with this build to make sure it doesn't fail when used as an external repo (which I think happened before).

TODO (maybe not in this PR): we should not use private attributes, I don't think, to get the java toolchain, instead, we should use ctx.toolchains[...] inside the rule, but I don't know the toolchain type to put there. I asked this question:

https://stackoverflow.com/questions/50977784/how-to-resolve-the-java-toolchain-in-bazel

cc @katre if you know the answer to how to get the java toolchain.

@johnynek
Copy link
Member Author

getting

Cannot locate runfiles directory. (Set $JAVA_RUNFILES to inhibit searching.)

killing all the builds on the bazel CI. So, something is not right....

This passes locally, so it seems like something with remote execution.

@johnynek
Copy link
Member Author

I can repro the failure after a bazel clean on bazel 0.14.1. So, that's not great that it passed before I did the clean.

@johnynek
Copy link
Member Author

So, @katre is there any issue with using a label in the current repo in the rules? The toolchain is run in the workspace, but it is pointing to a label, so, I wonder if that's the issue.

If it is not okay, it seems like it should error when the WORKSPACE is parsed and we evaluate the toolchain rule and see the defaults.

I wonder if a work around would be more nesting: make an external repo that only holds the java rule which runs the scala compiler. That is bad for usability though.

It would be really nice to finally solve this issue.

@johnynek
Copy link
Member Author

Well, it failed again.... ugh... It is always some kind of experimental project for me trying to decode how this stuff works. Now we have location failing to give a value for //external:io_bazel_rules_scala/dependency/scala/scala_library.

It is interesting to note that go does not put any labels in their toolchain. I wonder if that is a hint that it doesn't work, is an untried pattern, or what.

It would be really nice to have it fail at load if you do something that is not supported. It's very expensive in terms of engineer time to try to make progress on this stuff.

@johnynek
Copy link
Member Author

johnynek commented Aug 6, 2018

superseded by #544

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.

extend scala_toolchain to include the scala-sdk
2 participants