-
Notifications
You must be signed in to change notification settings - Fork 281
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure that plus-one-deps from exports of direct deps also propaga…
…te (#764) * PlusOne propagates PlusOne deps of exports * rename of tests * correct test dependency * use scala toolchain to toggle on +1 collection
- Loading branch information
Showing
13 changed files
with
97 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
38 changes: 38 additions & 0 deletions
38
test_expect_failure/plus_one_deps/deps_of_exports/BUILD.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
load("//scala:scala.bzl", "scala_library") | ||
#Make sure that plus-one-deps from exports of direct deps also propagate | ||
|
||
#example with target only in exports | ||
scala_library( | ||
name = "test_target_using_facade", | ||
srcs = ["A.scala"], | ||
deps = [":facade"], | ||
) | ||
scala_library( | ||
name = "facade", | ||
exports = [":direct_dep"] | ||
) | ||
|
||
#example with target in deps & exports | ||
scala_library( | ||
name = "test_target", | ||
srcs = ["A.scala"], | ||
deps = [":direct_dep"], | ||
) | ||
scala_library( | ||
name = "direct_dep", | ||
srcs = ["B.scala"], | ||
deps = [":exported_dep"], | ||
exports = [":exported_dep"], | ||
) | ||
|
||
#common | ||
scala_library( | ||
name = "exported_dep", | ||
srcs = ["C.scala"], | ||
deps = [":plus_one_dep_of_exported"], | ||
) | ||
scala_library( | ||
name = "plus_one_dep_of_exported", | ||
srcs = ["D.scala"], | ||
) | ||
|
File renamed without changes.
File renamed without changes.
21 changes: 0 additions & 21 deletions
21
test_expect_failure/plus_one_deps/exports_deps/BUILD.bazel
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package scalarules.test_expect_failure.plus_one_deps.internal_deps | ||
|
||
class A { | ||
println(new B().hi) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package scalarules.test_expect_failure.plus_one_deps.internal_deps | ||
|
||
class B extends C { | ||
def hi: String = "hi" | ||
} |
22 changes: 22 additions & 0 deletions
22
test_expect_failure/plus_one_deps/exports_of_deps/BUILD.bazel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
load("//scala:scala.bzl", "scala_library") | ||
#Make sure that plus-one-deps exported targets are also propagated (in addition to the plus-one-dep outputs) | ||
scala_library( | ||
name = "test_target", | ||
srcs = ["A.scala"], | ||
deps = [":direct_dep"], | ||
) | ||
scala_library( | ||
name = "direct_dep", | ||
srcs = ["B.scala"], | ||
deps = [":plus_one_dep"], | ||
) | ||
scala_library( | ||
name = "plus_one_dep", | ||
srcs = ["C.scala"], | ||
deps = [":exported_dep"], | ||
exports = ["exported_dep"], | ||
) | ||
scala_library( | ||
name = "exported_dep", | ||
srcs = ["D.scala"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package scalarules.test_expect_failure.plus_one_deps.internal_deps | ||
|
||
class C extends D |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package scalarules.test_expect_failure.plus_one_deps.internal_deps | ||
|
||
class D { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters