Code Monkey home page Code Monkey logo

Comments (5)

carl-mastrangelo avatar carl-mastrangelo commented on July 17, 2024 1

The move to core locking will remove the need for most of this logic and the eventual goal is to not to need resolution rules artifacts either

Is there a tracking issue for this?

from gradle-resolution-rules-plugin.

carl-mastrangelo avatar carl-mastrangelo commented on July 17, 2024

Just ran into this too. @chali it looks like mutating final fields is not going to work long term. I have a longer stack, and it doesn't seem to be something that needs too exotic. It would be very helpful to fix this and allow nebula users continue to upgrade.

Cause 22: java.lang.NoSuchFieldException: modifiers
        at java.base/java.lang.Class.getDeclaredField(Class.java:2569)
        at nebula.plugin.resolutionrules.ConfigurationsKt.setField(configurations.kt:66)
        at nebula.plugin.resolutionrules.ConfigurationsKt.setName(configurations.kt:50)
        at nebula.plugin.resolutionrules.ConfigurationsKt.copyConfiguration(configurations.kt:26)
        at nebula.plugin.resolutionrules.NebulaResolutionRulesExtension$rulesByFile$2.invoke(plugin.kt:123)
        at nebula.plugin.resolutionrules.NebulaResolutionRulesExtension$rulesByFile$2.invoke(plugin.kt:110)
        at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
        at nebula.plugin.resolutionrules.NebulaResolutionRulesExtension.getRulesByFile(plugin.kt)
        at nebula.plugin.resolutionrules.NebulaResolutionRulesExtension.ruleSet(plugin.kt:150)
        at nebula.plugin.resolutionrules.ResolutionRulesPlugin$apply$1$$special$$inlined$onExecute$1.execute(projects.kt:16)
        at nebula.plugin.resolutionrules.ResolutionRulesPlugin$apply$1$$special$$inlined$onExecute$1.execute(projects.kt)
        at org.gradle.configuration.internal.DefaultUserCodeApplicationContext$CurrentApplication$1.execute(DefaultUserCodeApplicationContext.java:100)
        at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingAction$1.run(DefaultListenerBuildOperationDecorator.java:153)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:395)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:387)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:157)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:242)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:150)
        at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:84)
        at org.gradle.configuration.internal.DefaultListenerBuildOperationDecorator$BuildOperationEmittingAction.execute(DefaultListenerBuildOperationDecorator.java:150)
        at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:95)
        at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:83)
        at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:42)
        at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:245)
        at org.gradle.internal.event.BroadcastDispatch$SingletonDispatch.dispatch(BroadcastDispatch.java:157)
        at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:58)
        at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:346)
        at org.gradle.internal.event.BroadcastDispatch$CompositeDispatch.dispatch(BroadcastDispatch.java:249)
        at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:141)
        at org.gradle.internal.event.ListenerBroadcast.dispatch(ListenerBroadcast.java:37)
        at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)

from gradle-resolution-rules-plugin.

carl-mastrangelo avatar carl-mastrangelo commented on July 17, 2024

@DanielThomas If you haven't already, it seems like the ideal long term fix is to file an issue to Gradle. The reflection used here seems like it is working around a Gradle API limitation.

from gradle-resolution-rules-plugin.

DanielThomas avatar DanielThomas commented on July 17, 2024

Release 7.7.7 will go out in the next hour.

from gradle-resolution-rules-plugin.

DanielThomas avatar DanielThomas commented on July 17, 2024

@carl-mastrangelo unlikely to ever land. The move to core locking will remove the need for most of this logic and the eventual goal is to not to need resolution rules artifacts either - these rules will be published as Gradle metadata.

from gradle-resolution-rules-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.