Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ struct Struct1 {
# which was moved between jdk8 and jdk11. So having this union is important for
# testing jdk11, which requires the shims in javax.annotation:javax.annotation-api:1.3.2
# to compile.
union Union {
union Union1 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With the newer version of scrooge-generator, a name clash occurs.
I got the error running bazel test test/src/main/scala/scalarules/test/twitter_scrooge/...:

ERROR: /Users/etyurina/workspace/rules_scala_fork/test/src/main/scala/scalarules/test/twitter_scrooge/thrift/BUILD:3:15: scala //test/src/main/scala/scalarules/test/twitter_scrooge/thrift:thrift failed (Exit 1)
bazel-out/darwin-fastbuild/bin/test/src/main/scala/scalarules/test/twitter_scrooge/thrift/tmp4946029676322863219/scalarules/test/twitter_scrooge/thrift/Union.scala:85: error: value Struct1 is not a member of org.apache.thrift.protocol.TStruct
          _result = Union.Struct1({
                          ^
one error found

The generated file is here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got you. Next time I think there's value in either adding a comment or better yet making the rename more explicit (maybe unionWhichIsntReservedWord or something).Thanks for the contribution!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @ittaiz
Will comment or give a better naming next time 🙂

Thank you for the help and review @ittaiz, @liucijus!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your time and effort! We definitely need an active thrift scrooge champion around here :)

1: Struct1 struct1
}
Binary file not shown.
24 changes: 12 additions & 12 deletions test_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,33 +76,33 @@ test_twitter_scrooge_versions() {
},\
}'

local TWITTER_SCROOGE_ARTIFACTS_20_5_0='twitter_scrooge_artifacts={ \
local TWITTER_SCROOGE_ARTIFACTS_20_9_0='twitter_scrooge_artifacts={ \
"io_bazel_rules_scala_scrooge_core": {\
"artifact": "com.twitter:scrooge-core_2.11:20.5.0",\
"sha256": "b1aa0f3b9f10287644f1edc47b79a67b287656d97fbd157a806d69c82b27e21d",\
"artifact": "com.twitter:scrooge-core_2.11:20.9.0",\
"sha256": "de21b01d356bfcae4d184ed877dac21753ae9c29e11d934f007789ec7b07961f",\
},\
"io_bazel_rules_scala_scrooge_generator": {\
"artifact": "com.twitter:scrooge-generator_2.11:20.5.0",\
"sha256": "a4cf7dd773e8c2ee0ccad52be1ebd4ae8a9defcbc9be28e370e44a46a34a005a",\
"artifact": "com.twitter:scrooge-generator_2.11:20.9.0",\
"sha256": "1b027bb10604d34b0790a4936d9b5c95bf0a0ccac522521d9c7e898b87d16c79",\
"runtime_deps": [\
"@io_bazel_rules_scala_guava",\
"@io_bazel_rules_scala_mustache",\
],\
},\
"io_bazel_rules_scala_util_core": {\
"artifact": "com.twitter:util-core_2.11:20.5.0",\
"sha256": "253cc631d3766e978bafd60dcee6976f7cf46d80106882c7b55b969ab14e3d7c",\
"artifact": "com.twitter:util-core_2.11:20.9.0",\
"sha256": "59955ecc258bcdd5de0199e289548717a794c7a1020f34ebef69a5f2cb36e127",\
},\
"io_bazel_rules_scala_util_logging": {\
"artifact": "com.twitter:util-logging_2.11:20.5.0",\
"sha256": "77782dad82e4066a2b8aa1aa6c07c8c2d111f65365833a88592e303464a98654",\
"artifact": "com.twitter:util-logging_2.11:20.9.0",\
"sha256": "32afd3278232cf504e77a7833eef812bb4e2ae16f6f524910896cf844e223eef",\
},\
}'

if [ "18.6.0" = $version_under_test ]; then
TWITTER_SCROOGE_ARTIFACTS=$TWITTER_SCROOGE_ARTIFACTS_18_6_0
elif [ "20.5.0" = $version_under_test ]; then
TWITTER_SCROOGE_ARTIFACTS=$TWITTER_SCROOGE_ARTIFACTS_20_5_0
elif [ "20.9.0" = $version_under_test ]; then
TWITTER_SCROOGE_ARTIFACTS=$TWITTER_SCROOGE_ARTIFACTS_20_9_0
else
echo "Unknown Twitter Scrooge version given $version_under_test"
fi
Expand All @@ -125,4 +125,4 @@ TEST_TIMEOUT=15 $runner test_scala_version "${scala_2_11_version}"
TEST_TIMEOUT=15 $runner test_scala_version "${scala_2_12_version}"

TEST_TIMEOUT=15 $runner test_twitter_scrooge_versions "18.6.0"
TEST_TIMEOUT=15 $runner test_twitter_scrooge_versions "20.5.0"
TEST_TIMEOUT=15 $runner test_twitter_scrooge_versions "20.9.0"
Binary file not shown.
24 changes: 12 additions & 12 deletions third_party/repositories/scala_2_11.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ artifacts = {
"sha256": "767e11f33eddcd506980f0ff213f9d553a6a21802e3be1330345f62f7ee3d50f",
},
"io_bazel_rules_scala_scala_parser_combinators": {
"artifact": "org.scala-lang.modules:scala-parser-combinators_2.11:1.0.4",
"sha256": "0dfaafce29a9a245b0a9180ec2c1073d2bd8f0330f03a9f1f6a74d1bc83f62d6",
"artifact": "org.scala-lang.modules:scala-parser-combinators_2.11:1.1.2",
"sha256": "3e0889e95f5324da6420461f7147cb508241ed957ac5cfedc25eef19c5448f26",
},
"org_scalameta_common": {
"artifact": "org.scalameta:common_2.11:4.3.0",
Expand Down Expand Up @@ -386,28 +386,28 @@ artifacts = {
"sha256": "972139718abc8a4893fa78cba8cf7b2c903f35c97aaf44fa3031b0669948b480",
},
"libthrift": {
"artifact": "org.apache.thrift:libthrift:0.8.0",
"sha256": "adea029247c3f16e55e29c1708b897812fd1fe335ac55fe3903e5d2f428ef4b3",
"artifact": "org.apache.thrift:libthrift:0.10.0",
"sha256": "8591718c1884ac8001b4c5ca80f349c0a6deec691de0af720c5e3bc3a581dada",
},
"io_bazel_rules_scala_scrooge_core": {
"artifact": "com.twitter:scrooge-core_2.11:18.6.0",
"sha256": "00351f73b555d61cfe7320ef3b1367a9641e694cfb8dfa8a733cfcf49df872e8",
"artifact": "com.twitter:scrooge-core_2.11:20.9.0",
"sha256": "de21b01d356bfcae4d184ed877dac21753ae9c29e11d934f007789ec7b07961f",
},
"io_bazel_rules_scala_scrooge_generator": {
"artifact": "com.twitter:scrooge-generator_2.11:18.6.0",
"sha256": "0f0027e815e67985895a6f3caa137f02366ceeea4966498f34fb82cabb11dee6",
"artifact": "com.twitter:scrooge-generator_2.11:20.9.0",
"sha256": "1b027bb10604d34b0790a4936d9b5c95bf0a0ccac522521d9c7e898b87d16c79",
"runtime_deps": [
"@io_bazel_rules_scala_guava",
"@io_bazel_rules_scala_mustache",
],
},
"io_bazel_rules_scala_util_core": {
"artifact": "com.twitter:util-core_2.11:18.6.0",
"sha256": "5336da4846dfc3db8ffe5ae076be1021828cfee35aa17bda9af461e203cf265c",
"artifact": "com.twitter:util-core_2.11:20.9.0",
"sha256": "59955ecc258bcdd5de0199e289548717a794c7a1020f34ebef69a5f2cb36e127",
},
"io_bazel_rules_scala_util_logging": {
"artifact": "com.twitter:util-logging_2.11:18.6.0",
"sha256": "73ddd61cedabd4dab82b30e6c52c1be6c692b063b8ba310d716ead9e3b4e9267",
"artifact": "com.twitter:util-logging_2.11:20.9.0",
"sha256": "32afd3278232cf504e77a7833eef812bb4e2ae16f6f524910896cf844e223eef",
},
"io_bazel_rules_scala_javax_annotation_api": {
"artifact": "javax.annotation:javax.annotation-api:1.3.2",
Expand Down
24 changes: 12 additions & 12 deletions third_party/repositories/scala_2_12.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ artifacts = {
"sha256": "035015366f54f403d076d95f4529ce9eeaf544064dbc17c2d10e4f5908ef4256",
},
"io_bazel_rules_scala_scala_parser_combinators": {
"artifact": "org.scala-lang.modules:scala-parser-combinators_2.12:1.0.4",
"sha256": "282c78d064d3e8f09b3663190d9494b85e0bb7d96b0da05994fe994384d96111",
"artifact": "org.scala-lang.modules:scala-parser-combinators_2.12:1.1.2",
"sha256": "24985eb43e295a9dd77905ada307a850ca25acf819cdb579c093fc6987b0dbc2",
},
"org_scalameta_common": {
"artifact": "org.scalameta:common_2.12:4.3.0",
Expand Down Expand Up @@ -386,28 +386,28 @@ artifacts = {
"sha256": "972139718abc8a4893fa78cba8cf7b2c903f35c97aaf44fa3031b0669948b480",
},
"libthrift": {
"artifact": "org.apache.thrift:libthrift:0.8.0",
"sha256": "adea029247c3f16e55e29c1708b897812fd1fe335ac55fe3903e5d2f428ef4b3",
"artifact": "org.apache.thrift:libthrift:0.10.0",
"sha256": "8591718c1884ac8001b4c5ca80f349c0a6deec691de0af720c5e3bc3a581dada",
},
"io_bazel_rules_scala_scrooge_core": {
"artifact": "com.twitter:scrooge-core_2.12:18.6.0",
"sha256": "02a6d7cf9fe8d872dfabd20298e4315d677748708e153d8b464fd5abac9a7430",
"artifact": "com.twitter:scrooge-core_2.12:20.9.0",
"sha256": "922e8b05ac9dcefbfac5d636db8eafc4336abdde010c9378044cdaf232ecd6c6",
},
"io_bazel_rules_scala_scrooge_generator": {
"artifact": "com.twitter:scrooge-generator_2.12:18.6.0",
"sha256": "e7d5da1e3f0e494d3c81a26f44f3e3dc92d7efd757133de8c71758646fd5a833",
"artifact": "com.twitter:scrooge-generator_2.12:20.9.0",
"sha256": "757382d19cdb75fcd25c269cfb02dca15cc5fa1694645ad661a1e062c0cfb869",
"runtime_deps": [
"@io_bazel_rules_scala_guava",
"@io_bazel_rules_scala_mustache",
],
},
"io_bazel_rules_scala_util_core": {
"artifact": "com.twitter:util-core_2.12:18.6.0",
"sha256": "65bb92e70f95cbbfc640e54a5823a16154eac1a2631dc0211347e085aaa6ed0b",
"artifact": "com.twitter:util-core_2.12:20.9.0",
"sha256": "e3fdbcc5d0d77b05b37858fcfe07e3eee358022450e565400b6d08a739348cf4",
},
"io_bazel_rules_scala_util_logging": {
"artifact": "com.twitter:util-logging_2.12:18.6.0",
"sha256": "c0cba01705e9321b3444adcd4a9ce27c2acefd27e14c13b5aec2c318ce1b4fdf",
"artifact": "com.twitter:util-logging_2.12:20.9.0",
"sha256": "01bf2eb4ef05e5d67e1ce08a84c369cc6e8238d09011a86b805043b7a665aa5f",
},
"io_bazel_rules_scala_javax_annotation_api": {
"artifact": "javax.annotation:javax.annotation-api:1.3.2",
Expand Down