Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ikvmc: Fix for compiling multi-release JARs in Java 8 #180

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

NightOwl888
Copy link
Contributor

Ignore multi-release versioned .class files if they are present in the META-INF/versions folder, as was the case in Java SE 8 tools.

This fixes the issue described in ikvmnet/ikvm-maven#17.

…t in the META-INF/versions folder, as was the case in Java SE 8 tools.
@CLAassistant
Copy link

CLAassistant commented Oct 8, 2022

CLA assistant check
All committers have signed the CLA.

@wasabii
Copy link
Contributor

wasabii commented Oct 8, 2022

I would change this to ignore the entire META-INF directory, and then allow versions/ specifically in the future. As of now, it still attempts to compile .class files in META-INF, but not in versions.

Also, consult the specification (or existing openjdk code) regarding case-sensitivity. I would expect this to be case sensitive, not insensitive.

@NightOwl888
Copy link
Contributor Author

I would change this to ignore the entire META-INF directory, and then allow versions/ specifically in the future. As of now, it still attempts to compile .class files in META-INF, but not in versions.

Sure, can do that. Do you have confirmation that is what javac in Java 8 did? I didn't check, but I figured this was the safest since there might be JAR files in the wild using META-INF for a custom purpose that includes compiling .class files. But not in the versions folder.

@wasabii
Copy link
Contributor

wasabii commented Oct 8, 2022

javac doesn't do anything about this at all.

The question is whether it is valid to try to Class.forName("META-INF.foo.bar"). I assume it isn't, but haven't tried. The entire point of that directory was to package non-class things, until JDK9.

…to verify META-INF and multi-release class file detection.
@NightOwl888
Copy link
Contributor Author

NightOwl888 commented Oct 8, 2022

Keeping the IsMultiReleaseClassFile method around because it may be useful to parse the version when we upgrade to Java SE 9 so the binary format of the class name check can be dependent on version. It currently is set up for Java SE 8 logic, but there are no cases where it returns true because those are all caught by IsMetaInfClassFile. It may look a bit odd now, but it should be clear how to upgrade to Java SE 9.

@NightOwl888
Copy link
Contributor Author

Hmm...this still doesn't fix MavenReference. I can confirm by the log that there are no META-INF class files being fed into the Jar class.

