Skip to content
This repository has been archived by the owner on Jun 7, 2023. It is now read-only.

Commit

Permalink
deps(go): Upgrade dependencies & switch away from vendored (#53)
Browse files Browse the repository at this point in the history
Move this repository away from using vendored dependencies for most packages.

This removes the vendored dependencies, switching the bazel dependencies from the vendor path to a dependency reference. The WORKSPACE file has been re-ordered, and nogo adjusted to match with the current version of rule dependencies.

The applescript mack dependency will remain vendored, to enable minor modifications to support edge cases encountered with our specific use-case.
  • Loading branch information
rtkjbeverly authored Nov 17, 2021
1 parent b59ae1a commit 6e99a7d
Show file tree
Hide file tree
Showing 738 changed files with 59 additions and 265,397 deletions.
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0.0
4.2.0
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
include:
- os: ubuntu-latest
TARGET: linux_amd64
- os: windows-latest
- os: ubuntu-latest
TARGET: windows_amd64
- os: macos-latest
TARGET: darwin_amd64
Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
TARGET: linux_amd64
- os: ubuntu-latest
TARGET: linux_arm64
- os: windows-latest
- os: ubuntu-latest
TARGET: windows_amd64
- os: macos-latest
TARGET: darwin_amd64
Expand Down
32 changes: 13 additions & 19 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ pkg_tar(
# gazelle:prefix github.com/rtkwlf/bmx
gazelle(name = "gazelle")

gazelle(
name = "gazelle-update-repos",
args = [
"-from_file=go.mod",
"-to_macro=bazel/go/deps.bzl%go_dependencies",
"-prune",
],
command = "update-repos",
)

go_library(
name = "go_default_library",
srcs = [
Expand All @@ -31,8 +41,8 @@ go_library(
"//saml/identityProviders/okta:go_default_library",
"//saml/serviceProviders:go_default_library",
"//saml/serviceProviders/aws:go_default_library",
"//vendor/github.com/aws/aws-sdk-go/service/sts:go_default_library",
"//vendor/gopkg.in/ini.v1:go_default_library",
"@com_github_aws_aws_sdk_go//service/sts:go_default_library",
"@in_gopkg_ini_v1//:go_default_library",
],
)

Expand All @@ -42,8 +52,8 @@ go_test(
"console_test.go",
"print_test.go",
],
embed = [":go_default_library"],
deps = [
":go_default_library",
"//mocks:go_default_library",
"//saml/identityProviders/okta:go_default_library",
"//saml/serviceProviders/aws/mocks:go_default_library",
Expand All @@ -55,20 +65,4 @@ nogo(
config = "nogo_config.json",
vet = True,
visibility = ["//visibility:public"],
deps = [
"@org_golang_x_tools//go/analysis/passes/asmdecl:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/assign:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/composite:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/copylock:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/httpresponse:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/loopclosure:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/lostcancel:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/shift:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/stdmethods:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/structtag:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/tests:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/unreachable:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/unsafeptr:go_tool_library",
"@org_golang_x_tools//go/analysis/passes/unusedresult:go_tool_library",
],
)
36 changes: 17 additions & 19 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -8,41 +8,39 @@ http_archive(
url = "https://github.com/bazelbuild/rules_pkg/releases/download/0.3.0/rules_pkg-0.3.0.tar.gz",
)

load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")

rules_pkg_dependencies()

http_archive(
name = "io_bazel_rules_go",
sha256 = "7904dbecbaffd068651916dce77ff3437679f9d20e1a7956bff43826e7645fcc",
sha256 = "2b1641428dff9018f9e85c0384f03ec6c10660d935b750e3fa1492a281a53b0f",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.25.1/rules_go-v0.25.1.tar.gz",
"https://github.com/bazelbuild/rules_go/releases/download/v0.25.1/rules_go-v0.25.1.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.29.0/rules_go-v0.29.0.zip",
"https://github.com/bazelbuild/rules_go/releases/download/v0.29.0/rules_go-v0.29.0.zip",
],
)

load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")

go_rules_dependencies()

go_register_toolchains(
nogo = "@//:nogo",
version = "1.16.7",
)

http_archive(
name = "bazel_gazelle",
sha256 = "222e49f034ca7a1d1231422cdb67066b885819885c356673cb1f72f748a3c9d4",
sha256 = "de69a09dc70417580aabf20a28619bb3ef60d038470c7cf8442fafcf627c21cb",
urls = [
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.3/bazel-gazelle-v0.22.3.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.22.3/bazel-gazelle-v0.22.3.tar.gz",
"https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
"https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.24.0/bazel-gazelle-v0.24.0.tar.gz",
],
)

load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")
load("//bazel/go:deps.bzl", "go_dependencies")
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies")
load("@rules_pkg//:deps.bzl", "rules_pkg_dependencies")

# gazelle:repository_macro bazel/go/deps.bzl%go_dependencies
go_dependencies()

go_rules_dependencies()

go_register_toolchains(
nogo = "@//:nogo",
version = "1.16.7",
)

gazelle_dependencies()

rules_pkg_dependencies()
Loading

0 comments on commit 6e99a7d

Please sign in to comment.