emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/go-mode 648ad3d 311/495: Use null-device instead of /dev/n


From: ELPA Syncer
Subject: [nongnu] elpa/go-mode 648ad3d 311/495: Use null-device instead of /dev/null
Date: Sat, 7 Aug 2021 09:05:38 -0400 (EDT)

branch: elpa/go-mode
commit 648ad3d46779b3c58e5c6e62d40b4153e430dea2
Author: Dominik Honnef <dominik@honnef.co>
Commit: Dominik Honnef <dominik@honnef.co>

    Use null-device instead of /dev/null
    
    Older versions of Go (<1.6) would complain even about /dev/null, so it
    made no difference if we used /dev/null or NUL on Windows. Go 1.6,
    however, will not complain, so use null-device to work correctly on
    Windows.
---
 NEWS       | 2 ++
 go-mode.el | 7 +------
 2 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/NEWS b/NEWS
index 373c145..dffd449 100644
--- a/NEWS
+++ b/NEWS
@@ -62,6 +62,8 @@ go-mode-1.4.0 (???)
  * Avoid warnings by the byte compiler -- Use cl-lib instead of cl,
    and utilize a macro to conditionally compile fallback code.
 
+ * Use null-device instead of /dev/null to work better on Windows.
+
 go-mode-1.3.1 (2015-07-03)
 
  * The 1.3.0 release forgot to update the version in the package
diff --git a/go-mode.el b/go-mode.el
index 812f37a..6658bed 100644
--- a/go-mode.el
+++ b/go-mode.el
@@ -1412,11 +1412,6 @@ archive files in /pkg/"
     (split-string (buffer-string) "\n" t)))
 
 (defun go-unused-imports-lines ()
-  ;; FIXME Technically, -o /dev/null fails in quite some cases (on
-  ;; Windows, when compiling from within GOPATH). Practically,
-  ;; however, it has the same end result: There won't be a
-  ;; compiled binary/archive, and we'll get our import errors when
-  ;; there are any.
   (reverse (remove nil
                    (mapcar
                     (lambda (line)
@@ -1429,7 +1424,7 @@ archive files in /pkg/"
                                    (concat go-command
                                            (if (string-match "_test\\.go$" 
buffer-file-truename)
                                                " test -c"
-                                             " build -o /dev/null")
+                                             (concat " build -o " null-device))
                                            " -gcflags=-e"
                                            " "
                                            (shell-quote-argument 
(file-truename buffer-file-name)))) "\n")))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]