Skip to content

scala_maven_import_external and scala_version #546

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

Open
ittaiz opened this issue Jun 28, 2018 · 2 comments
Open

scala_maven_import_external and scala_version #546

ittaiz opened this issue Jun 28, 2018 · 2 comments

Comments

@ittaiz
Copy link
Contributor

ittaiz commented Jun 28, 2018

Thanks to @jhnj's work the scala version story is starting to unfold.
This caused me to think that maybe we want to have scala_maven_import_external allow to specify the scala_version in a different field with semantic meaning.
What I'd really like is to have the macro take the scala_version by itself from someplace. This can't be a label since the macro is used for repository rules but maybe we can do a trick with a file that contains the version somehow.
cc @natansil @anchlovi @or-shachar

@natansil
Copy link
Contributor

maybe it can get it from a toolchain somehow

@jhnj
Copy link
Contributor

jhnj commented Jun 28, 2018

I tried something similar (having a repository macro get scala_version from somewhere):

Use a repository_rule that creates a scala_version.bzl file containing def scala_version(): return "some_version".

However, I didn't get that approach to work as the scala_version.bzl file needs to be loaded and loading happens before it is created by the repository rule.

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