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

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

[nongnu] elpa/haskell-tng-mode 82312a2 126/385: working compilation matc


From: ELPA Syncer
Subject: [nongnu] elpa/haskell-tng-mode 82312a2 126/385: working compilation matchers
Date: Tue, 5 Oct 2021 23:59:15 -0400 (EDT)

branch: elpa/haskell-tng-mode
commit 82312a246b07d425cb50943b2cc4bc02d4823e84
Author: Tseen She <ts33n.sh3@gmail.com>
Commit: Tseen She <ts33n.sh3@gmail.com>

    working compilation matchers
---
 haskell-tng-compile.el                        | 21 ++++++++++++++++++---
 test/src/ghc-8.4.4-error.compile.faceup       |  2 +-
 test/src/ghc-8.4.4-errorspan.compile.faceup   |  2 +-
 test/src/ghc-8.4.4-warning.compile.faceup     |  2 +-
 test/src/ghc-8.4.4-warningspan.compile.faceup |  2 +-
 test/src/hspec-failure.compile.faceup         |  2 +-
 6 files changed, 23 insertions(+), 8 deletions(-)

diff --git a/haskell-tng-compile.el b/haskell-tng-compile.el
index aa3d769..26afe98 100644
--- a/haskell-tng-compile.el
+++ b/haskell-tng-compile.el
@@ -17,10 +17,25 @@
 ;; TODO set compilation-directory when opening the file
 ;; TODO set compilation-environment to include TASTY envvars
 
