bazel-deps icon indicating copy to clipboard operation
bazel-deps copied to clipboard

Converge on scala_import and java_import

Open gkk-stripe opened this issue 7 years ago • 5 comments

The #101 switches from using scala_library to scala_import for importing external jars. For uniformity, we would like to switch from java_library to java_import too but we decided to hold until java_import stabilizes, see: https://github.com/bazelbuild/bazel/issues/3769

gkk-stripe avatar Jan 02 '18 12:01 gkk-stripe

FWIW, running this on a recent version (sha: f3d20a9c30449f2dcb5b5ea8ce0a76586d9f26a6) produced a 3rd party artifact that produced the following error when trying to build:

ERROR: $MY_PRJOECT/3rdparty/...redacted.../BUILD:1:1: name 'scala_import' is not defined (did you mean 'java_import'?)

I just had to switch the scala_import call to java_import and it worked .

If this isn't related to this issue, I can file a separate ticket.

aaronlevin avatar Jan 16 '18 20:01 aaronlevin

@aaronlevin you need to have scala_import in your prelude or added to the buildHeader like here:

https://github.com/johnynek/bazel-deps/blob/master/dependencies.yaml#L4

johnynek avatar Jan 17 '18 00:01 johnynek

I have a branch that has this working. I'll try to get it cleaned up, passing tests, and in code review next week.

jjudd avatar Apr 20 '18 03:04 jjudd

@jjudd thanks!

johnynek avatar Apr 20 '18 17:04 johnynek

@jjudd how did you go? would love to start using this so I don't have to use transitivity:exports anymore just to make aws sdk dependencies compile.

tekumara avatar Dec 30 '18 02:12 tekumara