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

Remove support for godep and dep #1541

Merged
merged 2 commits into from
May 24, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions Design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -515,8 +515,6 @@ github.com/bazelbuild/buildtools/build
github.com/bazelbuild/rules_go
Used to build and test Gazelle through Bazel. Gazelle can aslo be built on its
own with the Go SDK.
github.com/pelletier/go-toml
Used to import dependencies from dep Gopkg.lock files.
golang.org/x/tools/vcs
Used during dependency resolution to determine the repository prefix for a
given import path. This uses the network.
6 changes: 4 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ bazel_dep(name = "rules_proto", version = "4.0.0")
go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")

# Known to exist since it is instantiated by rules_go itself.
use_repo(go_sdk, go_sdk = "go_default_sdk")
use_repo(
go_sdk,
go_sdk = "go_default_sdk",
)

non_module_deps = use_extension("//internal/bzlmod:non_module_deps.bzl", "non_module_deps")
use_repo(
Expand All @@ -35,7 +38,6 @@ use_repo(
"com_github_bmatcuk_doublestar_v4",
"com_github_fsnotify_fsnotify",
"com_github_google_go_cmp",
"com_github_pelletier_go_toml",
"com_github_pmezard_go_difflib",
"org_golang_x_mod",
"org_golang_x_sync",
Expand Down
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -564,8 +564,8 @@ The following flags are accepted:
The ``update-repos`` command updates repository rules. It can write the rules
to either the WORKSPACE (by default) or a .bzl file macro function. It can be
used to add new repository rules or update existing rules to the specified
version. It can also import repository rules from a ``go.mod``, ``go.work`` or a
``Gopkg.lock`` file.
version. It can also import repository rules from a ``go.mod`` or a ``go.work``
file.

.. code:: bash

Expand Down Expand Up @@ -596,7 +596,7 @@ The following flags are accepted:
+----------------------------------------------------------------------------------------------------------+----------------------------------------------+
| Import repositories from a file as `go_repository`_ rules. These rules will be added to the bottom of the WORKSPACE file or merged with existing rules. |
| |
| The lock file format is inferred from the file name. ``go.mod``, ``go.work` and, ``Gopkg.lock`` (the dep lock format) are all supported. |
| The lock file format is inferred from the file name. ``go.mod`` and ``go.work` are all supported. |
+----------------------------------------------------------------------------------------------------------+----------------------------------------------+
| :flag:`-repo_root dir` | |
+----------------------------------------------------------------------------------------------------------+----------------------------------------------+
Expand All @@ -612,7 +612,7 @@ The following flags are accepted:
+----------------------------------------------------------------------------------------------------------+----------------------------------------------+
| :flag:`-prune true|false` | :value:`false` |
+----------------------------------------------------------------------------------------------------------+----------------------------------------------+
| When true, Gazelle will remove `go_repository`_ rules that no longer have equivalent repos in the ``Gopkg.lock``/``go.mod`` file. |
| When true, Gazelle will remove `go_repository`_ rules that no longer have equivalent repos in the ``go.mod`` file. |
| |
| This flag can only be used with ``-from_file``. |
+----------------------------------------------------------------------------------------------------------+----------------------------------------------+
Expand Down
1 change: 0 additions & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ register_unittest_toolchains()
# gazelle:repository go_repository name=com_github_golang_mock importpath=github.com/golang/mock
# gazelle:repository go_repository name=com_github_golang_protobuf importpath=github.com/golang/protobuf
# gazelle:repository go_repository name=com_github_google_go_cmp importpath=github.com/google/go-cmp
# gazelle:repository go_repository name=com_github_pelletier_go_toml importpath=github.com/pelletier/go-toml
# gazelle:repository go_repository name=com_github_pmezard_go_difflib importpath=github.com/pmezard/go-difflib
# gazelle:repository go_repository name=com_github_prometheus_client_model importpath=github.com/prometheus/client_model
# gazelle:repository go_repository name=com_github_yuin_goldmark importpath=github.com/yuin/goldmark
Expand Down