-(defvar haskell-tng-compile-error-regexp-alist
+(defvar haskell-tng-compilation-error-regexp-alist
+  (let ((file '(: (group (+ any) ".hs")))
+        (num '(: (group (+ digit)))))
+    `(;; ghc errors / warnings (including -ferror-spans)
+      (,(rx-to-string `(: bol ,file ":" ,num ":" ,num (? "-" ,num) ": error:"))
+       1 2 (3 . 4) 2 1)
+      (,(rx-to-string `(: bol ,file ":" ,num ":" ,num (? "-" ,num) ": 
warning:"))
+       1 2 (3 . 4) 1 1)
+      ;; FIXME multi-line error spans (and tests)
+
+      ;; hspec
+      (,(rx-to-string `(: bol (+ space) ,file ":" ,num ":" ,num ":"))
+       1 2 3 2 1)
+      ;; tasty
+      (,(rx-to-string
+         `(: bol (+ space) "error, called at" (+ space) ,file ":" ,num ":" 
,num " in "))
+       1 2 3 2 1)
+      ))
   "The `compilation-error-regexp-alist' for `haskell-tng'."
-  ;; FIXME error-regexp-alist
-  nil
   )
 
 (defvar haskell-tng-compile:history '("cabal v2-build -O0"))
diff --git a/test/src/ghc-8.4.4-error.compile.faceup 
b/test/src/ghc-8.4.4-error.compile.faceup
index 030818c..1c9e51d 100644
--- a/test/src/ghc-8.4.4-error.compile.faceup
+++ b/test/src/ghc-8.4.4-error.compile.faceup
@@ -10,7 +10,7 @@ Building library for stackage-to-hackage-1.1.0..
 [1 of 2] Compiling StackageToHackage.Stackage ( 
lib/StackageToHackage/Stackage.hs, 
/home/tseenshe/stack2cabal/dist-newstyle/build/x86_64-linux/ghc-8.4.4/stackage-to-hackage-1.1.0/noopt/build/StackageToHackage/Stackage.o
 )
 [2 of 2] Compiling StackageToHackage.Hackage ( 
lib/StackageToHackage/Hackage.hs, 
/home/tseenshe/stack2cabal/dist-newstyle/build/x86_64-linux/ghc-8.4.4/stackage-to-hackage-1.1.0/noopt/build/StackageToHackage/Hackage.o
 )
 
-«U:«:compilation-error:lib/StackageToHackage/Hackage.hs»:«:compilation-line-number:33»:«:compilation-column-number:16»:»
 error:
+«U:«:compilation-error:lib/StackageToHackage/Hackage.hs»»:«:compilation-line-number:33»:«:compilation-column-number:16»:
 error:
     parse error on input ‘=’
     Perhaps you need a 'let' in a 'do' block?
     e.g. 'let x = 5' instead of 'x = 5'
diff --git a/test/src/ghc-8.4.4-errorspan.compile.faceup 
b/test/src/ghc-8.4.4-errorspan.compile.faceup
index aca64c8..a399f37 100644
--- a/test/src/ghc-8.4.4-errorspan.compile.faceup
+++ b/test/src/ghc-8.4.4-errorspan.compile.faceup
@@ -10,7 +10,7 @@ Building library for stackage-to-hackage-1.1.0..
 [1 of 2] Compiling StackageToHackage.Stackage
 [2 of 2] Compiling StackageToHackage.Hackage
 
-«U:«:compilation-error:lib/StackageToHackage/Hackage.hs»:«:compilation-line-number:35»:«:compilation-column-number:16»-«:compilation-column-number:18»:»
 error:
+«U:«:compilation-error:lib/StackageToHackage/Hackage.hs»»:«:compilation-line-number:35»:«:compilation-column-number:16»-«:compilation-column-number:18»:
 error:
     parse error on input ‘...’
    |
 35 |       freeze = ...
diff --git a/test/src/ghc-8.4.4-warning.compile.faceup 
b/test/src/ghc-8.4.4-warning.compile.faceup
index 734a22e..9f652e5 100644
--- a/test/src/ghc-8.4.4-warning.compile.faceup
+++ b/test/src/ghc-8.4.4-warning.compile.faceup
@@ -10,7 +10,7 @@ Building library for stackage-to-hackage-1.1.0..
 [1 of 2] Compiling StackageToHackage.Stackage ( 
lib/StackageToHackage/Stackage.hs, 
/home/tseenshe/stack2cabal/dist-newstyle/build/x86_64-linux/ghc-8.4.4/stackage-to-hackage-1.1.0/noopt/build/StackageToHackage/Stackage.o
 )
 [2 of 2] Compiling StackageToHackage.Hackage ( 
lib/StackageToHackage/Hackage.hs, 
/home/tseenshe/stack2cabal/dist-newstyle/build/x86_64-linux/ghc-8.4.4/stackage-to-hackage-1.1.0/noopt/build/StackageToHackage/Hackage.o
 )
 
-«U:«:compilation-warning:lib/StackageToHackage/Hackage.hs»:«:compilation-line-number:13»:«:compilation-column-number:1»:
 warning:» [-Wunused-imports]
+«U:«:compilation-warning:lib/StackageToHackage/Hackage.hs»»:«:compilation-line-number:13»:«:compilation-column-number:1»:
 warning: [-Wunused-imports]
     The qualified import of ‘Data.ByteString’ is redundant
       except perhaps to import instances from ‘Data.ByteString’
     To import instances alone, use: import Data.ByteString()
diff --git a/test/src/ghc-8.4.4-warningspan.compile.faceup 
b/test/src/ghc-8.4.4-warningspan.compile.faceup
index b2bcd41..3be8863 100644
--- a/test/src/ghc-8.4.4-warningspan.compile.faceup
+++ b/test/src/ghc-8.4.4-warningspan.compile.faceup
@@ -10,7 +10,7 @@ Building library for stackage-to-hackage-1.1.0..
 [1 of 2] Compiling StackageToHackage.Stackage
 [2 of 2] Compiling StackageToHackage.Hackage
 
-«U:«:compilation-warning:lib/StackageToHackage/Hackage.hs»:«:compilation-line-number:13»:«:compilation-column-number:1»-«:compilation-column-number:51»:
 warning:» [-Wunused-imports]
+«U:«:compilation-warning:lib/StackageToHackage/Hackage.hs»»:«:compilation-line-number:13»:«:compilation-column-number:1»-«:compilation-column-number:51»:
 warning: [-Wunused-imports]
     The qualified import of ‘Data.ByteString’ is redundant
       except perhaps to import instances from ‘Data.ByteString’
     To import instances alone, use: import Data.ByteString()
diff --git a/test/src/hspec-failure.compile.faceup 
b/test/src/hspec-failure.compile.faceup
index a0fe49e..0e685b3 100644
--- a/test/src/hspec-failure.compile.faceup
+++ b/test/src/hspec-failure.compile.faceup
@@ -725,7 +725,7 @@ Hpack
 
 Failures:
 
-«U:  
«:compilation-error:test/HpackSpec.hs»:«:compilation-line-number:80»:«:compilation-column-number:15»:»
 
+  
«U:«:compilation-error:test/HpackSpec.hs»»:«:compilation-line-number:80»:«:compilation-column-number:15»:
 
   1) Hpack.hpackResult, with existing cabal file, when cabal file was created 
with hpack >= 0.20.0, when hash is present, when exsting cabal file was 
generated with a newer version of hpack, does not overwrite existing cabal file
        not expected: "cabal-version: 1.12\n\n-- This file has been generated 
from package.yaml by hpack version 0.22.0.\n--\n-- see: 
https://github.com/sol/hpack\n--\n-- hash: 
224b158530d1d066069f18794673f6a7a41f689d26f27fe8cd505cef259f35a9\n\nname:       
    foo\nversion:        0.1.0\nbuild-type:     Simple\n"
 



reply via email to

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