Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of annex_deps #54

Merged
merged 1 commit into from
Nov 5, 2024
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
10 changes: 10 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@ http_archive(

load("@rules_jvm_external//:defs.bzl", "maven_install")

maven_install(
artifacts = [
"org.scala-sbt:librarymanagement-core_3:2.0.0-M2",
"org.scala-sbt:librarymanagement-coursier_3:2.0.0-alpha8",
],
repositories = [
"https://repo1.maven.org/maven2",
],
)

rules_cc_version = "0.0.9"

http_archive(
Expand Down
2,354 changes: 0 additions & 2,354 deletions annex_deps_install.json

This file was deleted.

6 changes: 3 additions & 3 deletions deps/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ scala_binary(
scala = "//scala:bootstrap_3",
visibility = ["//visibility:public"],
deps = [
"@annex_deps//:com_github_scopt_scopt_3",
"@annex_deps//:org_scala_sbt_librarymanagement_core_3",
"@annex_deps//:org_scala_sbt_librarymanagement_coursier_3",
"//3rdparty/jvm/com/github/scopt",
"@maven//:org_scala_sbt_librarymanagement_core_3",
"@maven//:org_scala_sbt_librarymanagement_coursier_3",
],
)
6 changes: 3 additions & 3 deletions deps/scala_deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ def scala_deps(
"--targets-file-name=" + targets_file_name,
],
deps = [
"@annex_deps//:com_github_scopt_scopt_3",
"@annex_deps//:org_scala_sbt_librarymanagement_core_3",
"@annex_deps//:org_scala_sbt_librarymanagement_coursier_3",
"//3rdparty/jvm/com/github/scopt",
"@maven//:org_scala_sbt_librarymanagement_core_3",
"@maven//:org_scala_sbt_librarymanagement_coursier_3",
],
)
5 changes: 1 addition & 4 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
deps-update:
rg -l 'maven_install_json' --glob '*.bzl' --glob 'WORKSPACE' | xargs sed -i -E 's/[^#]maven_install_json/#maven_install_json/g'

bazel run @annex_deps//: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
cd tests && REPIN=1 bazel run @unpinned_annex_test//:pin

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

bzl-lint:
Expand Down
2 changes: 0 additions & 2 deletions rules/scala/init.bzl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
load("@annex_deps//:defs.bzl", "pinned_maven_install")
load("@bazel_features//:deps.bzl", "bazel_features_deps")
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies")
Expand All @@ -21,6 +20,5 @@ def rules_scala3_init():
rules_proto_toolchains()
bazel_features_deps()

pinned_maven_install()
load_maven_dependencies()
scalafmt_default_config(".scalafmt.conf")
14 changes: 0 additions & 14 deletions rules/scala/workspace.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ filegroup(
)
"""

_ANNEX_DEPS_ARTIFACTS = [
"com.github.scopt:scopt_3:4.1.0",
"org.scala-sbt:librarymanagement-core_3:2.0.0-M2",
"org.scala-sbt:librarymanagement-coursier_3:2.0.0-alpha8",
]

repositories = [
"https://repo1.maven.org/maven2",
"https://repo.maven.apache.org/maven2",
Expand All @@ -42,14 +36,6 @@ sbt_version = "2.0.0-M2"
zinc_version = "2.0.0-alpha14"

def scala_repositories():
maven_install(
name = "annex_deps",
artifacts = _ANNEX_DEPS_ARTIFACTS,
fetch_sources = True,
maven_install_json = "@rules_scala3//:annex_deps_install.json",
repositories = repositories,
)

http_archive(
name = "compiler_bridge_2_13",
build_file_content = _SRC_FILEGROUP_BUILD_FILE_CONTENT,
Expand Down
3 changes: 0 additions & 3 deletions scripts/gen-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@
cd "$(dirname "$0")/.."
echo "$(dirname "$0")/.."

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

echo "generating dependencies for tests workspace"
cd "tests"
bazel run @unpinned_annex_test//:pin
Loading