@@ -562,53 +562,55 @@ It delegates the actual error content to the eval or op handler."
562
562
(t (cider-default-err-eval-print-handler))))
563
563
564
564
565
- (defconst cider-clojure-1.10--location `((or " at ("
566
- (sequence " at "
567
- (minimal-match (one-or-more anything)) ; ; the fully-qualified name of the function that triggered the error
568
- " (" ))
569
- (group-n 2 (minimal-match (zero-or-more anything)))
570
- " :"
571
- (group-n 3 (one-or-more (any " -" digit))) ; ; line numbers may be negative (#3687)
572
- (optional " :" (group-n 4 (one-or-more (any " -" digit))))
573
- " )." ))
574
-
575
- (defconst cider-clojure-1.10-error (append `(sequence
576
- " Syntax error "
577
- (minimal-match (zero-or-more anything))
578
- (or " compiling "
579
- " macroexpanding "
580
- " reading source " )
581
- (minimal-match (zero-or-more anything)))
582
- cider-clojure-1.10--location))
583
-
584
- (defconst cider-clojure-unexpected-error (append `(sequence
585
- " Unexpected error ("
586
- (minimal-match (one-or-more anything))
587
- " ) "
588
- (or " compiling "
589
- " macroexpanding "
590
- " reading source " )
591
- (minimal-match (one-or-more anything)))
592
- cider-clojure-1.10--location))
593
-
594
- (defconst cider-clojure-warning `(sequence
595
- (minimal-match (zero-or-more anything))
596
- (group-n 1 " warning" )
597
- " , "
598
- (group-n 2 (minimal-match (zero-or-more anything)))
599
- " :"
600
- (group-n 3 (one-or-more (any " -" digit)))
601
- (optional " :" (group-n 4 (one-or-more (any " -" digit))))
602
- " - " ))
565
+ (defconst cider-clojure-1.10--location
566
+ '(sequence
567
+ (or " at ("
568
+ (sequence " at "
569
+ (minimal-match (one-or-more anything)) ; ; the fully-qualified name of the function that triggered the error
570
+ " (" ))
571
+ (group-n 2 (minimal-match (zero-or-more anything))) ; source file
572
+ " :" (group-n 3 (one-or-more (any " -" digit))) ; line number, may be negative (#3687)
573
+ (optional
574
+ " :" (group-n 4 (one-or-more (any " -" digit)))) ; column number
575
+ " )." ))
576
+
577
+ (defconst cider-clojure-1.10-error
578
+ `(sequence
579
+ " Syntax error "
580
+ (minimal-match (zero-or-more anything))
581
+ (or " compiling "
582
+ " macroexpanding "
583
+ " reading source " )
584
+ (minimal-match (zero-or-more anything))
585
+ , cider-clojure-1 .10--location))
586
+
587
+ (defconst cider-clojure-unexpected-error
588
+ `(sequence
589
+ " Unexpected error (" (minimal-match (one-or-more anything)) " ) "
590
+ (or " compiling "
591
+ " macroexpanding "
592
+ " reading source " )
593
+ (minimal-match (one-or-more anything))
594
+ , cider-clojure-1 .10--location))
595
+
596
+ (defconst cider-clojure-warning
597
+ `(sequence
598
+ (minimal-match (zero-or-more anything))
599
+ (group-n 1 " warning" )
600
+ " , " (group-n 2 (minimal-match (zero-or-more anything)))
601
+ " :" (group-n 3 (one-or-more (any " -" digit)))
602
+ (optional
603
+ " :" (group-n 4 (one-or-more (any " -" digit))))
604
+ " - " ))
603
605
604
606
; ; Please keep this in sync with `cider-clojure-compilation-error-regexp' ,
605
607
; ; which is a subset of these regexes.
606
608
(defconst cider-clojure-compilation-regexp
607
- (eval
608
- `(rx bol (or , cider-clojure-warning
609
- , cider-clojure-1 .10-error
610
- , cider-clojure-unexpected-error ))
611
- t )
609
+ (rx-to-string
610
+ `(seq bol (or , cider-clojure-warning
611
+ , cider-clojure-1 .10-error
612
+ , cider-clojure-unexpected-error ))
613
+ 'nogroup )
612
614
" A few example values that will match:
613
615
\" Reflection warning, /tmp/foo/src/foo/core.clj:14:1 - \"
614
616
\" CompilerException java.lang.RuntimeException: Unable to resolve symbol: \\
@@ -617,10 +619,10 @@ lol in this context, compiling:(/foo/core.clj:10:1)\"
617
619
\" Unexpected error (ClassCastException) macroexpanding defmulti at (src/haystack/parser.cljc:21:1).\" " )
618
620
619
621
(defconst cider-clojure-compilation-error-regexp
620
- (eval
621
- `(rx bol (or , cider-clojure-1 .10-error
622
- , cider-clojure-unexpected-error ))
623
- t )
622
+ (rx-to-string
623
+ `(seq bol (or , cider-clojure-1 .10-error
624
+ , cider-clojure-unexpected-error ))
625
+ 'nogroup )
624
626
" Like `cider-clojure-compilation-regexp' ,
625
627
but excluding warnings such as reflection warnings.
626
628
@@ -631,26 +633,26 @@ lol in this context, compiling:(/foo/core.clj:10:1)\"
631
633
\" Unexpected error (ClassCastException) macroexpanding defmulti at (src/haystack/parser.cljc:21:1).\" " )
632
634
633
635
(defconst cider--clojure-execution-error-regexp
634
- ( append `(sequence
635
- " Execution error "
636
- (or (sequence " ("
637
- (minimal-match (one-or-more anything))
638
- " )" )
639
- (minimal-match (zero-or-more anything) )))
640
- cider-clojure-1.10--location))
636
+ `(sequence
637
+ " Execution error "
638
+ (or (sequence " ("
639
+ (minimal-match (one-or-more anything))
640
+ " )" )
641
+ (minimal-match (zero-or-more anything)))
642
+ , cider-clojure-1 .10--location))
641
643
642
644
(defconst cider--clojure-spec-execution-error-regexp
643
- ( append `(sequence
644
- " Execution error - invalid arguments to "
645
- (minimal-match (one-or-more anything))
646
- " " )
647
- cider-clojure-1.10--location))
645
+ `(sequence
646
+ " Execution error - invalid arguments to "
647
+ (minimal-match (one-or-more anything))
648
+ " "
649
+ , cider-clojure-1 .10--location))
648
650
649
651
(defconst cider-clojure-runtime-error-regexp
650
- (eval
651
- `(rx bol (or , cider--clojure-execution-error-regexp
652
- , cider--clojure-spec-execution-error-regexp ))
653
- t )
652
+ (rx-to-string
653
+ `(seq bol (or , cider--clojure-execution-error-regexp
654
+ , cider--clojure-spec-execution-error-regexp ))
655
+ 'nogroup )
654
656
" Matches runtime errors, as oppsed to compile-time/macroexpansion-time errors.
655
657
656
658
A few example values that will match:
0 commit comments