bazel-contrib / bazel-contrib/rules_scala
'io_bazel_rules_scala/dependency/thrift/scrooge_core' not declared in package 'external'
- Dominant language
- Starlark
- Stars
- 384
- Forks
- 292
- Avg merge
- 2d 22h
- Merged PRs (30d)
- 47
Description
# BUILD
```
load("@io_bazel_rules_scala//thrift:thrift.bzl", "thrift_library")
load("@io_bazel_rules_scala//twitter_scrooge:twitter_scrooge.bzl",
"scrooge_scala_library")
thrift_library(
name="jvm_thrift",
srcs=[
"common.thrift",
....
])
scrooge_scala_library(
name="test_scrooge",
deps=[":jvm_thrift"],
visibility=["//visibility:public"])
```
# WORKSPACE
```
rules_scala_version = "0bac7fe86fdde1cfba3bb2c8a04de5e12de47bcd" # update this as needed
http_archive(
name="io_bazel_rules_scala",
url="https://github.com/bazelbuild/rules_scala/archive/%s.zip" %
rules_scala_version,
type="zip",
strip_prefix="rules_scala-%s" % rules_scala_version)
load("@io_bazel_rules_scala//scala:scala.bzl", "scala_repositories")
scala_repositories()
```
# Errors I'm getting
```
ERROR: /Users/agallego/...../BUILD:19:1: no such target '//external:io_bazel_rules_scala/dependency/thrift/scrooge_core': target 'io_bazel_rules_scala/dependency/thrift/scrooge_core' not declared in package 'external' defined by /Users/agallego/...../WORKSPACE and referenced by '//concord/thrift:test_scrooge'.
```
Contributor guide
Research direction
Start with the BUILD and WORKSPACE snippets, then inspect the thrift.bzl and twitter_scrooge.bzl entry points referenced by the reproducer. Run the shown scrooge_scala_library setup with scala_repositories() and trace why the generated dependency target is not declared under external. Done means the provided example resolves the dependency without the reported Bazel error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- scala
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100