[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/haskell-tng-mode f5977b6 339/385: bugfix for source downlo
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/haskell-tng-mode f5977b6 339/385: bugfix for source downloading |
Date: |
Wed, 6 Oct 2021 00:00:00 -0400 (EDT) |
branch: elpa/haskell-tng-mode
commit f5977b602891decfd989f80642675fe0d9d0a302
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>
bugfix for source downloading
---
haskell-tng-hsinspect.el | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
diff --git a/haskell-tng-hsinspect.el b/haskell-tng-hsinspect.el
index 4509917..1a95dc4 100644
--- a/haskell-tng-hsinspect.el
+++ b/haskell-tng-hsinspect.el
@@ -16,6 +16,7 @@
(require 'array)
(require 'subr-x)
+(require 'tar-mode)
(require 'url)
;; Popups are not supported in stock Emacs so an extension is necessary:
@@ -70,13 +71,20 @@ TODO: support local / git packages by consulting
`plan.json'"
;; We can't expect stack to reveal source locations because it
;; obfuscates all downloads. Cabal has "cabal get" but it is broken.
;; WORKAROUND https://github.com/haskell/cabal/issues/6443
- (message "%s was not found" tarball)
- (url-copy-file
- (haskell-tng--hsinspect-hackage-source srcid)
- tarball))
+ (let ((remote (haskell-tng--hsinspect-hackage-source srcid))
+ (dir (file-name-directory tarball)))
+ (unless (file-directory-p dir)
+ (make-directory dir t))
+ (message "%s was not found, attempting to download %s" tarball
remote)
+ (url-copy-file remote tarball)))
(message "Loading %s from %s" sym tarball)
(find-file tarball)
+ ;; TODO it would be a faster UX if we used ZIP instead of TAR.GZ because
+ ;; this requires us to decompress the entire file to find the index,
+ ;; and then again until we reach the entry we want to load. But that
+ ;; would come with the cost of recompressing, plus the storage cost
+ ;; of caching it all.
(let ((archive (current-buffer)))
(goto-char (point-min))
(re-search-forward (rx-to-string `(: (* any) ,file)))
@@ -398,7 +406,7 @@ Does not persist the cache changes to disk."
"Finds and checks the hsinspect binary for the current buffer.
This is uncached, prefer `haskell-tng--hsinspect-exe'."
- (let ((supported '("0.0.7" "0.0.8" "0.0.9" "0.0.10"))
+ (let ((supported '("0.0.7" "0.0.8" "0.0.9" "0.0.10" "0.0.11"))
(bin
(car
(last
@@ -437,5 +445,11 @@ This is uncached, prefer `haskell-tng--hsinspect-exe'."
(backward-sexp)
(ignore-errors (read (current-buffer)))))))
+(defun haskell-tng-hsinspect (&optional alt)
+ "Fill the `hsinspect' caches"
+ (interactive "P")
+ (haskell-tng--hsinspect-imports nil alt)
+ (haskell-tng--hsinspect-index alt))
+
(provide 'haskell-tng-hsinspect)
;;; haskell-tng-hsinspect.el ends here
- [nongnu] elpa/haskell-tng-mode 99287ef 316/385: stack projectile defaults, (continued)
- [nongnu] elpa/haskell-tng-mode 99287ef 316/385: stack projectile defaults, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode dbb2b7a 350/385: block / return-from instead of catch / throw, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode d611f0b 322/385: thots, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode a717a50 331/385: allow workflow with qualified imports as default, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 70e649b 330/385: import qualified is even smarter, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 5a064fd 328/385: hypen prefix asks to qualify the import, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode c42b5c5 338/385: use url-copy-path instead of shelling out, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 8405852 351/385: document bugs and ideas, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode f429326 327/385: thots, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 8bb3c34 363/385: the in-memory cache doesn't have to cache nil, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode f5977b6 339/385: bugfix for source downloading,
ELPA Syncer <=
- [nongnu] elpa/haskell-tng-mode 9359c7b 349/385: cl-loop, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode f5d76fc 348/385: tidy docs, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 3b37524 360/385: bugfix for qualified imports when the cache was bad, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode fe2b164 372/385: fix the build, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 63225d5 374/385: use .ghc.path to find hsinspect, build tool agnostic, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 3d1122b 116/385: notes on regexps, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode c3793b2 176/385: canonical until macro, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode b7cb5b9 214/385: starting to create imenu, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 5306ae2 217/385: fix type faces with constraints, ELPA Syncer, 2021/10/06
- [nongnu] elpa/haskell-tng-mode 5f81d6b 219/385: bump python version, ELPA Syncer, 2021/10/06