[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-tng-mode 4dc6f76 313/385: fix hsinspect discoverab
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-tng-mode 4dc6f76 313/385: fix hsinspect discoverability |
Date: |
Tue, 5 Oct 2021 23:59:55 -0400 (EDT) |
branch: elpa/haskell-tng-mode
commit 4dc6f76ad49e3ea1714f9d7ef808f5ccbc131265
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>
fix hsinspect discoverability
---
haskell-tng-extra-stack.el | 2 +-
haskell-tng-hsinspect.el | 21 +++++++++++++--------
haskell-tng-util.el | 5 ++---
3 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/haskell-tng-extra-stack.el b/haskell-tng-extra-stack.el
index ee0ab33..95c4084 100644
--- a/haskell-tng-extra-stack.el
+++ b/haskell-tng-extra-stack.el
@@ -14,7 +14,7 @@
(setq
haskell-tng--compile-dominating-project (rx "stack.yaml")
- haskell-tng--hsinspect-which-hsinspect "stack exec --silent which --
hsinspect"
+ haskell-tng--hsinspect-which-hsinspect "stack build --silent hsinspect &&
stack exec --silent which -- hsinspect"
haskell-tng--compile-history '("stack build --fast --no-interleaved-output
--ghc-options=\"-j\" --no-run-tests"
"stack build --fast --no-interleaved-output
--ghc-options=\"-j\""))
diff --git a/haskell-tng-hsinspect.el b/haskell-tng-hsinspect.el
index e002be9..a7c647f 100644
--- a/haskell-tng-hsinspect.el
+++ b/haskell-tng-hsinspect.el
@@ -150,23 +150,28 @@ A prefix argument ensures that caches are flushes."
flush-cache)))
(defvar haskell-tng--hsinspect-which-hsinspect
- "cabal exec -v0 which -- hsinspect")
+ "cabal build -v0 hsinspect && cabal exec -v0 which -- hsinspect")
(defun haskell-tng--hsinspect-which-hsinspect ()
"Finds and checks the hsinspect binary for the current buffer.
This is uncached, prefer `haskell-tng--hsinspect-exe'."
- (let ((bin
- (string-trim
- (shell-command-to-string
- haskell-tng--hsinspect-which-hsinspect))))
+ (let ((supported '("0.0.7" "0.0.8"))
+ (bin
+ (car
+ (last
+ (split-string
+ (string-trim
+ (shell-command-to-string
+ haskell-tng--hsinspect-which-hsinspect))
+ "\n")))))
(if (file-executable-p bin)
(let ((version
(string-trim
(shell-command-to-string (concat bin " --version")))))
- (if (member version '("0.0.7" "0.0.8"))
+ (if (member version supported)
+ ;; TODO from 0.0.8+ do a --ghc-version check (a common failure
mode)
bin
- (user-error "The hsinspect binary is the wrong version: %S"
version)))
- ;; TODO from 0.0.8+ do a --ghc-version check (a common failure mode)
+ (user-error "The hsinspect binary is the wrong version: got `%s'
require `%s'" version supported)))
(user-error "The hsinspect binary is not executable: %S" bin))))
(defun haskell-tng--hsinspect (flush-cache &rest params)
diff --git a/haskell-tng-util.el b/haskell-tng-util.el
index a4472dd..c945dbc 100644
--- a/haskell-tng-util.el
+++ b/haskell-tng-util.el
@@ -155,14 +155,13 @@ nil return values are NOT cached.
NO-WORK skips WORK and only queries the cache.
RESET deletes the cache if it exists."
- (let ((cache-file
+ (let (jka-compr-verbose ;; disables gzip noise
+ (cache-file
(concat (xdg-cache-home) "/haskell-tng/" key ".gz")))
(when (and reset (file-exists-p cache-file))
(delete-file cache-file))
(if (file-exists-p cache-file)
(with-temp-buffer
- ;; TODO set jka-compr-verbose to nil to disable messages (currently
- ;; giving useful debugging hints so left on).
(insert-file-contents cache-file)
(goto-char (point-min))
(ignore-errors (read (current-buffer))))
- [nongnu] elpa/haskell-tng-mode 487989b 241/385: skeleton for contrib-stack, (continued)
- [nongnu] elpa/haskell-tng-mode 487989b 241/385: skeleton for contrib-stack, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode cea8b23 240/385: proof of concept getting the ghcflags from cabal, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 6699829 277/385: cleaner fqns, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 0abe075 246/385: only create ghcflags for relative dirs, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 2cfae9e 276/385: bump hsinspect, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 949f857 242/385: support component directories, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 7ae3f46 244/385: more workarounds for hsinspect setup, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 494aef4 302/385: cache the results of hsinspect imports, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 598b372 288/385: typo, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode e0fd8f4 303/385: abstract the hsinspect caching logic, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 4dc6f76 313/385: fix hsinspect discoverability,
ELPA Syncer <=
- [nongnu] elpa/haskell-tng-mode eb4591f 287/385: document popup dependency, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 48729c8 308/385: more cache cleanups, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 6299e6d 317/385: amazeballs idea, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode aa9cdbb 226/385: hacky file-specific language extensions, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode a4f06f5 237/385: an idea, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 0113f37 273/385: hsinspect should work on symbols with FQNs, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 06e4e76 245/385: support running scripts on nix, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 3179294 267/385: rename ormolu command, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 388df13 282/385: refactor calls to hsinspect to allow for more callers, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 067e8a7 280/385: bugfix fontification of erroneous matches inside strings, ELPA Syncer, 2021/10/06