This message was deleted.
# community-support
s
This message was deleted.
v
Set a breakpoint to its finalization? Either in the Gradle code, or set it to some provider in time that you then can set a breakpoint to. Or if not a breakpoint, then logging a stacktrace in that provider. Then you should hopefully see where the request comes from.
m
I'm not even sure how it's possible to set a breakpoint precisely to that property... It's the standard
java.languageVersion
property which is finalized. All my plugin does is setting a convention, and it blows up when setting the convention 😞
c
It’s likely that something else, outside your plugin, is eagerly resolving / finalizing that property.
m
I suspect it's caused by use of evaluationDependsOn, which I still need... If so this is going to be a nightmare to solve.
v
Yeah, probably not to a specific property in the Gradle code. Hence my suggestion to set the value at some place where it still works to some provider so that you can in that provider set a breakpoint or log a stacktrace.
m
can't even find a place where I can set one 😠
v
In the Gradle code you mean?
m
in my code. Even if I do a
pluginManager.withPlugin("java") { ... get the java extension and set a dummy provider ... }
as the first thing, my provider is ignored.
v
Hm, seems someone else is setting it afterwards then? πŸ˜•
m
this is extremely painful to debug 😞
v
Maybe you can set a breakpoint in
AbstractProperty#finalizeNow
and have a condition on
displayName
to break for the right one?
m
yeah I'm trying to find one place, there are many finalize calls...
asynchronous calls don't make it easy either since the stack trace doesn't refer to the original code 😞
e.g
I have a call where a
languageVersion
property is finalized, but the thread gives absolutely no context. yay.
cool, this is the line which triggers finalization:
project.getPluginManager().apply(JavaBasePlugin.class);
v
finalizeValueOnRead
is not the right place. It just schedules for finalization at the next read. The question is, who reads and thus finalizes it. That's why I suggested
finalizeNow
as hook point
m
I'm in
finalizeNow
v
cool, this is the line which triggers finalization:
> project.getPluginManager().apply(JavaBasePlugin.class);
🀨
m
yup
this one, or the groovy plugin. w.t.f.
I think I have found the culprit:
Copy code
conf.attributes(attrs -> compileClasspathAttrs.keySet().forEach(key -> {
                Object attribute = compileClasspathAttrs.getAttribute(key);
                //noinspection unchecked
                attrs.attribute((Attribute<Object>)key, attribute);
                attrs.attribute(Usage.USAGE_ATTRIBUTE, project.getObjects().named(Usage.class, JavadocAggregationUtils.AGGREGATED_JAVADOC_PARTICIPANT_DEPS));
            }));
but the error message is totally unhelpful, it relates to something completely different
this is the behavior of copying attributes which changed in 8.3
I really don't like such behavior changes in a minor 😞
v
Maybe they were unintended. Wouldn't be the first that right away gets reverted in an 8.3.1
m
they were intended
<rant>This wouldn't happen if there was a public API to copy attributes from one configuration to the other</rant>
yeah, problem fixed. Completely unrelated code, in a completely different place. Easy to fix πŸ™‚
v
πŸ‘Œ
Happy to be your rubber duck πŸ™‚
m
tx πŸ™‚