Build started...
1>------ Build started: Project: IKVM_JUnit_VintageTestEngine_Issue, Configuration: Debug Any CPU ------
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : ikvmc (8.2.2-PullRequest0180.292+Branch.pull-180-merge.Sha.5d42efe625cc5fe4191e16b89dd088e282dbefd5)
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : Copyright c 2022 Jeroen Frijters, Windward Studios, Jerome Haltom, Shad Storhaug
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning :
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : ikvmc (8.2.2-PullRequest0180.292+Branch.pull-180-merge.Sha.5d42efe625cc5fe4191e16b89dd088e282dbefd5)
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : Copyright c 2022 Jeroen Frijters, Windward Studios, Jerome Haltom, Shad Storhaug
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning :
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0101: Unable to compile class "module-info"
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning :     (class format error "module-info (53.0)")
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.apiguardian.api.API$Status" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.apiguardian.api.API" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : ikvmc (8.2.2-PullRequest0180.292+Branch.pull-180-merge.Sha.5d42efe625cc5fe4191e16b89dd088e282dbefd5)
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : Copyright c 2022 Jeroen Frijters, Windward Studios, Jerome Haltom, Shad Storhaug
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning :
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0101: Unable to compile class "module-info"
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning :     (class format error "module-info (53.0)")
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : ikvmc (8.2.2-PullRequest0180.292+Branch.pull-180-merge.Sha.5d42efe625cc5fe4191e16b89dd088e282dbefd5)
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : Copyright c 2022 Jeroen Frijters, Windward Studios, Jerome Haltom, Shad Storhaug
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning :
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0101: Unable to compile class "module-info"
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning :     (class format error "module-info (53.0)")
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : ikvmc (8.2.2-PullRequest0180.292+Branch.pull-180-merge.Sha.5d42efe625cc5fe4191e16b89dd088e282dbefd5)
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : Copyright c 2022 Jeroen Frijters, Windward Studios, Jerome Haltom, Shad Storhaug
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning :
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.hamcrest.TypeSafeMatcher" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.hamcrest.BaseMatcher" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.hamcrest.SelfDescribing" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.hamcrest.MatcherAssert" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.hamcrest.Matcher" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.hamcrest.CoreMatchers" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.hamcrest.StringDescription" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.hamcrest.core.CombinableMatcher$CombinableBothMatcher" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.hamcrest.core.CombinableMatcher$CombinableEitherMatcher" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.hamcrest.core.CombinableMatcher" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : ikvmc (8.2.2-PullRequest0180.292+Branch.pull-180-merge.Sha.5d42efe625cc5fe4191e16b89dd088e282dbefd5)
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : Copyright c 2022 Jeroen Frijters, Windward Studios, Jerome Haltom, Shad Storhaug
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning :
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0101: Unable to compile class "module-info"
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning :     (class format error "module-info (53.0)")
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.util.Preconditions" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.util.CollectionUtils" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.apiguardian.api.API$Status" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.apiguardian.api.API" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.JUnitException" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.util.ToStringBuilder" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.util.ModuleUtils" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.util.PackageUtils" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.util.StringUtils" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.util.ReflectionUtils" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.function.Try" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.PreconditionViolationException" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.logging.Logger" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.logging.LoggerFactory" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.util.ClassUtils" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.support.ReflectionSupport" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.util.UnrecoverableExceptions" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.util.ClassFilter" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.function.Try$Transformer" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.util.ExceptionUtils" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.opentest4j.TestAbortedException" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : ikvmc (8.2.2-PullRequest0180.292+Branch.pull-180-merge.Sha.5d42efe625cc5fe4191e16b89dd088e282dbefd5)
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : Copyright c 2022 Jeroen Frijters, Windward Studios, Jerome Haltom, Shad Storhaug
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning :
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0101: Unable to compile class "module-info"
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning :     (class format error "module-info (53.0)")
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.engine.TestEngine" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.runner.manipulation.Filter" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.runner.Request" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.engine.support.descriptor.AbstractTestDescriptor" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.engine.TestSource" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.engine.support.descriptor.EngineDescriptor" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.engine.support.discovery.SelectorResolver" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.internal.builders.AnnotatedBuilder" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.internal.builders.JUnit4Builder" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.internal.builders.IgnoredBuilder" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.internal.builders.AllDefaultPossibilitiesBuilder" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.runner.Runner" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.runner.notification.RunListener" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.JUnitException" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.util.UnrecoverableExceptions" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "junit.runner.Version" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.runner.Description" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.apiguardian.api.API$Status" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.apiguardian.api.API" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.util.LruCache" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.engine.support.descriptor.MethodSource" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.engine.support.descriptor.ClassSource" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.util.FunctionUtils" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.util.ReflectionUtils" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.support.ModifierSupport" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.Test" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.engine.UniqueId" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolver" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.engine.TestDescriptor" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolver$InitializationContext" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.util.ClassFilter" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.engine.support.discovery.EngineDiscoveryRequestResolver$Builder" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.runner.JUnitCore" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.engine.TestExecutionResult" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.engine.EngineExecutionListener" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.opentest4j.MultipleFailuresError" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.function.Try" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.logging.Logger" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.logging.LoggerFactory" not found
1>F:\Users\shad\.nuget\packages\ikvm\8.2.2-pullrequest0180-0292\buildTransitive\netstandard2.0\IKVM.Tasks.targets(24,9): warning : warning IKVMC0100: Class "org.junit.platform.commons.function.Try$Transformer" not found
1>IKVM_JUnit_VintageTestEngine_Issue -> F:\Projects\_Demos\IKVM_JUnit_VintageTestEngine_Issue\IKVM_JUnit_VintageTestEngine_Issue\bin\Debug\net461\IKVM_JUnit_VintageTestEngine_Issue.dll
1>Done building project "IKVM_JUnit_VintageTestEngine_Issue.csproj".
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

I haven't found an official source that confirms this, but according to StackOverflow, JDK 8 is supposed to ignore module-info.class files as well. Judging by the above warnings, that seems like the next likely culprit.

Also, according to the official docs, we are supposed to ignore "resources", whatever that means. However, the docs are clear what a Java SE 8 tool is supposed to recognize in the META-INF directory, though: https://docs.oracle.com/javase/8/docs/technotes/guides/jar/jar.html#The_META-INF_directory. Since CompilerClassLoader is internal, I think we can safely exclude everything that isn't valid according to that doc, as well as any module-info.class file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants