Skip to content

Commit

Permalink
Delete @annex_scalafmt & @annex_proto (#43)
Browse files Browse the repository at this point in the history
* delete annex_proto

* delete annex_scalafmt

---------

Co-authored-by: anna-skrodzka <annaskrod@h=gmail.com>
  • Loading branch information
anna-skrodzka and anna-skrodzka authored Oct 23, 2024
1 parent 7cc5b41 commit fa3502f
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 2,085 deletions.
11 changes: 1 addition & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,9 @@ load("@annex//:defs.bzl", annex_pinned_maven_install = "pinned_maven_install")
annex_pinned_maven_install()
scala_register_toolchains()

load("@rules_scala3//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()
load("@rules_scala3//rules/scalafmt:config.bzl", "scalafmt_default_config")
scalafmt_default_config()

load("@rules_scala3//rules/scala_proto:workspace.bzl", "scala_proto_register_toolchains", "scala_proto_repositories",)
scala_proto_repositories()
load("@annex_proto//:defs.bzl", annex_proto_pinned_maven_install = "pinned_maven_install")
annex_proto_pinned_maven_install()
scala_proto_register_toolchains()

# Load bazel skylib and google protobuf
bazel_skylib_tag = "1.0.2"
bazel_skylib_sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44"
Expand Down
22 changes: 1 addition & 21 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -114,30 +114,10 @@ load("@mezel//rules:load_mezel.bzl", "load_mezel")

load_mezel()

load("//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()
load("//rules/scalafmt:config.bzl", "scalafmt_default_config")

scalafmt_default_config(".scalafmt.conf")

load(
"//rules/scala_proto:workspace.bzl",
"scala_proto_register_toolchains",
"scala_proto_repositories",
)

scala_proto_repositories()

scala_proto_register_toolchains()

load("@annex_proto//:defs.bzl", annex_proto_pinned_maven_install = "pinned_maven_install")

annex_proto_pinned_maven_install()

load("@bazel_features//:deps.bzl", "bazel_features_deps")

bazel_features_deps()
417 changes: 0 additions & 417 deletions annex_proto_install.json

This file was deleted.

1,551 changes: 0 additions & 1,551 deletions annex_scalafmt_install.json

This file was deleted.

3 changes: 1 addition & 2 deletions docs/scalafmt.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
Create .scalafmt.conf at the repo root (may be empty). And add to the WORKSPACE

```python
load("@rules_scala3//rules/scalafmt:workspace.bzl", "scalafmt_repositories", "scalafmt_default_config")
scalafmt_repositories()
load("@rules_scala3//rules/scalafmt:config.bzl", "scalafmt_repositories")
scalafmt_default_config()
```

Expand Down
6 changes: 0 additions & 6 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,17 @@ deps-update:

bazel run @annex_deps//:pin
bazel run @annex//:pin
bazel run @annex_scalafmt//:pin
bazel run @annex_proto//:pin
cd tests && bazel run @annex_test//:pin

rg -l '#maven_install_json' --glob '*.bzl' --glob 'WORKSPACE' | xargs sed -i 's/#maven_install_json/maven_install_json/g'

REPIN=1 bazel run @unpinned_annex_deps//:pin
REPIN=1 bazel run @unpinned_annex//:pin
REPIN=1 bazel run @unpinned_annex_scalafmt//:pin
REPIN=1 bazel run @unpinned_annex_proto//:pin
cd tests && REPIN=1 bazel run @unpinned_annex_test//:pin

deps-outdated:
bazel run @annex//:outdated
bazel run @annex_deps//:outdated
bazel run @annex_scalafmt//:outdated
bazel run @annex_proto//:outdated
cd tests && bazel run @annex_test//:outdated

bzl-lint:
Expand Down
25 changes: 0 additions & 25 deletions rules/scala_proto/workspace.bzl

This file was deleted.

8 changes: 8 additions & 0 deletions rules/scalafmt/config.bzl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
def scalafmt_default_config(path = ".scalafmt.conf"):
build = []
build.append("filegroup(")
build.append(" name = \"config\",")
build.append(" srcs = [\"{}\"],".format(path))
build.append(" visibility = [\"//visibility:public\"],")
build.append(")")
native.new_local_repository(name = "scalafmt_default", build_file_content = "\n".join(build), path = "")
30 changes: 0 additions & 30 deletions rules/scalafmt/workspace.bzl

This file was deleted.

2 changes: 0 additions & 2 deletions scripts/gen-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ echo "$(dirname "$0")/.."

echo "generating dependencies for main workspace"
bazel run @unpinned_annex//:pin
bazel run @unpinned_annex_scalafmt//:pin
bazel run @unpinned_annex_proto//:pin

echo "generating dependencies for tests workspace"
cd "tests"
Expand Down
22 changes: 1 addition & 21 deletions tests/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,6 @@ annex_pinned_maven_install()

scala_register_toolchains()

load(
"@rules_scala3//rules/scala_proto:workspace.bzl",
"scala_proto_register_toolchains",
"scala_proto_repositories",
)

scala_proto_repositories()

scala_proto_register_toolchains()

load("@annex_proto//:defs.bzl", annex_proto_pinned_maven_install = "pinned_maven_install")

annex_proto_pinned_maven_install()

# load("@rules_scala3//3rdparty:workspace.bzl", "maven_dependencies")
load(":workspace.bzl", "test_dependencies")

Expand All @@ -94,13 +80,7 @@ annex_test_pinned_maven_install()

# maven_dependencies()

load("@rules_scala3//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()
load("@rules_scala3//rules/scalafmt:config.bzl", "scalafmt_default_config")

scalafmt_default_config()

Expand Down

0 comments on commit fa3502f

Please sign in to comment.