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

Move all versions numbers to gradle.properties and update dependencies #13661

Merged
merged 5 commits into from
Sep 20, 2024

Conversation

jamesfredley
Copy link
Contributor

@jamesfredley jamesfredley commented Sep 20, 2024

Move all versions numbers to gradle.properties and update dependencies to latest compatible version

Remove unused jaxb implementation

@jamesfredley jamesfredley changed the title WIP: Move all versions to gradle.properties and update dependencies WIP: Move all versions numbers to gradle.properties and update dependencies Sep 20, 2024
@jamesfredley jamesfredley changed the title WIP: Move all versions numbers to gradle.properties and update dependencies Move all versions numbers to gradle.properties and update dependencies Sep 20, 2024
@matrei
Copy link
Contributor

matrei commented Sep 20, 2024

I'm getting an error from GrailsConsoleSpec when running the test suite:

Unsupported class file major version 61
java.lang.IllegalArgumentException: Unsupported class file major version 61
	at net.sf.cglib.asm.$ClassReader.<init>(ClassReader.java:195)
	at net.sf.cglib.asm.$ClassReader.<init>(ClassReader.java:176)
	at net.sf.cglib.asm.$ClassReader.<init>(ClassReader.java:162)
	at net.sf.cglib.asm.$ClassReader.<init>(ClassReader.java:283)
	at net.sf.cglib.core.DuplicatesPredicate.<init>(DuplicatesPredicate.java:93)
	at net.sf.cglib.proxy.Enhancer.getMethods(Enhancer.java:557)
	at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:575)
	at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
	at net.sf.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:332)
	at net.sf.cglib.proxy.Enhancer.generate(Enhancer.java:492)
	at net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:96)
	at net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:94)
	at net.sf.cglib.core.internal.LoadingCache$2.call(LoadingCache.java:54)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
	at net.sf.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:61)
	at net.sf.cglib.core.internal.LoadingCache.get(LoadingCache.java:34)
	at net.sf.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:119)
	at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:294)
	at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:480)
	at net.sf.cglib.proxy.Enhancer.createClass(Enhancer.java:337)
	at org.spockframework.mock.runtime.CglibMockFactory.createMock(CglibMockFactory.java:34)
	at org.spockframework.mock.runtime.ProxyBasedMockFactory.create(ProxyBasedMockFactory.java:45)
	at org.spockframework.mock.runtime.JavaMockFactory.createInternal(JavaMockFactory.java:58)
	at org.spockframework.mock.runtime.JavaMockFactory.create(JavaMockFactory.java:38)
	at org.spockframework.mock.runtime.CompositeMockFactory.create(CompositeMockFactory.java:44)
	at org.spockframework.lang.SpecInternals.createMock(SpecInternals.java:50)
	at org.spockframework.lang.SpecInternals.createMockImpl(SpecInternals.java:305)
	at org.spockframework.lang.SpecInternals.createMockImpl(SpecInternals.java:295)
	at org.spockframework.lang.SpecInternals.MockImpl(SpecInternals.java:104)
	at grails.build.logging.GrailsConsoleSpec.setup(GrailsConsoleSpec.groovy:53)

It seems it is the update from cglibVersion=2.2.2 to cglibVersion=3.3.0 that causes this.

It does not show in CI because the failing test is annotated with:

@IgnoreIf({ env['CI'] || !GrailsConsole.instance.isAnsiEnabled() })

@jamesfredley
Copy link
Contributor Author

We are back to cglibVersion=2.2.2.

GrailsConsoleSpec > "userInput - verify the reset marker at the end of the output" is failing. I have confirmed it also fails prior to these changes on the 7.0.x branch and on 6.2.x and 5.3.x branches

GrailsConsoleSpec > userInput - verify the reset marker at the end of the output FAILED
    groovy.lang.GroovyRuntimeException: Could not find matching constructor for: java.lang.String(Integer, null, null)
        at grails.build.logging.GrailsConsoleSpec.userInput - verify the reset marker at the end of the output_closure3(GrailsConsoleSpec.groovy:89)
        at groovy.lang.Closure.call(Closure.java:433)
        at org.spockframework.mock.response.CodeResponseGenerator.invokeClosure(CodeResponseGenerator.java:54)
        at org.spockframework.mock.response.CodeResponseGenerator.doRespond(CodeResponseGenerator.java:37)
        at org.spockframework.mock.response.SingleResponseGenerator.respond(SingleResponseGenerator.java:32)
        at org.spockframework.mock.response.ResponseGeneratorChain.respond(ResponseGeneratorChain.java:44)
        at org.spockframework.mock.runtime.MockInteraction.accept(MockInteraction.java:73)
        at org.spockframework.mock.runtime.MockInteractionDecorator.accept(MockInteractionDecorator.java:50)
        at org.spockframework.mock.runtime.InteractionScope$1.accept(InteractionScope.java:57)
        at org.spockframework.mock.runtime.MockController.handle(MockController.java:40)
        at org.spockframework.mock.runtime.JavaMockInterceptor.intercept(JavaMockInterceptor.java:86)
        at org.spockframework.mock.runtime.CglibMockInterceptorAdapter.intercept(CglibMockInterceptorAdapter.java:30)
        at org.fusesource.jansi.AnsiOutputStream.write(AnsiOutputStream.java:91)
        at java.base/java.io.FilterOutputStream.write(FilterOutputStream.java:137)
        at java.base/sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:234)
        at java.base/sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:313)
        at java.base/sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:318)
        at java.base/sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:160)
        at java.base/java.io.OutputStreamWriter.flush(OutputStreamWriter.java:248)
        at jline.console.ConsoleReader.readLine(ConsoleReader.java:2443)
        at jline.console.ConsoleReader.readLine(ConsoleReader.java:2378)
        at grails.build.logging.GrailsConsole.readLine(GrailsConsole.java:866)
        at grails.build.logging.GrailsConsole.doUserInput(GrailsConsole.java:837)
        at grails.build.logging.GrailsConsole.userInput(GrailsConsole.java:813)
        at grails.build.logging.GrailsConsoleSpec.userInput - verify the reset marker at the end of the output(GrailsConsoleSpec.groovy:86)

@matrei
Copy link
Contributor

matrei commented Sep 20, 2024

GrailsConsoleSpec > "userInput - verify the reset marker at the end of the output" is failing. I have confirmed it also fails prior to these changes on the 7.0.x branch and on 6.2.x and 5.3.x branches

That's strange, "it works on my machine" 😄

There have been some problems with cglib in other repos, and switching to bytebuddy has fixed all of those.
Replace cglib with:

bytebuddyVersion=1.15.1
testRuntimeOnly "net.bytebuddy:byte-buddy:$bytebuddyVersion"

This also works on my machine. Try it!

@jamesfredley
Copy link
Contributor Author

cglib to bytebuddyVersion update is complete and this should be resolved.

@jamesfredley jamesfredley merged commit e48e6a2 into 7.0.x Sep 20, 2024
11 checks passed
@jamesfredley jamesfredley deleted the jamesfredley/dependency-cleanup branch September 20, 2024 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants