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

Rascal compile mojo can not load anymore due to some new dependencues injected by the latest rascal.jar #25

Open
jurgenvinju opened this issue Dec 18, 2024 · 2 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@jurgenvinju
Copy link
Member

This is when I make rascal-maven-plugin depend on rascal-0.41.0-RC1 (necessary for bootstrapping the stdlin tutor docs):

What stands out is that the binding of WireModule and PlexusBindingModule both go to org.eclipse.sisu and that can't be right.
So I'm thinking we should configure the rascal project to inject different classes from org.apache.maven instead, or not inject dependencies for WireModule and PlexusBindingModule at all? I'm guessing wildly here. Pls help.

[INFO] [WARNING] ClassRealm[plugin>org.rascalmpl:rascal-maven-plugin:0.28.11-SNAPSHOT, parent: jdk.internal.loader.ClassLoaders$AppClassLoader@277050dc]
[INFO] com.google.inject.CreationException: Unable to create injector, see the following errors:
[INFO] 
[INFO] 1) [Guice/DuplicateScopes]: Scope MojoExecutionScope@2a551a63 is already bound to MojoExecutionScoped at MojoExecutionScopeModule.configure(MojoExecutionScopeModule.java:44) (installed by: WireModule -> MojoExecutionScopeModule).
[INFO]  Cannot bind MojoExecutionScope@1ee5632d.
[INFO]   at ClassRealm[plugin>org.rascalmpl:rascal-maven-plugin:0.28.11-SNAPSHOT, parent: ClassLoaders$AppClassLoader@277050dc]
[INFO]       \_ installed by: WireModule -> PlexusBindingModule -> MojoExecutionScopeCoreModule
[INFO] 
[INFO] Learn more:
[INFO]   https://github.com/google/guice/wiki/DUPLICATE_SCOPES
[INFO] 
[INFO] 1 error
[INFO] 
[INFO] ======================
[INFO] Full classname legend:
[INFO] ======================
[INFO] ClassLoaders$AppClassLoader:  "jdk.internal.loader.ClassLoaders$AppClassLoader"
[INFO] MojoExecutionScope:           "org.apache.maven.execution.scope.internal.MojoExecutionScope"
[INFO] MojoExecutionScopeCoreModule: "org.apache.maven.execution.scope.internal.MojoExecutionScopeCoreModule"
[INFO] MojoExecutionScopeModule:     "org.apache.maven.execution.scope.internal.MojoExecutionScopeModule"
[INFO] MojoExecutionScoped:          "org.apache.maven.execution.scope.MojoExecutionScoped"
[INFO] PlexusBindingModule:          "org.eclipse.sisu.plexus.PlexusBindingModule"
[INFO] WireModule:                   "org.eclipse.sisu.wire.WireModule"
[INFO] ========================
[INFO] End of classname legend:
[INFO] ========================
[INFO] 
[INFO]     at com.google.inject.internal.Errors.throwCreationExceptionIfErrorsExist (Errors.java:576)
[INFO]     at com.google.inject.internal.InternalInjectorCreator.initializeStatically (InternalInjectorCreator.java:163)
[INFO]     at com.google.inject.internal.InternalInjectorCreator.build (InternalInjectorCreator.java:110)
[INFO]     at com.google.inject.Guice.createInjector (Guice.java:87)
[INFO]     at com.google.inject.Guice.createInjector (Guice.java:69)
[INFO]     at com.google.inject.Guice.createInjector (Guice.java:59)
[INFO]     at org.codehaus.plexus.DefaultPlexusContainer.addPlexusInjector (DefaultPlexusContainer.java:482)
[INFO]     at org.codehaus.plexus.DefaultPlexusContainer.discoverComponents (DefaultPlexusContainer.java:461)
[INFO]     at org.apache.maven.plugin.internal.DefaultMavenPluginManager.discoverPluginComponents (DefaultMavenPluginManager.java:410)
[INFO]     at org.apache.maven.plugin.internal.DefaultMavenPluginManager.createPluginRealm (DefaultMavenPluginManager.java:392)
[INFO]     at org.apache.maven.plugin.internal.DefaultMavenPluginManager.lambda$setupPluginRealm$1 (DefaultMavenPluginManager.java:340)
[INFO]     at org.apache.maven.plugin.DefaultPluginRealmCache.lambda$get$0 (DefaultPluginRealmCache.java:156)
[INFO]     at java.util.concurrent.ConcurrentHashMap.computeIfAbsent (ConcurrentHashMap.java:1705)
[INFO]     at org.apache.maven.plugin.DefaultPluginRealmCache.get (DefaultPluginRealmCache.java:154)
[INFO]     at org.apache.maven.plugin.internal.DefaultMavenPluginManager.setupPluginRealm (DefaultMavenPluginManager.java:339)
[INFO]     at org.apache.maven.plugin.DefaultBuildPluginManager.getPluginRealm (DefaultBuildPluginManager.java:205)
[INFO]     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:98)
[INFO]     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:328)
[INFO]     at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
[INFO]     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
[INFO]     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
[INFO]     at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
[INFO]     at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
[INFO]     at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
[INFO]     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
[INFO]     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
[INFO]     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
[INFO]     at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
[INFO]     at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
[INFO]     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
[INFO]     at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
[INFO]     at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
[INFO]     at org.apache.maven.cli.MavenCli.execute (MavenCli.java:906)
[INFO]     at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
[INFO]     at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
[INFO]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
[INFO]     at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
[INFO]     at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
[INFO]     at java.lang.reflect.Method.invoke (Method.java:566)
[INFO]     at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
[INFO]     at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
[INFO]     at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
[INFO]     at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
@jurgenvinju jurgenvinju added bug Something isn't working help wanted Extra attention is needed labels Dec 18, 2024
@rodinaarssen
Copy link
Member

@jurgenvinju could you help me reproduce this?

@DavyLandman
Copy link
Member

DavyLandman commented Dec 18, 2024

@rodinaarssen if I run this command on a fresh checkout:

mvn -B verify -Prun-its

it crashes for locally as well.

Note the separate profile, that loads the test that used the just packaged maven plugin and tries to invoke it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants