Skip to content

Commit

Permalink
delete annex_scalafmt
Browse files Browse the repository at this point in the history
  • Loading branch information
anna-skrodzka committed Oct 22, 2024
1 parent e4a0107 commit da083c1
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 1,605 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ 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 bazel skylib and google protobuf
Expand Down
8 changes: 1 addition & 7 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,7 @@ 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")

Expand Down
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
3 changes: 0 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,17 @@ deps-update:

bazel run @annex_deps//:pin
bazel run @annex//:pin
bazel run @annex_scalafmt//: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
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
cd tests && bazel run @annex_test//:outdated

bzl-lint:
Expand Down
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.

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

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

echo "generating dependencies for tests workspace"
cd "tests"
Expand Down
8 changes: 1 addition & 7 deletions tests/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -80,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 da083c1

Please sign in to comment.