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
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
bazelbuild/6.4.0
7.4.1
15 changes: 7 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to use the bazel-contrib/setup-bazel@0.8.5 step like we do in the other rule sets?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, I'm surprised the builds pass without it. I'll add it.

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
4 changes: 2 additions & 2 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -18,6 +18,6 @@ rewrite.rules = [
SortImports
]
runner.fatalWarnings = true
unindentTopLevelOperators = false
indentOperator.exemptScope = oldTopLevel
trailingCommas = always
newlines.afterCurlyLambdaParams = keep
10 changes: 0 additions & 10 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,10 +0,0 @@
load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier")

buildifier(
name = "buildifier",
)

buildifier(
name = "buildifier_check",
mode = "check",
)
42 changes: 42 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -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")
499 changes: 499 additions & 0 deletions MODULE.bazel.lock

Large diffs are not rendered by default.

131 changes: 0 additions & 131 deletions WORKSPACE

This file was deleted.

10 changes: 10 additions & 0 deletions dev/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
load("@buildifier_prebuilt//:rules.bzl", "buildifier")

buildifier(
name = "buildifier",
)

buildifier(
name = "buildifier_check",
mode = "check",
)
2 changes: 1 addition & 1 deletion hocon-compiler/src/ConfigMerger.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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")}",
)
}
}
Expand Down
88 changes: 77 additions & 11 deletions hocon_maven_install.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down Expand Up @@ -275,6 +275,7 @@
],
"org.scala-sbt:compiler-bridge_2.13": [
"scala",
"scala.reflect",
"xsbt"
],
"org.scala-sbt:compiler-interface": [
Expand Down Expand Up @@ -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"
}
Loading