ikvm
ikvm copied to clipboard
IkvmReference does not output warnings in Visual Studio
I suspect this is related to #92, but IkvmReference
doesn't output all of the build warnings that ikvmc
does to the build output in Visual Studio.
Ideally, we would also be able to filter the verbosity of the output, just like other MSBuild features. However, warnings are typically output using the default (Minimal) verbosity setting.
I suspect you need to increase the verbosity of your MSBuild output.
That said, because it is currently a separate executable, there's no way to distinguish warnings from non-warnings. All we can really monitor for is the exit code.
I'd approach fixing this by making the static compiler an actual class that can be executed, with a DiagnosticLogger or some such that you can use to capture messages and their severity.
Going to say this guy is basically a duplicate of #92 since they're basically the same problem.
Going to close this in favor of #92.
I am running into this issue again. Except now I am not seeing the correct warnings in either the IDE or when running dotnet build
directly. We only see them when running our Powershell build script. This is kind of a pain because we don't see the warnings until we run in CI, never in the local workflow.
Build succeeded.
F:\Users\shad\.nuget\packages\ikvm\8.7.3\buildTransitive\IKVM.Tasks.targets(31,9): warning : warning IKVMC0100: C
lass "org.osgi.framework.BundleActivator" not found [F:\Projects\lucenenet\src\Lucene.Net.Analysis.OpenNLP\Lucene
.Net.Analysis.OpenNLP.csproj::TargetFramework=net6.0]
F:\Users\shad\.nuget\packages\ikvm\8.7.3\buildTransitive\IKVM.Tasks.targets(31,9): warning : warning IKVMC0100: C
lass "org.osgi.framework.BundleActivator" not found [F:\Projects\lucenenet\src\Lucene.Net.Analysis.OpenNLP\Lucene
.Net.Analysis.OpenNLP.csproj::TargetFramework=net472]
F:\Users\shad\.nuget\packages\ikvm\8.7.3\buildTransitive\IKVM.Tasks.targets(31,9): warning : warning IKVMC0100: C
lass "org.osgi.framework.BundleActivator" not found [F:\Projects\lucenenet\src\Lucene.Net.Tests.AllProjects\Lucen
e.Net.Tests.AllProjects.csproj::TargetFramework=net7.0]
F:\Users\shad\.nuget\packages\ikvm\8.7.3\buildTransitive\IKVM.Tasks.targets(31,9): warning : warning IKVMC0100: C
lass "org.osgi.framework.BundleActivator" not found [F:\Projects\lucenenet\src\Lucene.Net.Tests.Analysis.OpenNLP\
Lucene.Net.Tests.Analysis.OpenNLP.csproj::TargetFramework=net7.0]
F:\Users\shad\.nuget\packages\ikvm\8.7.3\buildTransitive\IKVM.Tasks.targets(31,9): warning : warning IKVMC0100: C
lass "org.osgi.framework.BundleActivator" not found [F:\Projects\lucenenet\src\Lucene.Net.Tests.AllProjects\Lucen
e.Net.Tests.AllProjects.csproj::TargetFramework=net48]
F:\Users\shad\.nuget\packages\ikvm\8.7.3\buildTransitive\IKVM.Tasks.targets(31,9): warning : warning IKVMC0100: C
lass "org.osgi.framework.BundleActivator" not found [F:\Projects\lucenenet\src\Lucene.Net.Tests.Analysis.OpenNLP\
Lucene.Net.Tests.Analysis.OpenNLP.csproj::TargetFramework=net48]
6 Warning(s)
0 Error(s)
I have pulled out the 2 relevant commands from the build script and tried running them, but they also don't produce the warnings on their own.
dotnet restore Lucene.Net.sln --no-dependencies -p:TestFrameworks=true
dotnet build Lucene.Net.sln --configuration Release --no-restore -p:platform="Any CPU" -p:PortableDebugTypeOnly=true -p:TestFrameworks=true
Then I tried configuring the SDK version like we have in the script in global.json
:
{
"sources": [ "src" ],
"sdk": {
"version": "7.0.100",
"rollForward": "latestMajor"
}
}
But still no warnings like in the Powershell script. If you clone the lucenenet repository and run:
build -pv 4.8.0-beta00017
Then you will see the warnings.
I suspect you need to increase the verbosity of your MSBuild output.
I attempted this, but no warnings at all appear in the IDE, not even in diagnostic mode. They also don't occur on the command line unless we run them from the Powershell script. I am at a loss on how to reproduce the warnings otherwise, but the warnings are definitely valid problems with the build (missing dependency) and it would be best if these warnings were highly visible when doing the build in the IDE.
Clear out the cache?
The NuGet cache? Maven cache?
IKVM cache. In your temp dir, ikvm\cache\1
Yeah, that did it on the command line. It is weird because running the build script locally shows them without clearing the cache. But they are still missing in the IDE.
IKVM only builds the same thing once. The cache holds the previous copies. It saves the stdout/stderr into a .log file in there. But, it doesn't print it on your second time around.