You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The complog throws an exception when files specified as additionalfiles don't exist, but the compilation will succeed. Sample stacktrace:
[6732] [001] [INFO] Running binary log analysis.
[6732] [001] [INFO] Reading compiler calls from binary log <some-file-path>msbuild.binlog
[6732] [001] [ERROR] Unhandled exception: System.Exception: Missing file, either build did not happen on this machine or the environment has changed: <some-file-path>stylecop.json
at Basic.CompilerLog.Util.RoslynUtil.OpenBuildFileForRead(String filePath) in /home/runner/work/complog/complog/src/Basic.CompilerLog.Util/RoslynUtil.cs:line 265
at Basic.CompilerLog.Util.RoslynUtil.GetSourceText(String filePath, SourceHashAlgorithm checksumAlgorithm, Boolean canBeEmbedded) in /home/runner/work/complog/complog/src/Basic.CompilerLog.Util/RoslynUtil.cs:line 51
at Basic.CompilerLog.Util.BinaryLogReader.<ReadCompilationData>g__GetAdditionalTexts|30_6(<>c__DisplayClass30_0&) in /home/runner/work/complog/complog/src/Basic.CompilerLog.Util/BinaryLogReader.cs:line 238
at Basic.CompilerLog.Util.BinaryLogReader.ReadCompilationData(CompilerCall compilerCall) in /home/runner/work/complog/complog/src/Basic.CompilerLog.Util/BinaryLogReader.cs:line 164
at Basic.CompilerLog.Util.BinaryLogReader.ReadAllCompilationData(Func`2 predicate) in /home/runner/work/complog/complog/src/Basic.CompilerLog.Util/BinaryLogReader.cs:line 107
at Semmle.Extraction.CSharp.Extractor.RunBinaryLogAnalysis(Stopwatch stopwatch, Options options, String binlogPath, ILogger logger, CanonicalPathCache canonicalPathCache, PathTransformer pathTransformer)
at Semmle.Extraction.CSharp.Extractor.RunBinaryLogAnalysis(Stopwatch stopwatch, Options options, String[] binlogPaths, ILogger logger, CanonicalPathCache canonicalPathCache, PathTransformer pathTransformer)
at Semmle.Extraction.CSharp.Extractor.Run(String[] args)
If the compilation succeeds, then I think it should be possible to obtain compilation data.
The text was updated successfully, but these errors were encountered:
That error was meant to catch cases where people had stale builds on the machine and hence complog create on the binlog wasn't capturing what they expected it to. I agree though that need to mimic the compiler behavior here and be able to create functioning Compilation here with diagnostics. Likely need to rework more than just additional files though, guessing this incorrect pattern applies to a few other items like source files. Can still emit a warning in complog create to alert devs to the possible error here.
The
complog
throws an exception when files specified asadditionalfile
s don't exist, but the compilation will succeed. Sample stacktrace:If the compilation succeeds, then I think it should be possible to obtain compilation data.
The text was updated successfully, but these errors were encountered: