[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/csharp-mode d4c7a5c 086/459: Support compilation output
From: |
ELPA Syncer |
Subject: |
[elpa] externals/csharp-mode d4c7a5c 086/459: Support compilation output from msbuild /maxcpucount (/m). |
Date: |
Sun, 22 Aug 2021 13:59:02 -0400 (EDT) |
branch: externals/csharp-mode
commit d4c7a5c39f57187c63b2f09eab931c6ad3b87040
Author: Nathan Phillip Brink <binki@gentoo.org>
Commit: Nathan Phillip Brink <binki@gentoo.org>
Support compilation output from msbuild /maxcpucount (/m).
Lines of output from concurrent msbuild builds are, by default,
prefixed with something like "1>", where "1" is the number of the
msbuild node that caused the output to appear. This must be skipped
for the filename to be properly recognized.
This expands the regexp matching tests to check that the discovered
relative path is, indeed, the expected relative path. It also expands
the tests to account for all of the error/warning messages, including
the repeated messages summary.
---
csharp-mode-tests.el | 37 ++++++++++++++++++++++++++-----
csharp-mode.el | 4 ++--
test-files/msbuild-concurrent-error.txt | 30 +++++++++++++++++++++++++
test-files/msbuild-concurrent-warning.txt | 36 ++++++++++++++++++++++++++++++
4 files changed, 100 insertions(+), 7 deletions(-)
diff --git a/csharp-mode-tests.el b/csharp-mode-tests.el
index 2021732..dd99934 100644
--- a/csharp-mode-tests.el
+++ b/csharp-mode-tests.el
@@ -49,21 +49,48 @@
(should
(equal buffer1 buffer2)))))
+(defun list-repeat-once (mylist)
+ (append mylist mylist))
+
(ert-deftest build-warnings-and-errors-are-parsed ()
(dolist (test-case
- `(("./test-files/msbuild-warning.txt"
,csharp-compilation-re-msbuild-warning 3)
- ("./test-files/msbuild-error.txt"
,csharp-compilation-re-msbuild-error 1)
- ("./test-files/xbuild-warning.txt"
,csharp-compilation-re-xbuild-warning 5)
- ("./test-files/xbuild-error.txt"
,csharp-compilation-re-xbuild-error 1)
+ `(("./test-files/msbuild-warning.txt"
,csharp-compilation-re-msbuild-warning 8
+ ,(list-repeat-once
+ '("Class1.cs"
+ "Folder\\Class1.cs"
+ "Program.cs"
+ "Program.cs")))
+ ("./test-files/msbuild-error.txt"
,csharp-compilation-re-msbuild-error 2
+ ,(list-repeat-once
+ '("Folder\\Class1.cs")))
+ ("./test-files/msbuild-concurrent-warning.txt"
,csharp-compilation-re-msbuild-warning 2
+ ,(list-repeat-once
+ '("Program.cs")))
+ ("./test-files/msbuild-concurrent-error.txt"
,csharp-compilation-re-msbuild-error 2
+ ,(list-repeat-once
+ '("Program.cs")))
+ ("./test-files/xbuild-warning.txt"
,csharp-compilation-re-xbuild-warning 10
+ ,(list-repeat-once
+
'("/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/Class1.cs"
+
"/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/Folder/Class1.cs"
+
"/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/Program.cs"
+
"/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/Program.cs"
+
"/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ConsoleApplication1/Program.cs")))
+ ("./test-files/xbuild-error.txt"
,csharp-compilation-re-xbuild-error 2
+ ,(list-repeat-once
+
'("/Users/jesseblack/Dropbox/barfapp/ConsoleApplication1/ClassLibrary1/Folder/Class1.cs")))
))
(let* ((file-name (car test-case))
(regexp (cadr test-case))
(times (caddr test-case))
+ (matched-file-names (cadddr test-case))
(find-file-hook '()) ;; avoid vc-mode file-hooks when opening!
(buffer (find-file-read-only file-name)))
(dotimes (number times)
- (re-search-forward regexp))
+ (re-search-forward regexp)
+ (should
+ (equal (nth number matched-file-names) (match-string 1))))
(kill-buffer buffer))))
;;(ert-run-tests-interactively t)
diff --git a/csharp-mode.el b/csharp-mode.el
index fcac8d3..fc21c89 100644
--- a/csharp-mode.el
+++ b/csharp-mode.el
@@ -4150,14 +4150,14 @@ The return value is meaningless, and is ignored by
cc-mode.
(defconst csharp-compilation-re-msbuild-error
(concat
- "^[[:blank:]]*"
+ "^[[:blank:]]*\\(?:[[:digit:]]+>\\)?"
"\\([^(\r\n)]+\\)(\\([0-9]+\\)\\(?:,\\([0-9]+\\)\\)?): "
"error [[:alnum:]]+: [^[\r\n]+\\[\\([^]\r\n]+\\)\\]$")
"Regexp to match compilation error from msbuild.")
(defconst csharp-compilation-re-msbuild-warning
(concat
- "^[[:blank:]]*"
+ "^[[:blank:]]*\\(?:[[:digit:]]+>\\)?"
"\\([^(\r\n)]+\\)(\\([0-9]+\\)\\(?:,\\([0-9]+\\)\\)?): "
"warning [[:alnum:]]+: [^[\r\n]+\\[\\([^]\r\n]+\\)\\]$")
"Regexp to match compilation warning from msbuild.")
diff --git a/test-files/msbuild-concurrent-error.txt
b/test-files/msbuild-concurrent-error.txt
new file mode 100644
index 0000000..7c160c2
--- /dev/null
+++ b/test-files/msbuild-concurrent-error.txt
@@ -0,0 +1,30 @@
+-*- mode: compilation; default-directory: "~/Documents/Visual Studio
2015/Projects/ConsoleApplication3/ConsoleApplication3/" -*-
+Compilation started at Mon Apr 20 01:44:35
+
+bash -c "for m in *akefile; do break; done; if [[ ${m} != \"*akefile\" ]];
then PATH=\"${PATH}:/c/Program Files (x86)/MSBuild/14.0/Bin:/c/Program
Files/Emacs/bin\" make; else set -o pipefail; 'c:/Program Files
(x86)/MSBuild/14.0/Bin/MSBuild.exe' //m; fi"
+Microsoft (R) Build Engine version 14.0.22609.0
+Copyright (C) Microsoft Corporation. All rights reserved.
+
+Build started 2015-04-20 01:44:36.
+The target "AfterGenerateAppxManifest" listed in an AfterTargets attribute at
"C:\Program Files
(x86)\MSBuild\Microsoft\.NetNative\Microsoft.NetNative.targets (60,11)" does
not exist in the project, and will be ignored.
+The target "AfterGenerateAppxManifest" listed in an AfterTargets attribute at
"C:\Program Files
(x86)\MSBuild\Microsoft\.NetNative\Microsoft.NetNative.targets (108,11)" does
not exist in the project, and will be ignored.
+ 1>Project "c:\Users\ohnob\Documents\Visual Studio
2015\Projects\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.csproj"
on node 1 (default targets).
+ 1>GenerateTargetFrameworkMonikerAttribute:
+ Skipping target "GenerateTargetFrameworkMonikerAttribute" because all
output files are up-to-date with respect to the input files.
+ CoreCompile:
+ C:\Program Files (x86)\MSBuild\14.0\bin\csc2.exe /noconfig
/nowarn:1701,1702 /nostdlib+ /platform:anycpu32bitpreferred /errorreport:prompt
/warn:4 /define:DEBUG;TRACE /highentropyva+ /reference:"C:\Program Files
(x86)\Reference
Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.CSharp.dll"
/reference:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll"
/reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framewor [...]
+ 1>Program.cs(13,2): error CS1002: ; expected
[c:\Users\ohnob\Documents\Visual Studio
2015\Projects\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.csproj]
+ 1>Done Building Project "c:\Users\ohnob\Documents\Visual Studio
2015\Projects\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.csproj"
(default targets) -- FAILED.
+
+Build FAILED.
+
+ "c:\Users\ohnob\Documents\Visual Studio
2015\Projects\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.csproj"
(default target) (1) ->
+ (CoreCompile target) ->
+ Program.cs(13,2): error CS1002: ; expected
[c:\Users\ohnob\Documents\Visual Studio
2015\Projects\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.csproj]
+
+ 0 Warning(s)
+ 1 Error(s)
+
+Time Elapsed 00:00:00.15
+
+Compilation exited abnormally with code 1 at Mon Apr 20 01:44:36
diff --git a/test-files/msbuild-concurrent-warning.txt
b/test-files/msbuild-concurrent-warning.txt
new file mode 100644
index 0000000..4f702f4
--- /dev/null
+++ b/test-files/msbuild-concurrent-warning.txt
@@ -0,0 +1,36 @@
+-*- mode: compilation; default-directory: "~/Documents/Visual Studio
2015/Projects/ConsoleApplication3/ConsoleApplication3/" -*-
+Compilation started at Mon Apr 20 01:44:21
+
+bash -c "for m in *akefile; do break; done; if [[ ${m} != \"*akefile\" ]];
then PATH=\"${PATH}:/c/Program Files (x86)/MSBuild/14.0/Bin:/c/Program
Files/Emacs/bin\" make; else set -o pipefail; 'c:/Program Files
(x86)/MSBuild/14.0/Bin/MSBuild.exe' //m; fi"
+Microsoft (R) Build Engine version 14.0.22609.0
+Copyright (C) Microsoft Corporation. All rights reserved.
+
+Build started 2015-04-20 01:44:22.
+The target "AfterGenerateAppxManifest" listed in an AfterTargets attribute at
"C:\Program Files
(x86)\MSBuild\Microsoft\.NetNative\Microsoft.NetNative.targets (60,11)" does
not exist in the project, and will be ignored.
+The target "AfterGenerateAppxManifest" listed in an AfterTargets attribute at
"C:\Program Files
(x86)\MSBuild\Microsoft\.NetNative\Microsoft.NetNative.targets (108,11)" does
not exist in the project, and will be ignored.
+ 1>Project "c:\Users\ohnob\Documents\Visual Studio
2015\Projects\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.csproj"
on node 1 (default targets).
+ 1>GenerateTargetFrameworkMonikerAttribute:
+ Skipping target "GenerateTargetFrameworkMonikerAttribute" because all
output files are up-to-date with respect to the input files.
+ CoreCompile:
+ C:\Program Files (x86)\MSBuild\14.0\bin\csc2.exe /noconfig
/nowarn:1701,1702 /nostdlib+ /platform:anycpu32bitpreferred /errorreport:prompt
/warn:4 /define:DEBUG;TRACE /highentropyva+ /reference:"C:\Program Files
(x86)\Reference
Assemblies\Microsoft\Framework\.NETFramework\v4.5\Microsoft.CSharp.dll"
/reference:"C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework\.NETFramework\v4.5\mscorlib.dll"
/reference:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framewor [...]
+ 1>Program.cs(13,10): warning CS1030: #warning: 'asdf'
[c:\Users\ohnob\Documents\Visual Studio
2015\Projects\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.csproj]
+ _CopyAppConfigFile:
+ Skipping target "_CopyAppConfigFile" because all output files are
up-to-date with respect to the input files.
+ CopyFilesToOutputDirectory:
+ Copying file from "obj\Debug\ConsoleApplication3.exe" to
"bin\Debug\ConsoleApplication3.exe".
+ ConsoleApplication3 -> c:\Users\ohnob\Documents\Visual Studio
2015\Projects\ConsoleApplication3\ConsoleApplication3\bin\Debug\ConsoleApplication3.exe
+ Copying file from "obj\Debug\ConsoleApplication3.pdb" to
"bin\Debug\ConsoleApplication3.pdb".
+ 1>Done Building Project "c:\Users\ohnob\Documents\Visual Studio
2015\Projects\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.csproj"
(default targets).
+
+Build succeeded.
+
+ "c:\Users\ohnob\Documents\Visual Studio
2015\Projects\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.csproj"
(default target) (1) ->
+ (CoreCompile target) ->
+ Program.cs(13,10): warning CS1030: #warning: 'asdf'
[c:\Users\ohnob\Documents\Visual Studio
2015\Projects\ConsoleApplication3\ConsoleApplication3\ConsoleApplication3.csproj]
+
+ 1 Warning(s)
+ 0 Error(s)
+
+Time Elapsed 00:00:00.20
+
+Compilation finished at Mon Apr 20 01:44:22
- [elpa] externals/csharp-mode 775fafd 166/459: Make assess-package available for testing., (continued)
- [elpa] externals/csharp-mode 775fafd 166/459: Make assess-package available for testing., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode acaa9bb 169/459: Make another fontification-test assess-based., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode b1e237d 172/459: Add tests, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode c4a2dfd 176/459: Fixup tests., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 4f151a1 177/459: Fix CI by fixing byte-compilation., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 4cd07f9 178/459: Clean up fontification test., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 69d95d2 179/459: Make tests less noisy., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 3c1143d 180/459: Merge branch 'fix-verbatim-string-literals', ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 879beb4 184/459: imenu: Fix sorting of fields., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 26e2430 082/459: Updated readme and feature-list. Bump version., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode d4c7a5c 086/459: Support compilation output from msbuild /maxcpucount (/m).,
ELPA Syncer <=
- [elpa] externals/csharp-mode e277562 084/459: Set all as the default Makefile target., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 165d1f2 206/459: Fix indexing of generic methods., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 26737de 211/459: Fix build by cheating., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 7ced65e 225/459: Require cc-fonts, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 571c4c7 240/459: Stop misleading our poor users., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode d72e5c6 242/459: Revert changes in changelog., ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 0f39f84 122/459: Apply bug#18845 workaround, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode 73e7ed6 125/459: Merge pull request #53 from ymarkovitch/master, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode d01f22f 149/459: Imenu: fix interface-prefixed members, ELPA Syncer, 2021/08/22
- [elpa] externals/csharp-mode b8073ed 151/459: Imenu: correctly report namespace for all types, ELPA Syncer, 2021/08/22