[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/go-mode 1bbe1d0 451/495: update default go-packages-functi
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/go-mode 1bbe1d0 451/495: update default go-packages-function to use go list |
Date: |
Sat, 7 Aug 2021 09:06:07 -0400 (EDT) |
branch: elpa/go-mode
commit 1bbe1d0cb88564e6c5b74ccd78ab87a8b9998374
Author: Peter Sanford <psanford@sanford.io>
Commit: Muir Manders <muir@mnd.rs>
update default go-packages-function to use go list
The previous default, go-packages-native doesn't work well with the Go
build cache and Go modules. Fixing it would require us to reimplement
a lot of the `go list` logic in elisp (and continue to maintain it for
future changes to the go tool). It doesn't make sense to do that as
the original reason for the elisp implementation (speed) is much less
of an issue when using modules.
Fixes #298
Closes: #299 [via git-merge-pr]
---
go-mode.el | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/go-mode.el b/go-mode.el
index 5691959..e16556c 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -185,15 +185,15 @@ a `before-save-hook'."
:type '(repeat (list regexp (choice (repeat string) function)))
:group 'go)
-(defcustom go-packages-function 'go-packages-native
+(defcustom go-packages-function 'go-packages-go-list
"Function called by `go-packages' to determine the list of available
packages.
This is used in e.g. tab completion in `go-import-add'.
-This package provides two functions: `go-packages-native' uses
+This package provides two functions: `go-packages-go-list' uses
+'go list all' to determine all Go packages. `go-packages-native' uses
elisp to find all .a files in all /pkg/ directories.
-`go-packages-go-list' uses 'go list all' to determine all Go
-packages. `go-packages-go-list' generally produces more accurate
-results, but can be slower than `go-packages-native'."
+`go-packages-native' is obsolete as it doesn't behave correctly with
+the Go build cache or Go modules."
:type 'function
:package-version '(go-mode . 1.4.0)
:group 'go)
@@ -1950,8 +1950,11 @@ If IGNORE-CASE is non-nil, the comparison is
case-insensitive."
(funcall go-packages-function))
(defun go-packages-native ()
- "Return a list of all installed Go packages.
-It looks for archive files in /pkg/."
+ "Return a list of all installed Go packages. Obsolete.
+It looks for archive files in /pkg/. This strategy does not work
+well with the Go build cache or Go modules.
+
+You should use `go-packages-go-list' instead."
(sort
(delete-dups
(cl-mapcan
- [nongnu] elpa/go-mode 10d6ab4 486/495: Allow leading spaces for compilation error message, (continued)
- [nongnu] elpa/go-mode 10d6ab4 486/495: Allow leading spaces for compilation error message, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode e79970d 224/495: fix beginning-of-defun for abs(count) > 1, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode cec546c 306/495: Clarify some points in NEWS, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 5c1c546 307/495: Don't fontify parenthesis of multi-line type declaration, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 99b06da 408/495: Describe gofmt-args in the readme and the gofmt docstring (also gofmt-command), ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 7c50c80 410/495: Always move back to same column after applying rcs patch, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode e20a54a 426/495: Speed up go-previous-line-has-dangling-op-p, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 1650ae5 434/495: Fix multiline case statement indent., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 1fcf76d 435/495: Fix indentation regexes to be case insensitive, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 8796ec6 446/495: indent: fix floating point literal with trailing point, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 1bbe1d0 451/495: update default go-packages-function to use go list,
ELPA Syncer <=
- [nongnu] elpa/go-mode 50e15c7 457/495: Add major mode for go.mod files: go-dot-mod-mode, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode a414da8 465/495: Fontify "font-lock-negation-char-face", ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 1ef3e95 476/495: Fix fontification of single line composite literal., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode db8284d 485/495: Handle godef "no object" error, ELPA Syncer, 2021/08/07