diff --git a/.bazelrc b/.bazelrc index c7563af..f5a359e 100644 --- a/.bazelrc +++ b/.bazelrc @@ -15,6 +15,7 @@ build --python_path=/usr/bin/python3 run --python_path=/usr/bin/python3 test --python_path=/usr/bin/python3 +common --@rules_scala_annex//rules/scala:scala-toolchain=zinc common:v3.2 --config=noop common:v3.3 --config=noop diff --git a/.bazelversion b/.bazelversion index 41d34ca..815da58 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -bazelbuild/6.4.0 +7.4.1 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5b731c..0f9ae9d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,14 +7,13 @@ on: jobs: build-and-test: - runs-on: ${{ matrix.os }} - env: - USE_BAZEL_VERSION: ${{ matrix.bazel_version }} - strategy: - matrix: - os: [ubuntu-20.04] - bazel_version: [bazelbuild/5.4.1, bazelbuild/6.4.0] + runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4.1.1 + - uses: bazel-contrib/setup-bazel@0.8.5 + with: + bazelisk-version: 1.20.0 + - run: ./scripts/format.sh check - run: ./tests/run_tests.sh + - run: bazel shutdown diff --git a/.scalafmt.conf b/.scalafmt.conf index c0cfc09..95edd75 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -8,7 +8,7 @@ danglingParentheses.preset = true docstrings.style = Asterisk importSelectors = singleLine maxColumn = 120 -verticalMultiline.newlineBeforeImplicitKW = true +newlines.implicitParamListModifierForce = [before] rewrite.redundantBraces.stringInterpolation = true rewrite.rules = [ # AvoidInfix, @@ -18,6 +18,6 @@ rewrite.rules = [ SortImports ] runner.fatalWarnings = true -unindentTopLevelOperators = false +indentOperator.exemptScope = oldTopLevel trailingCommas = always newlines.afterCurlyLambdaParams = keep diff --git a/BUILD.bazel b/BUILD.bazel index 7c54e2b..e69de29 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,10 +0,0 @@ -load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier") - -buildifier( - name = "buildifier", -) - -buildifier( - name = "buildifier_check", - mode = "check", -) diff --git a/MODULE.bazel b/MODULE.bazel new file mode 100644 index 0000000..815e2ff --- /dev/null +++ b/MODULE.bazel @@ -0,0 +1,42 @@ +module(name = "rules_hocon") + +bazel_dep(name = "bazel_skylib", version = "1.7.1") +bazel_dep(name = "rules_jvm_external", version = "6.6") +bazel_dep(name = "rules_scala_annex") + +bazel_dep(name = "buildifier_prebuilt", version = "8.0.1", dev_dependency = True) + +rules_scala_annex_version = "lucid_2024-12-06" + +archive_override( + module_name = "rules_scala_annex", + integrity = "sha256-lSbyWlYtgP0ENngg4gKU1EBJ8d1sgMQKJlmOHwmCw3k=", + strip_prefix = "rules_scala-{}".format(rules_scala_annex_version), + urls = ["https://github.com/lucidsoftware/rules_scala/archive/refs/tags/{}.zip".format(rules_scala_annex_version)], +) + +register_toolchains("//scala:zinc") + +scala_version = "2.13.12" + +hocon_maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") +hocon_maven.install( + name = "hocon_maven", + artifacts = [ + "com.typesafe:config:1.4.3", + "org.rogach:scallop_2.13:5.0.1", + "org.scala-lang:scala-compiler:{}".format(scala_version), + "org.scala-lang:scala-library:{}".format(scala_version), + "org.scala-lang:scala-reflect:{}".format(scala_version), + "org.scala-sbt:compiler-bridge_2.13:1.10.4", + ], + fail_if_repin_required = True, + fetch_sources = True, + lock_file = "//:hocon_maven_install.json", + repositories = [ + "https://repo.maven.apache.org/maven2", + "https://maven-central.storage-download.googleapis.com/maven2", + "https://mirror.bazel.build/repo1.maven.org/maven2", + ], +) +use_repo(hocon_maven, "hocon_maven") diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock new file mode 100644 index 0000000..c4e2dfe --- /dev/null +++ b/MODULE.bazel.lock @@ -0,0 +1,499 @@ +{ + "lockFileVersion": 11, + "registryFileHashes": { + "https://bcr.bazel.build/bazel_registry.json": "8a28e4aff06ee60aed2a8c281907fb8bcbf3b753c91fb5a5c57da3215d5b3497", + "https://bcr.bazel.build/modules/abseil-cpp/20210324.2/MODULE.bazel": "7cd0312e064fde87c8d1cd79ba06c876bd23630c83466e9500321be55c96ace2", + "https://bcr.bazel.build/modules/abseil-cpp/20211102.0/MODULE.bazel": "70390338f7a5106231d20620712f7cccb659cd0e9d073d1991c038eb9fc57589", + "https://bcr.bazel.build/modules/abseil-cpp/20230125.1/MODULE.bazel": "89047429cb0207707b2dface14ba7f8df85273d484c2572755be4bab7ce9c3a0", + "https://bcr.bazel.build/modules/abseil-cpp/20230802.1/MODULE.bazel": "fa92e2eb41a04df73cdabeec37107316f7e5272650f81d6cc096418fe647b915", + "https://bcr.bazel.build/modules/abseil-cpp/20230802.1/source.json": "035b6f1911e17340db722bbc9158f830ee6d5dedba4cb3bcb9e25e590808a32c", + "https://bcr.bazel.build/modules/apple_support/1.5.0/MODULE.bazel": "50341a62efbc483e8a2a6aec30994a58749bd7b885e18dd96aa8c33031e558ef", + "https://bcr.bazel.build/modules/apple_support/1.5.0/source.json": "eb98a7627c0bc486b57f598ad8da50f6625d974c8f723e9ea71bd39f709c9862", + "https://bcr.bazel.build/modules/bazel_features/1.11.0/MODULE.bazel": "f9382337dd5a474c3b7d334c2f83e50b6eaedc284253334cf823044a26de03e8", + "https://bcr.bazel.build/modules/bazel_features/1.17.0/MODULE.bazel": "039de32d21b816b47bd42c778e0454217e9c9caac4a3cf8e15c7231ee3ddee4d", + "https://bcr.bazel.build/modules/bazel_features/1.18.0/MODULE.bazel": "1be0ae2557ab3a72a57aeb31b29be347bcdc5d2b1eb1e70f39e3851a7e97041a", + "https://bcr.bazel.build/modules/bazel_features/1.18.0/source.json": "cde886d88c8164b50b9b97dba7c0a64ca24d257b72ca3a2fcb06bee1fdb47ee4", + "https://bcr.bazel.build/modules/bazel_features/1.4.1/MODULE.bazel": "e45b6bb2350aff3e442ae1111c555e27eac1d915e77775f6fdc4b351b758b5d7", + "https://bcr.bazel.build/modules/bazel_skylib/1.0.3/MODULE.bazel": "bcb0fd896384802d1ad283b4e4eb4d718eebd8cb820b0a2c3a347fb971afd9d8", + "https://bcr.bazel.build/modules/bazel_skylib/1.2.0/MODULE.bazel": "44fe84260e454ed94ad326352a698422dbe372b21a1ac9f3eab76eb531223686", + "https://bcr.bazel.build/modules/bazel_skylib/1.2.1/MODULE.bazel": "f35baf9da0efe45fa3da1696ae906eea3d615ad41e2e3def4aeb4e8bc0ef9a7a", + "https://bcr.bazel.build/modules/bazel_skylib/1.3.0/MODULE.bazel": "20228b92868bf5cfc41bda7afc8a8ba2a543201851de39d990ec957b513579c5", + "https://bcr.bazel.build/modules/bazel_skylib/1.4.1/MODULE.bazel": "a0dcb779424be33100dcae821e9e27e4f2901d9dfd5333efe5ac6a8d7ab75e1d", + "https://bcr.bazel.build/modules/bazel_skylib/1.5.0/MODULE.bazel": "32880f5e2945ce6a03d1fbd588e9198c0a959bb42297b2cfaf1685b7bc32e138", + "https://bcr.bazel.build/modules/bazel_skylib/1.6.1/MODULE.bazel": "8fdee2dbaace6c252131c00e1de4b165dc65af02ea278476187765e1a617b917", + "https://bcr.bazel.build/modules/bazel_skylib/1.7.1/MODULE.bazel": "3120d80c5861aa616222ec015332e5f8d3171e062e3e804a2a0253e1be26e59b", + "https://bcr.bazel.build/modules/bazel_skylib/1.7.1/source.json": "f121b43eeefc7c29efbd51b83d08631e2347297c95aac9764a701f2a6a2bb953", + "https://bcr.bazel.build/modules/buildifier_prebuilt/8.0.1/MODULE.bazel": "66ea722b98a7ce0b790d913e82163ebe04509073b269539403936d8f65bef027", + "https://bcr.bazel.build/modules/buildifier_prebuilt/8.0.1/source.json": "1bebf90699bb94cb232b417a6e20ac8b21ad4ccfbcb506116635825c4c87b10b", + "https://bcr.bazel.build/modules/buildozer/7.1.2/MODULE.bazel": "2e8dd40ede9c454042645fd8d8d0cd1527966aa5c919de86661e62953cd73d84", + "https://bcr.bazel.build/modules/buildozer/7.1.2/source.json": "c9028a501d2db85793a6996205c8de120944f50a0d570438fcae0457a5f9d1f8", + "https://bcr.bazel.build/modules/googletest/1.11.0/MODULE.bazel": "3a83f095183f66345ca86aa13c58b59f9f94a2f81999c093d4eeaa2d262d12f4", + "https://bcr.bazel.build/modules/googletest/1.14.0/MODULE.bazel": "cfbcbf3e6eac06ef9d85900f64424708cc08687d1b527f0ef65aa7517af8118f", + "https://bcr.bazel.build/modules/googletest/1.14.0/source.json": "2478949479000fdd7de9a3d0107ba2c85bb5f961c3ecb1aa448f52549ce310b5", + "https://bcr.bazel.build/modules/platforms/0.0.10/MODULE.bazel": "8cb8efaf200bdeb2150d93e162c40f388529a25852b332cec879373771e48ed5", + "https://bcr.bazel.build/modules/platforms/0.0.10/source.json": "f22828ff4cf021a6b577f1bf6341cb9dcd7965092a439f64fc1bb3b7a5ae4bd5", + "https://bcr.bazel.build/modules/platforms/0.0.4/MODULE.bazel": "9b328e31ee156f53f3c416a64f8491f7eb731742655a47c9eec4703a71644aee", + "https://bcr.bazel.build/modules/platforms/0.0.5/MODULE.bazel": "5733b54ea419d5eaf7997054bb55f6a1d0b5ff8aedf0176fef9eea44f3acda37", + "https://bcr.bazel.build/modules/platforms/0.0.6/MODULE.bazel": "ad6eeef431dc52aefd2d77ed20a4b353f8ebf0f4ecdd26a807d2da5aa8cd0615", + "https://bcr.bazel.build/modules/platforms/0.0.7/MODULE.bazel": "72fd4a0ede9ee5c021f6a8dd92b503e089f46c227ba2813ff183b71616034814", + "https://bcr.bazel.build/modules/platforms/0.0.9/MODULE.bazel": "4a87a60c927b56ddd67db50c89acaa62f4ce2a1d2149ccb63ffd871d5ce29ebc", + "https://bcr.bazel.build/modules/protobuf/21.7/MODULE.bazel": "a5a29bb89544f9b97edce05642fac225a808b5b7be74038ea3640fae2f8e66a7", + "https://bcr.bazel.build/modules/protobuf/21.7/source.json": "bbe500720421e582ff2d18b0802464205138c06056f443184de39fbb8187b09b", + "https://bcr.bazel.build/modules/protobuf/3.19.0/MODULE.bazel": "6b5fbb433f760a99a22b18b6850ed5784ef0e9928a72668b66e4d7ccd47db9b0", + "https://bcr.bazel.build/modules/protobuf/3.19.6/MODULE.bazel": "9233edc5e1f2ee276a60de3eaa47ac4132302ef9643238f23128fea53ea12858", + "https://bcr.bazel.build/modules/rules_android/0.1.1/MODULE.bazel": "48809ab0091b07ad0182defb787c4c5328bd3a278938415c00a7b69b50c4d3a8", + "https://bcr.bazel.build/modules/rules_android/0.1.1/source.json": "e6986b41626ee10bdc864937ffb6d6bf275bb5b9c65120e6137d56e6331f089e", + "https://bcr.bazel.build/modules/rules_cc/0.0.1/MODULE.bazel": "cb2aa0747f84c6c3a78dad4e2049c154f08ab9d166b1273835a8174940365647", + "https://bcr.bazel.build/modules/rules_cc/0.0.10/MODULE.bazel": "ec1705118f7eaedd6e118508d3d26deba2a4e76476ada7e0e3965211be012002", + "https://bcr.bazel.build/modules/rules_cc/0.0.10/source.json": "90310b16e0e7df0cf40f8d1dccd7d373360f42419a6bfbbf5bb013182dd70e84", + "https://bcr.bazel.build/modules/rules_cc/0.0.2/MODULE.bazel": "6915987c90970493ab97393024c156ea8fb9f3bea953b2f3ec05c34f19b5695c", + "https://bcr.bazel.build/modules/rules_cc/0.0.6/MODULE.bazel": "abf360251023dfe3efcef65ab9d56beefa8394d4176dd29529750e1c57eaa33f", + "https://bcr.bazel.build/modules/rules_cc/0.0.8/MODULE.bazel": "964c85c82cfeb6f3855e6a07054fdb159aced38e99a5eecf7bce9d53990afa3e", + "https://bcr.bazel.build/modules/rules_cc/0.0.9/MODULE.bazel": "836e76439f354b89afe6a911a7adf59a6b2518fafb174483ad78a2a2fde7b1c5", + "https://bcr.bazel.build/modules/rules_java/4.0.0/MODULE.bazel": "5a78a7ae82cd1a33cef56dc578c7d2a46ed0dca12643ee45edbb8417899e6f74", + "https://bcr.bazel.build/modules/rules_java/7.12.2/MODULE.bazel": "579c505165ee757a4280ef83cda0150eea193eed3bef50b1004ba88b99da6de6", + "https://bcr.bazel.build/modules/rules_java/7.12.2/source.json": "b0890f9cda8ff1b8e691a3ac6037b5c14b7fd4134765a3946b89f31ea02e5884", + "https://bcr.bazel.build/modules/rules_java/7.2.0/MODULE.bazel": "06c0334c9be61e6cef2c8c84a7800cef502063269a5af25ceb100b192453d4ab", + "https://bcr.bazel.build/modules/rules_java/7.6.1/MODULE.bazel": "2f14b7e8a1aa2f67ae92bc69d1ec0fa8d9f827c4e17ff5e5f02e91caa3b2d0fe", + "https://bcr.bazel.build/modules/rules_java/7.6.5/MODULE.bazel": "481164be5e02e4cab6e77a36927683263be56b7e36fef918b458d7a8a1ebadb1", + "https://bcr.bazel.build/modules/rules_jvm_external/4.4.2/MODULE.bazel": "a56b85e418c83eb1839819f0b515c431010160383306d13ec21959ac412d2fe7", + "https://bcr.bazel.build/modules/rules_jvm_external/5.2/MODULE.bazel": "d9351ba35217ad0de03816ef3ed63f89d411349353077348a45348b096615036", + "https://bcr.bazel.build/modules/rules_jvm_external/6.5/MODULE.bazel": "54f3e81ae9b57ede5916c9a48add664dc30a5ce3855376b51ae7d6f23405daf8", + "https://bcr.bazel.build/modules/rules_jvm_external/6.6/MODULE.bazel": "153042249c7060536dc95b6bb9f9bb8063b8a0b0cb7acdb381bddbc2374aed55", + "https://bcr.bazel.build/modules/rules_jvm_external/6.6/source.json": "b1d7ffc3877e5a76e6e48e6bce459cbb1712c90eba14861b112bd299587a534d", + "https://bcr.bazel.build/modules/rules_kotlin/1.9.6/MODULE.bazel": "d269a01a18ee74d0335450b10f62c9ed81f2321d7958a2934e44272fe82dcef3", + "https://bcr.bazel.build/modules/rules_kotlin/1.9.6/source.json": "2faa4794364282db7c06600b7e5e34867a564ae91bda7cae7c29c64e9466b7d5", + "https://bcr.bazel.build/modules/rules_license/0.0.3/MODULE.bazel": "627e9ab0247f7d1e05736b59dbb1b6871373de5ad31c3011880b4133cafd4bd0", + "https://bcr.bazel.build/modules/rules_license/0.0.7/MODULE.bazel": "088fbeb0b6a419005b89cf93fe62d9517c0a2b8bb56af3244af65ecfe37e7d5d", + "https://bcr.bazel.build/modules/rules_license/1.0.0/MODULE.bazel": "a7fda60eefdf3d8c827262ba499957e4df06f659330bbe6cdbdb975b768bb65c", + "https://bcr.bazel.build/modules/rules_license/1.0.0/source.json": "a52c89e54cc311196e478f8382df91c15f7a2bfdf4c6cd0e2675cc2ff0b56efb", + "https://bcr.bazel.build/modules/rules_pkg/0.7.0/MODULE.bazel": "df99f03fc7934a4737122518bb87e667e62d780b610910f0447665a7e2be62dc", + "https://bcr.bazel.build/modules/rules_pkg/0.7.0/source.json": "c2557066e0c0342223ba592510ad3d812d4963b9024831f7f66fd0584dd8c66c", + "https://bcr.bazel.build/modules/rules_proto/4.0.0/MODULE.bazel": "a7a7b6ce9bee418c1a760b3d84f83a299ad6952f9903c67f19e4edd964894e06", + "https://bcr.bazel.build/modules/rules_proto/5.3.0-21.7/MODULE.bazel": "e8dff86b0971688790ae75528fe1813f71809b5afd57facb44dad9e8eca631b7", + "https://bcr.bazel.build/modules/rules_proto/6.0.2/MODULE.bazel": "ce916b775a62b90b61888052a416ccdda405212b6aaeb39522f7dc53431a5e73", + "https://bcr.bazel.build/modules/rules_proto/6.0.2/source.json": "17a2e195f56cb28d6bbf763e49973d13890487c6945311ed141e196fb660426d", + "https://bcr.bazel.build/modules/rules_python/0.10.2/MODULE.bazel": "cc82bc96f2997baa545ab3ce73f196d040ffb8756fd2d66125a530031cd90e5f", + "https://bcr.bazel.build/modules/rules_python/0.22.1/MODULE.bazel": "26114f0c0b5e93018c0c066d6673f1a2c3737c7e90af95eff30cfee38d0bbac7", + "https://bcr.bazel.build/modules/rules_python/0.23.1/MODULE.bazel": "49ffccf0511cb8414de28321f5fcf2a31312b47c40cc21577144b7447f2bf300", + "https://bcr.bazel.build/modules/rules_python/0.23.1/source.json": "a6d9965700e3bd75df4e19140c0e651851bb720d8b9eb280ecd1ee44b92d7646", + "https://bcr.bazel.build/modules/rules_python/0.4.0/MODULE.bazel": "9208ee05fd48bf09ac60ed269791cf17fb343db56c8226a720fbb1cdf467166c", + "https://bcr.bazel.build/modules/rules_shell/0.3.0/MODULE.bazel": "de4402cd12f4cc8fda2354fce179fdb068c0b9ca1ec2d2b17b3e21b24c1a937b", + "https://bcr.bazel.build/modules/rules_shell/0.3.0/source.json": "c55ed591aa5009401ddf80ded9762ac32c358d2517ee7820be981e2de9756cf3", + "https://bcr.bazel.build/modules/stardoc/0.5.1/MODULE.bazel": "1a05d92974d0c122f5ccf09291442580317cdd859f07a8655f1db9a60374f9f8", + "https://bcr.bazel.build/modules/stardoc/0.5.3/MODULE.bazel": "c7f6948dae6999bf0db32c1858ae345f112cacf98f174c7a8bb707e41b974f1c", + "https://bcr.bazel.build/modules/stardoc/0.7.0/MODULE.bazel": "05e3d6d30c099b6770e97da986c53bd31844d7f13d41412480ea265ac9e8079c", + "https://bcr.bazel.build/modules/stardoc/0.7.0/source.json": "e3c524bf2ef20992539ce2bc4a2243f4853130209ee831689983e28d05769099", + "https://bcr.bazel.build/modules/upb/0.0.0-20220923-a547704/MODULE.bazel": "7298990c00040a0e2f121f6c32544bab27d4452f80d9ce51349b1a28f3005c43", + "https://bcr.bazel.build/modules/upb/0.0.0-20220923-a547704/source.json": "f1ef7d3f9e0e26d4b23d1c39b5f5de71f584dd7d1b4ef83d9bbba6ec7a6a6459", + "https://bcr.bazel.build/modules/zlib/1.2.11/MODULE.bazel": "07b389abc85fdbca459b69e2ec656ae5622873af3f845e1c9d80fe179f3effa0", + "https://bcr.bazel.build/modules/zlib/1.2.12/MODULE.bazel": "3b1a8834ada2a883674be8cbd36ede1b6ec481477ada359cd2d3ddc562340b27", + "https://bcr.bazel.build/modules/zlib/1.3.1.bcr.3/MODULE.bazel": "af322bc08976524477c79d1e45e241b6efbeb918c497e8840b8ab116802dda79", + "https://bcr.bazel.build/modules/zlib/1.3.1.bcr.3/source.json": "2be409ac3c7601245958cd4fcdff4288be79ed23bd690b4b951f500d54ee6e7d" + }, + "selectedYankedVersions": {}, + "moduleExtensions": { + "@@apple_support~//crosstool:setup.bzl%apple_cc_configure_extension": { + "general": { + "bzlTransitiveDigest": "PjIds3feoYE8SGbbIq2SFTZy3zmxeO2tQevJZNDo7iY=", + "usagesDigest": "+hz7IHWN6A1oVJJWNDB6yZRG+RYhF76wAYItpAeIUIg=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "local_config_apple_cc_toolchains": { + "bzlFile": "@@apple_support~//crosstool:setup.bzl", + "ruleClassName": "_apple_cc_autoconf_toolchains", + "attributes": {} + }, + "local_config_apple_cc": { + "bzlFile": "@@apple_support~//crosstool:setup.bzl", + "ruleClassName": "_apple_cc_autoconf", + "attributes": {} + } + }, + "recordedRepoMappingEntries": [ + [ + "apple_support~", + "bazel_tools", + "bazel_tools" + ] + ] + } + }, + "@@buildifier_prebuilt~//:defs.bzl%buildifier_prebuilt_deps_extension": { + "general": { + "bzlTransitiveDigest": "rGFwP53kZJt1xitZcYx6affAvfHqnyxx2HCrewFcWTc=", + "usagesDigest": "sy21t1r/nZFzoEm0sKKNEtD2MI9TRY4JhsxxM03nWJw=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "buildifier_darwin_amd64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_file", + "attributes": { + "urls": [ + "https://github.com/bazelbuild/buildtools/releases/download/v8.0.1/buildifier-darwin-amd64" + ], + "downloaded_file_path": "buildifier", + "executable": true, + "sha256": "802b013211dbcf91e3c0658ba33ecb3932ef5a6f6764a0b13efcec4e2df04c83" + } + }, + "buildifier_darwin_arm64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_file", + "attributes": { + "urls": [ + "https://github.com/bazelbuild/buildtools/releases/download/v8.0.1/buildifier-darwin-arm64" + ], + "downloaded_file_path": "buildifier", + "executable": true, + "sha256": "833e2afc331b9ad8f6b038ad3d69ceeaf97651900bf2a3a45f54f42cafe0bfd3" + } + }, + "buildifier_linux_amd64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_file", + "attributes": { + "urls": [ + "https://github.com/bazelbuild/buildtools/releases/download/v8.0.1/buildifier-linux-amd64" + ], + "downloaded_file_path": "buildifier", + "executable": true, + "sha256": "1976053ed4decd6dd93170885b4387eddc76ec70dc2697b2e91a9af83269418a" + } + }, + "buildifier_linux_arm64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_file", + "attributes": { + "urls": [ + "https://github.com/bazelbuild/buildtools/releases/download/v8.0.1/buildifier-linux-arm64" + ], + "downloaded_file_path": "buildifier", + "executable": true, + "sha256": "93078c57763493bdc2914ed340544500b8f3497341a62e90f00e9e184c4d9c2c" + } + }, + "buildifier_windows_amd64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_file", + "attributes": { + "urls": [ + "https://github.com/bazelbuild/buildtools/releases/download/v8.0.1/buildifier-windows-amd64.exe" + ], + "downloaded_file_path": "buildifier.exe", + "executable": true, + "sha256": "6edc9247e6d42d27fb67b9509bb795d159a12468faa89e9f290dcadc26571c31" + } + }, + "buildozer_darwin_amd64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_file", + "attributes": { + "urls": [ + "https://github.com/bazelbuild/buildtools/releases/download/v8.0.1/buildozer-darwin-amd64" + ], + "downloaded_file_path": "buildozer", + "executable": true, + "sha256": "799be47db682fb06bfc677438d0c910032dda783606b1eec77669f2c1a17c65a" + } + }, + "buildozer_darwin_arm64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_file", + "attributes": { + "urls": [ + "https://github.com/bazelbuild/buildtools/releases/download/v8.0.1/buildozer-darwin-arm64" + ], + "downloaded_file_path": "buildozer", + "executable": true, + "sha256": "118f2ff581c49e03aeb77e34fddebab10923b93e381185e43e0c1835ba189cd9" + } + }, + "buildozer_linux_amd64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_file", + "attributes": { + "urls": [ + "https://github.com/bazelbuild/buildtools/releases/download/v8.0.1/buildozer-linux-amd64" + ], + "downloaded_file_path": "buildozer", + "executable": true, + "sha256": "4f5a91d4f7fb61ff4d39cdedb7dcf93bb17f3b7737b07175ad4456dc6bdafac1" + } + }, + "buildozer_linux_arm64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_file", + "attributes": { + "urls": [ + "https://github.com/bazelbuild/buildtools/releases/download/v8.0.1/buildozer-linux-arm64" + ], + "downloaded_file_path": "buildozer", + "executable": true, + "sha256": "a7eec1ddcf5075ef3b869f1bf476fce174f0226a35f7e20734caa5a55b10ce26" + } + }, + "buildozer_windows_amd64": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_file", + "attributes": { + "urls": [ + "https://github.com/bazelbuild/buildtools/releases/download/v8.0.1/buildozer-windows-amd64.exe" + ], + "downloaded_file_path": "buildozer.exe", + "executable": true, + "sha256": "3b51ae3dd0221eb9d43614206f0886ea36d78e6bb4f8dea69f7bc4cc285d1f15" + } + }, + "buildifier_prebuilt_toolchains": { + "bzlFile": "@@buildifier_prebuilt~//:defs.bzl", + "ruleClassName": "_buildifier_toolchain_setup", + "attributes": { + "assets_json": "[{\"arch\":\"amd64\",\"name\":\"buildifier\",\"platform\":\"darwin\",\"sha256\":\"802b013211dbcf91e3c0658ba33ecb3932ef5a6f6764a0b13efcec4e2df04c83\",\"version\":\"v8.0.1\"},{\"arch\":\"arm64\",\"name\":\"buildifier\",\"platform\":\"darwin\",\"sha256\":\"833e2afc331b9ad8f6b038ad3d69ceeaf97651900bf2a3a45f54f42cafe0bfd3\",\"version\":\"v8.0.1\"},{\"arch\":\"amd64\",\"name\":\"buildifier\",\"platform\":\"linux\",\"sha256\":\"1976053ed4decd6dd93170885b4387eddc76ec70dc2697b2e91a9af83269418a\",\"version\":\"v8.0.1\"},{\"arch\":\"arm64\",\"name\":\"buildifier\",\"platform\":\"linux\",\"sha256\":\"93078c57763493bdc2914ed340544500b8f3497341a62e90f00e9e184c4d9c2c\",\"version\":\"v8.0.1\"},{\"arch\":\"amd64\",\"name\":\"buildifier\",\"platform\":\"windows\",\"sha256\":\"6edc9247e6d42d27fb67b9509bb795d159a12468faa89e9f290dcadc26571c31\",\"version\":\"v8.0.1\"},{\"arch\":\"amd64\",\"name\":\"buildozer\",\"platform\":\"darwin\",\"sha256\":\"799be47db682fb06bfc677438d0c910032dda783606b1eec77669f2c1a17c65a\",\"version\":\"v8.0.1\"},{\"arch\":\"arm64\",\"name\":\"buildozer\",\"platform\":\"darwin\",\"sha256\":\"118f2ff581c49e03aeb77e34fddebab10923b93e381185e43e0c1835ba189cd9\",\"version\":\"v8.0.1\"},{\"arch\":\"amd64\",\"name\":\"buildozer\",\"platform\":\"linux\",\"sha256\":\"4f5a91d4f7fb61ff4d39cdedb7dcf93bb17f3b7737b07175ad4456dc6bdafac1\",\"version\":\"v8.0.1\"},{\"arch\":\"arm64\",\"name\":\"buildozer\",\"platform\":\"linux\",\"sha256\":\"a7eec1ddcf5075ef3b869f1bf476fce174f0226a35f7e20734caa5a55b10ce26\",\"version\":\"v8.0.1\"},{\"arch\":\"amd64\",\"name\":\"buildozer\",\"platform\":\"windows\",\"sha256\":\"3b51ae3dd0221eb9d43614206f0886ea36d78e6bb4f8dea69f7bc4cc285d1f15\",\"version\":\"v8.0.1\"}]" + } + } + }, + "recordedRepoMappingEntries": [ + [ + "buildifier_prebuilt~", + "bazel_skylib", + "bazel_skylib~" + ], + [ + "buildifier_prebuilt~", + "bazel_tools", + "bazel_tools" + ] + ] + } + }, + "@@platforms//host:extension.bzl%host_platform": { + "general": { + "bzlTransitiveDigest": "xelQcPZH8+tmuOHVjL9vDxMnnQNMlwj0SlvgoqBkm4U=", + "usagesDigest": "hgylFkgWSg0ulUwWZzEM1aIftlUnbmw2ynWLdEfHnZc=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "host_platform": { + "bzlFile": "@@platforms//host:extension.bzl", + "ruleClassName": "host_platform_repo", + "attributes": {} + } + }, + "recordedRepoMappingEntries": [] + } + }, + "@@rules_kotlin~//src/main/starlark/core/repositories:bzlmod_setup.bzl%rules_kotlin_extensions": { + "general": { + "bzlTransitiveDigest": "fus14IFJ/1LGWWGKPH/U18VnJCoMjfDt1ckahqCnM0A=", + "usagesDigest": "aJF6fLy82rR95Ff5CZPAqxNoFgOMLMN5ImfBS0nhnkg=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "com_github_jetbrains_kotlin_git": { + "bzlFile": "@@rules_kotlin~//src/main/starlark/core/repositories:compiler.bzl", + "ruleClassName": "kotlin_compiler_git_repository", + "attributes": { + "urls": [ + "https://github.com/JetBrains/kotlin/releases/download/v1.9.23/kotlin-compiler-1.9.23.zip" + ], + "sha256": "93137d3aab9afa9b27cb06a824c2324195c6b6f6179d8a8653f440f5bd58be88" + } + }, + "com_github_jetbrains_kotlin": { + "bzlFile": "@@rules_kotlin~//src/main/starlark/core/repositories:compiler.bzl", + "ruleClassName": "kotlin_capabilities_repository", + "attributes": { + "git_repository_name": "com_github_jetbrains_kotlin_git", + "compiler_version": "1.9.23" + } + }, + "com_github_google_ksp": { + "bzlFile": "@@rules_kotlin~//src/main/starlark/core/repositories:ksp.bzl", + "ruleClassName": "ksp_compiler_plugin_repository", + "attributes": { + "urls": [ + "https://github.com/google/ksp/releases/download/1.9.23-1.0.20/artifacts.zip" + ], + "sha256": "ee0618755913ef7fd6511288a232e8fad24838b9af6ea73972a76e81053c8c2d", + "strip_version": "1.9.23-1.0.20" + } + }, + "com_github_pinterest_ktlint": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_file", + "attributes": { + "sha256": "01b2e0ef893383a50dbeb13970fe7fa3be36ca3e83259e01649945b09d736985", + "urls": [ + "https://github.com/pinterest/ktlint/releases/download/1.3.0/ktlint" + ], + "executable": true + } + }, + "rules_android": { + "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", + "ruleClassName": "http_archive", + "attributes": { + "sha256": "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806", + "strip_prefix": "rules_android-0.1.1", + "urls": [ + "https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip" + ] + } + } + }, + "recordedRepoMappingEntries": [ + [ + "rules_kotlin~", + "bazel_tools", + "bazel_tools" + ] + ] + } + }, + "@@rules_python~//python/extensions:python.bzl%python": { + "general": { + "bzlTransitiveDigest": "l7SEKGzdShn1GH45yoD3IEBi5SxT+5WsAq/OlHiiuiw=", + "usagesDigest": "YiLsNY5r63HmlgMVyESsQgfKVj6Ky/w9Zozdju6rXl4=", + "recordedFileInputs": {}, + "recordedDirentsInputs": {}, + "envVariables": {}, + "generatedRepoSpecs": { + "python_3_11_aarch64-apple-darwin": { + "bzlFile": "@@rules_python~//python:repositories.bzl", + "ruleClassName": "python_repository", + "attributes": { + "sha256": "4918cdf1cab742a90f85318f88b8122aeaa2d04705803c7b6e78e81a3dd40f80", + "patches": [], + "platform": "aarch64-apple-darwin", + "python_version": "3.11.1", + "release_filename": "20230116/cpython-3.11.1+20230116-aarch64-apple-darwin-install_only.tar.gz", + "urls": [ + "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1+20230116-aarch64-apple-darwin-install_only.tar.gz" + ], + "distutils_content": "", + "strip_prefix": "python", + "ignore_root_user_error": false + } + }, + "python_3_11_aarch64-unknown-linux-gnu": { + "bzlFile": "@@rules_python~//python:repositories.bzl", + "ruleClassName": "python_repository", + "attributes": { + "sha256": "debf15783bdcb5530504f533d33fda75a7b905cec5361ae8f33da5ba6599f8b4", + "patches": [], + "platform": "aarch64-unknown-linux-gnu", + "python_version": "3.11.1", + "release_filename": "20230116/cpython-3.11.1+20230116-aarch64-unknown-linux-gnu-install_only.tar.gz", + "urls": [ + "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1+20230116-aarch64-unknown-linux-gnu-install_only.tar.gz" + ], + "distutils_content": "", + "strip_prefix": "python", + "ignore_root_user_error": false + } + }, + "python_3_11_x86_64-apple-darwin": { + "bzlFile": "@@rules_python~//python:repositories.bzl", + "ruleClassName": "python_repository", + "attributes": { + "sha256": "20a4203d069dc9b710f70b09e7da2ce6f473d6b1110f9535fb6f4c469ed54733", + "patches": [], + "platform": "x86_64-apple-darwin", + "python_version": "3.11.1", + "release_filename": "20230116/cpython-3.11.1+20230116-x86_64-apple-darwin-install_only.tar.gz", + "urls": [ + "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1+20230116-x86_64-apple-darwin-install_only.tar.gz" + ], + "distutils_content": "", + "strip_prefix": "python", + "ignore_root_user_error": false + } + }, + "python_3_11_x86_64-pc-windows-msvc": { + "bzlFile": "@@rules_python~//python:repositories.bzl", + "ruleClassName": "python_repository", + "attributes": { + "sha256": "edc08979cb0666a597466176511529c049a6f0bba8adf70df441708f766de5bf", + "patches": [], + "platform": "x86_64-pc-windows-msvc", + "python_version": "3.11.1", + "release_filename": "20230116/cpython-3.11.1+20230116-x86_64-pc-windows-msvc-shared-install_only.tar.gz", + "urls": [ + "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1+20230116-x86_64-pc-windows-msvc-shared-install_only.tar.gz" + ], + "distutils_content": "", + "strip_prefix": "python", + "ignore_root_user_error": false + } + }, + "python_3_11_x86_64-unknown-linux-gnu": { + "bzlFile": "@@rules_python~//python:repositories.bzl", + "ruleClassName": "python_repository", + "attributes": { + "sha256": "02a551fefab3750effd0e156c25446547c238688a32fabde2995c941c03a6423", + "patches": [], + "platform": "x86_64-unknown-linux-gnu", + "python_version": "3.11.1", + "release_filename": "20230116/cpython-3.11.1+20230116-x86_64-unknown-linux-gnu-install_only.tar.gz", + "urls": [ + "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1+20230116-x86_64-unknown-linux-gnu-install_only.tar.gz" + ], + "distutils_content": "", + "strip_prefix": "python", + "ignore_root_user_error": false + } + }, + "python_3_11": { + "bzlFile": "@@rules_python~//python/private:toolchains_repo.bzl", + "ruleClassName": "toolchain_aliases", + "attributes": { + "python_version": "3.11.1", + "user_repository_name": "python_3_11" + } + }, + "pythons_hub": { + "bzlFile": "@@rules_python~//python/extensions/private:pythons_hub.bzl", + "ruleClassName": "hub_repo", + "attributes": { + "toolchain_prefixes": [ + "_0000_python_3_11_" + ], + "toolchain_python_versions": [ + "3.11" + ], + "toolchain_set_python_version_constraints": [ + "False" + ], + "toolchain_user_repository_names": [ + "python_3_11" + ] + } + }, + "python_aliases": { + "bzlFile": "@@rules_python~//python/private:toolchains_repo.bzl", + "ruleClassName": "multi_toolchain_aliases", + "attributes": { + "python_versions": { + "3.11": "python_3_11" + } + } + } + }, + "recordedRepoMappingEntries": [ + [ + "rules_python~", + "bazel_tools", + "bazel_tools" + ] + ] + } + } + } +} diff --git a/WORKSPACE b/WORKSPACE deleted file mode 100644 index 573fcc0..0000000 --- a/WORKSPACE +++ /dev/null @@ -1,131 +0,0 @@ -workspace(name = "io_bazel_rules_hocon") - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") - -bazel_skylib_tag = "1.0.2" - -bazel_skylib_sha256 = "64ad2728ccdd2044216e4cec7815918b7bb3bb28c95b7e9d951f9d4eccb07625" - -http_archive( - name = "bazel_skylib", - sha256 = bazel_skylib_sha256, - strip_prefix = "bazel-skylib-{}".format(bazel_skylib_tag), - type = "zip", - url = "https://github.com/bazelbuild/bazel-skylib/archive/{}.zip".format(bazel_skylib_tag), -) - -protobuf_tag = "3.11.4" - -protobuf_sha256 = "9748c0d90e54ea09e5e75fb7fac16edce15d2028d4356f32211cfa3c0e956564" - -http_archive( - name = "com_google_protobuf", - sha256 = protobuf_sha256, - strip_prefix = "protobuf-{}".format(protobuf_tag), - type = "zip", - url = "https://github.com/protocolbuffers/protobuf/archive/v{}.zip".format(protobuf_tag), -) - -load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps") - -protobuf_deps() - -# com_github_bazelbuild_buildtools - -buildtools_tag = "2.2.1" - -buildtools_sha256 = "15146c8e0f3cb9605339a4b0fe2b0e33ee67fec47e6b55d1b39c0de7ccede6fd" - -http_archive( - name = "com_github_bazelbuild_buildtools", - sha256 = buildtools_sha256, - strip_prefix = "buildtools-{}".format(buildtools_tag), - urls = ["https://github.com/bazelbuild/buildtools/archive/{}.zip".format(buildtools_tag)], -) - -load("@com_github_bazelbuild_buildtools//buildifier:deps.bzl", "buildifier_dependencies") - -buildifier_dependencies() - -# io_bazel_rules_go - -rules_go_tag = "0.22.1" - -rules_go_sha256 = "9fbaffc63aa802496b0de6ed708fce8fb4c34b27fa7fab6cfc64eeae900c19a7" - -http_archive( - name = "io_bazel_rules_go", - sha256 = rules_go_sha256, - strip_prefix = "rules_go-{}".format(rules_go_tag), - urls = ["https://github.com/bazelbuild/rules_go/archive/v{}.zip".format(rules_go_tag)], -) - -load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") - -go_rules_dependencies() - -go_register_toolchains() - -rules_scala_annex_version = "lucid_2023-10-11" - -rules_scala_annex_sha256 = "ab813f52c398571efa3540fc8c0faff6a5c500695083bb03276459278a325baf" - -# The higherkindness repo hasn't been updated in a long time, so use the -# lucidsoftware fork, which is more updated. -http_archive( - name = "rules_scala_annex", - sha256 = rules_scala_annex_sha256, - strip_prefix = "rules_scala-{}".format(rules_scala_annex_version), - type = "zip", - url = "https://github.com/lucidsoftware/rules_scala/archive/{}.zip".format(rules_scala_annex_version), -) - -rules_jvm_external_tag = "5.3" - -http_archive( - name = "rules_jvm_external", - sha256 = "6cc8444b20307113a62b676846c29ff018402fd4c7097fcd6d0a0fd5f2e86429", - strip_prefix = "rules_jvm_external-{}".format(rules_jvm_external_tag), - url = "https://github.com/bazelbuild/rules_jvm_external/archive/{}.zip".format(rules_jvm_external_tag), -) - -load( - "@rules_scala_annex//rules/scala:workspace.bzl", - "scala_register_toolchains", - "scala_repositories", -) - -scala_repositories() - -load("@annex//:defs.bzl", annex_pinned_maven_install = "pinned_maven_install") - -annex_pinned_maven_install() - -scala_register_toolchains() - -load( - "@rules_scala_annex//rules/scalafmt:workspace.bzl", - "scalafmt_default_config", - "scalafmt_repositories", -) - -scalafmt_repositories() - -load("@annex_scalafmt//:defs.bzl", annex_scalafmt_pinned_maven_install = "pinned_maven_install") - -annex_scalafmt_pinned_maven_install() - -scalafmt_default_config() - -bind( - name = "default_scala", - actual = "//scala:default_scala", -) - -load("//:workspace.bzl", "hocon_repositories") - -hocon_repositories() - -load("@hocon_maven//:defs.bzl", hocon_maven_install = "pinned_maven_install") - -hocon_maven_install() diff --git a/dev/BUILD.bazel b/dev/BUILD.bazel new file mode 100644 index 0000000..380f014 --- /dev/null +++ b/dev/BUILD.bazel @@ -0,0 +1,10 @@ +load("@buildifier_prebuilt//:rules.bzl", "buildifier") + +buildifier( + name = "buildifier", +) + +buildifier( + name = "buildifier_check", + mode = "check", +) diff --git a/hocon-compiler/src/ConfigMerger.scala b/hocon-compiler/src/ConfigMerger.scala index 7f0daf7..3f1f126 100644 --- a/hocon-compiler/src/ConfigMerger.scala +++ b/hocon-compiler/src/ConfigMerger.scala @@ -15,7 +15,7 @@ object ConfigMerger { if (extraKeys.nonEmpty) { System.err.println( s"\u001b[31mWARN:\u001b[0m ${overrides.origin.filename} has config keys not in ${base.origin.filename}:\n\t${extraKeys - .mkString("\n\t")}", + .mkString("\n\t")}", ) } } diff --git a/hocon_maven_install.json b/hocon_maven_install.json index 9f157af..ff0833d 100644 --- a/hocon_maven_install.json +++ b/hocon_maven_install.json @@ -1,7 +1,7 @@ { "__AUTOGENERATED_FILE_DO_NOT_MODIFY_THIS_FILE_MANUALLY": "THERE_IS_NO_DATA_ONLY_ZUUL", - "__INPUT_ARTIFACTS_HASH": 235017626, - "__RESOLVED_ARTIFACTS_HASH": -642180585, + "__INPUT_ARTIFACTS_HASH": -2023439607, + "__RESOLVED_ARTIFACTS_HASH": 662301064, "artifacts": { "com.typesafe:config": { "shasums": { @@ -61,24 +61,24 @@ }, "org.scala-sbt:compiler-bridge_2.13": { "shasums": { - "jar": "dce2db00e8d6aaa6c59ccd011da47f67b18c7edf2e9d7eedc26e69759e122d5f", - "sources": "4f82f91a50071cb06cf35917b3a11e3191f2c969136fd34d86ff6578de54e71f" + "jar": "63cdad55e9c3756ff92c7ad1200fffc00e1d676d2de7789a98137cb4db15e907", + "sources": "3d20a22b634705208bcba326d0e0ebbc1ae7655301a971a539d7921f3495377a" }, - "version": "1.9.5" + "version": "1.10.4" }, "org.scala-sbt:compiler-interface": { "shasums": { - "jar": "5de2449bfe44d3641103fdc95b311db7c3c51b3e072a81ce90a58b4db36413bf", - "sources": "fb2aa15ac9b8c685550bdb7d718959a55d62552ce019d92b31183fe6cc4be3df" + "jar": "c33ac8083502754428013c15968d9ed5450c1db166947153404c6507af5172ff", + "sources": "ff817900292bc8a02d085042f0906761e925189c36454b5d7e8510e16725475e" }, - "version": "1.9.5" + "version": "1.10.4" }, "org.scala-sbt:util-interface": { "shasums": { - "jar": "8eff79d7d4887d5aa0ec58137a84e0e2bda58db4586cb830d204c30cea78e099", - "sources": "61c560ec2694f09107a3d1007a9eff95f921dab2fe2dc9cc793e703b05be6a9e" + "jar": "b961003c1ed3c85ce7c07577768a689ad657c73f234d620eead3eb42c854a434", + "sources": "172e0c6983e12e1ebb36d71b2cceed06f0942dfc8fb818a2c680618e2130ee57" }, - "version": "1.9.4" + "version": "1.10.4" } }, "dependencies": { @@ -275,6 +275,7 @@ ], "org.scala-sbt:compiler-bridge_2.13": [ "scala", + "scala.reflect", "xsbt" ], "org.scala-sbt:compiler-interface": [ @@ -361,5 +362,70 @@ "org.scala-sbt:util-interface:jar:sources" ] }, + "services": { + "org.jline:jline": { + "org/": [], + "org/jline/": [], + "org/jline/terminal/": [], + "org/jline/terminal/provider/": [], + "org/jline/terminal/provider/exec": [ + "class=org.jline.terminal.impl.exec.ExecTerminalProvider" + ], + "org/jline/terminal/provider/jansi": [ + "class=org.jline.terminal.impl.jansi.JansiTerminalProvider" + ], + "org/jline/terminal/provider/jna": [ + "class=org.jline.terminal.impl.jna.JnaTerminalProvider" + ] + }, + "org.jline:jline:jar:sources": { + "org/": [], + "org/jline/": [], + "org/jline/terminal/": [], + "org/jline/terminal/provider/": [], + "org/jline/terminal/provider/exec": [ + "class=org.jline.terminal.impl.exec.ExecTerminalProvider" + ], + "org/jline/terminal/provider/jansi": [ + "class=org.jline.terminal.impl.jansi.JansiTerminalProvider" + ], + "org/jline/terminal/provider/jna": [ + "class=org.jline.terminal.impl.jna.JnaTerminalProvider" + ] + }, + "org.scala-lang:scala-compiler": { + "javax.script.ScriptEngineFactory": [ + "scala.tools.nsc.interpreter.shell.Scripted$Factory" + ] + }, + "org.scala-sbt:compiler-bridge_2.13": { + "xsbti.InteractiveConsoleFactory": [ + "xsbt.InteractiveConsoleBridgeFactory" + ], + "xsbti.compile.CompilerInterface2": [ + "xsbt.CompilerBridge" + ], + "xsbti.compile.ConsoleInterface1": [ + "xsbt.ConsoleBridge" + ], + "xsbti.compile.ScaladocInterface2": [ + "xsbt.ScaladocBridge" + ] + }, + "org.scala-sbt:compiler-bridge_2.13:jar:sources": { + "xsbti.InteractiveConsoleFactory": [ + "xsbt.InteractiveConsoleBridgeFactory" + ], + "xsbti.compile.CompilerInterface2": [ + "xsbt.CompilerBridge" + ], + "xsbti.compile.ConsoleInterface1": [ + "xsbt.ConsoleBridge" + ], + "xsbti.compile.ScaladocInterface2": [ + "xsbt.ScaladocBridge" + ] + } + }, "version": "2" } diff --git a/scala/BUILD.bazel b/scala/BUILD.bazel index aaa0296..750a3fe 100644 --- a/scala/BUILD.bazel +++ b/scala/BUILD.bazel @@ -1,9 +1,4 @@ -load( - "@rules_scala_annex//rules:scala.bzl", - "configure_bootstrap_scala", - "configure_zinc_scala", - "scala_library", -) +load("@rules_scala_annex//rules:register_toolchain.bzl", "register_zinc_toolchain") scala_version = "2.13.10" @@ -17,15 +12,7 @@ runtime_classpath = [ "@hocon_maven//:org_scala_lang_scala_library", ] -configure_bootstrap_scala( - name = "bootstrap", - compiler_classpath = compiler_classpath, - runtime_classpath = runtime_classpath, - version = scala_version, - visibility = ["//visibility:public"], -) - -configure_zinc_scala( +register_zinc_toolchain( name = "zinc", compiler_bridge = "@hocon_maven//:org_scala_sbt_compiler_bridge_2_13", compiler_classpath = compiler_classpath, @@ -38,9 +25,3 @@ configure_zinc_scala( version = scala_version, visibility = ["//visibility:public"], ) - -alias( - name = "default_scala", - actual = ":zinc", - visibility = ["//visibility:public"], -) diff --git a/scripts/format.sh b/scripts/format.sh index 0f3fa15..e17f4c3 100755 --- a/scripts/format.sh +++ b/scripts/format.sh @@ -10,8 +10,9 @@ set -o pipefail cd "$(dirname "$0")/.." -bazel build @rules_scala_annex//rules/scalafmt -scalafmtbin="bazel-bin/external/rules_scala_annex/rules/scalafmt/scalafmt-bin" +scalafmtbin="$(mktemp)" + +bazel run --script_path "$scalafmtbin" @rules_scala_annex//rules/scalafmt _scalafmt() { find hocon-compiler -name '*.scala' -exec $scalafmtbin --config "$PWD/.scalafmt.conf" "$PWD/{}" "$PWD/{}" \; @@ -21,7 +22,8 @@ _scalafmt-check() { tfile="$(mktemp)" failed=0 while IFS= read -r -d $'\0' f; do - $scalafmtbin --config "$PWD/.scalafmt.conf" "$PWD/$f" "$tfile" + # `/tmp` may be mounted as `noexec`, in which case we can't execute `"$scalafmtbin"` directly + bash $scalafmtbin --config "$PWD/.scalafmt.conf" "$PWD/$f" "$tfile" if ! diff -u "$f" "$tfile"; then (( failed++ )) || true fi @@ -34,9 +36,9 @@ _scalafmt-check() { } if [ "$1" != check ]; then - bazel run buildifier + bazel run //dev:buildifier _scalafmt else - bazel run buildifier_check + bazel run //dev:buildifier_check _scalafmt-check fi diff --git a/scripts/gen-deps.sh b/scripts/gen-deps.sh index a6fbb47..ce42fb3 100755 --- a/scripts/gen-deps.sh +++ b/scripts/gen-deps.sh @@ -1,4 +1,4 @@ #!/bin/sh -e cd "$(dirname "$0")" -bazel run @unpinned_hocon_maven//:pin +bazel run @hocon_maven//:pin diff --git a/tests/env_keys/BUILD.bazel b/tests/env_keys/BUILD.bazel index d9bde62..6b514d0 100644 --- a/tests/env_keys/BUILD.bazel +++ b/tests/env_keys/BUILD.bazel @@ -18,6 +18,7 @@ hocon_library( "config/env1_keys", "config/env2_keys", ], + tags = ["manual"], ) hocon_library( diff --git a/tests/general/BUILD.bazel b/tests/general/BUILD.bazel index d0db180..e910ded 100644 --- a/tests/general/BUILD.bazel +++ b/tests/general/BUILD.bazel @@ -8,5 +8,6 @@ hocon_library( env_key_lists = ["config/env_keys"], header = "# Resolved configuration\n", optional_includes = ["optional.conf"], + resolve = True, deps = ["config/2.conf"], ) diff --git a/tests/optional_includes/BUILD.bazel b/tests/optional_includes/BUILD.bazel index 0ce3fa2..a3c9fa6 100644 --- a/tests/optional_includes/BUILD.bazel +++ b/tests/optional_includes/BUILD.bazel @@ -17,5 +17,6 @@ hocon_library( name = "bad", src = "config/1.conf", out = "bad.conf", + tags = ["manual"], deps = glob(["config/2.conf"]) + glob(["config/3.conf"]), ) diff --git a/workspace.bzl b/workspace.bzl deleted file mode 100644 index e08707b..0000000 --- a/workspace.bzl +++ /dev/null @@ -1,24 +0,0 @@ -load("@rules_jvm_external//:defs.bzl", "maven_install") - -scala_version = "2.13.12" - -def hocon_repositories(): - maven_install( - name = "hocon_maven", - artifacts = [ - "com.typesafe:config:1.4.3", - "org.rogach:scallop_2.13:5.0.1", - # Core scala libraries, compiler, etc. - "org.scala-lang:scala-compiler:{}".format(scala_version), - "org.scala-lang:scala-library:{}".format(scala_version), - "org.scala-lang:scala-reflect:{}".format(scala_version), - "org.scala-sbt:compiler-bridge_2.13:1.9.5", - ], - repositories = [ - "https://repo.maven.apache.org/maven2", - "https://maven-central.storage-download.googleapis.com/maven2", - "https://mirror.bazel.build/repo1.maven.org/maven2", - ], - fetch_sources = True, - maven_install_json = "@io_bazel_rules_hocon//:hocon_maven_install.json", - )