Open emaxerrno opened 7 years ago
I tried downgrading and changin the version of the rules to multiple tags, including both release versions but no cigar. Right now i'musing th latest master as you can see.
Just upgraded to bazel 0.6.1 to test it out too.
Here is the error i'm getting.
ERROR: /private/var/tmp/_bazel_agallego/e1cc4c0e84fbdec5856b2432269800cf/external/io_bazel_rules_scala/src/scala/io/bazel/rules_scala/scrooge_support/BUILD:16:1: no such target '//external:io_bazel_rules_scala/dependency/thrift/scrooge_generator': target 'io_bazel_rules_scala/dependency/thrift/scrooge_generator' not declared in package 'external' defined by /Users/agallego/workspace/.../WORKSPACE and referenced by '@io_bazel_rules_scala//src/scala/io/bazel/rules_scala/scrooge_support:focused_zip_importer'.
it says I'll have to have a referenced 'external' on my workspace.
looks like you are not loading the needed jars:
https://github.com/bazelbuild/rules_scala/blob/master/twitter_scrooge/twitter_scrooge.bzl#L10
you need to put twitter_scrooge()
in your workspace. We probably need to improve the documentation.
Send a PR to the README maybe that would have helped you?
by the way, we manually set up the jars when we want to set up other versions.
oh Awesome, still new to bazel. Do i just use your bazel-deps proj on scrooge?
This worked! will submit a PR. though with_finagle=True
fails. Missing dep.
I guess we don't have a test for with_finagle
in the repo. That's a shame.
bazel-deps
is what we use and then use our own bind
statements in the workspace to set up the particular deps instead of twitter_scrooge()
. There are still some rough edges with setup and documentation. Thanks for wading through them.
I've tried a few combinations of the these bazel-deps to get it to compile - at this point, scrooge_generator is generating code as i see compilation errors.
com.twitter:
finatra-thrift:
lang: scala
version: "2.9.0"
finatra-http:
lang: scala
version: "2.9.0"
scrooge-core:
lang: scala
version: "4.20.0"
scrooge-generator:
lang: scala
version: "4.20.0"
finagle-core:
lang: scala
version: "7.1.0"
finagle-stats:
lang: scala
version: "7.1.0"
util-collection:
lang: scala
version: "7.1.0"
util-core:
lang: scala
version: "7.1.0"
bijection-scrooge:
lang: scala
version: "0.9.2"
bind(
name='io_bazel_rules_scala/dependency/thrift/libthrift',
actual='@org_apache_thrift_libthrift//jar')
bind(
name='io_bazel_rules_scala/dependency/thrift/scrooge_core',
actual='@com_twitter_scrooge_core_2_11//jar')
bind(
name='io_bazel_rules_scala/dependency/thrift/scrooge_generator',
actual='@com_twitter_scrooge_generator_2_11//jar')
bind(
name='io_bazel_rules_scala/dependency/thrift/util_core',
actual='@com_twitter_util_core_2_11//jar')
bind(
name='io_bazel_rules_scala/dependency/thrift/util_logging',
actual='@com_twitter_util_logging_2_11//jar')
scrooge_scala_library(
name="test_scrooge",
deps=[
":test_jvm_thrift",
"//3rdparty/jvm/com/twitter:scrooge_core",
"//3rdparty/jvm/com/twitter:finagle_stats",
"//3rdparty/jvm/com/twitter:finagle_core",
"//3rdparty/jvm/com/twitter:finagle_thrift",
"//3rdparty/jvm/com/twitter:util_core"
],
with_finagle=True,
visibility=["//visibility:public"])
It can't find the finagle_stats which is obvi there.
bazel-out/local-fastbuild/bin/concord/thrift/gen_concord/tmp2959407523442130907/.../tf/scheduling/SchedulerService$FinagleService.scala:125: error: not found: type Counter
requestsCounter: Counter,
am I missing a bind ?
Thanks!
so this works.
scrooge_scala_library(
name="xxx_scrooge",
deps=[
":xxxx_dependency_thrift",
"//3rdparty/jvm/com/twitter:scrooge_core",
"//3rdparty/jvm/com/twitter:finagle_thrift",
"//3rdparty/jvm/com/twitter:finagle_zipkin",
"//3rdparty/jvm/com/twitter:finagle_core",
"//3rdparty/jvm/com/twitter:finagle_stats",
"//3rdparty/jvm/com/twitter:finagle_http",
"//3rdparty/jvm/com/twitter:finagle_base_http",
"//3rdparty/jvm/com/twitter:inject_core",
"//3rdparty/jvm/com/twitter:inject_app",
"//3rdparty/jvm/com/twitter:inject_utils",
"//3rdparty/jvm/com/twitter:inject_server",
"//3rdparty/jvm/com/twitter:inject_modules",
"//3rdparty/jvm/com/twitter:inject_thrift",
"//3rdparty/jvm/com/twitter:util_core",
"//3rdparty/jvm/com/twitter:util_app",
"//3rdparty/jvm/com/twitter:util_stats",
"//3rdparty/jvm/org/apache/thrift:libthrift",
],
with_finagle=True,
visibility=["//visibility:public"])
The MAIN caveat was to use libthrift 0.8.0
I'm going to prune deps until it compiles w/ the fewest deps, but wanted to put it here in case is helpful to someone else and while i wait for approval to submit pr from the comany.
Thanks for the updates!
On Wed, Oct 18, 2017 at 6:07 AM, Alexander Gallego <notifications@github.com
wrote:
I'm going to prune deps until it compiles w/ the fewest deps, but wanted to put it here in case is helpful to someone else and while i wait for approval to submit pr from the comany.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bazelbuild/rules_scala/issues/302#issuecomment-337642617, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEJdoxl1mD208MEqD0HysO6pi0zEwHNks5stiIvgaJpZM4P3Q21 .
-- P. Oscar Boykin, Ph.D. | http://twitter.com/posco | http://pobox.com/~boykin
BUILD
WORKSPACE
Errors I'm getting