SettingDust
04/30/2025, 3:13 AMCircular dependency between the following tasks:
work action Dependencies for XXXXXX
? Looks like the transform action depends on each other?
The image is the cycle shows in debugger. Looks like the states of different transform is looping. How can I avoid that?
https://github.com/SettingDust/cloche/blob/feature/extract-includes/src/main/kotlin/earth/terrarium/cloche/target/TargetCompilation.kt#L122-L148
Circular dependency between the following tasks:
work action Dependencies for dev.su5ed.sinytra.fabric-api:fabric-api-deprecated:0.92.2+1.11.11+1.20.1 {earth.terrarium.cloche.modState=none}
SettingDust
04/30/2025, 7:39 AMNone
compatible with Handled
and make the remap action depends on the includes actions.
The X problem here is how can I make the remap action prefer Extracted
than None
but also accept None at the same time?Vampire
04/30/2025, 9:08 AMSettingDust
04/30/2025, 10:28 AMSettingDust
04/30/2025, 11:39 AMThere was a failure while populating the build operation queue: Value for parameters of RemapAction has not been calculated yet.
I don't know how could I debug
https://scans.gradle.com/s/dm2pajihvprjm
val remapActionSpec = Action<TransformSpec<RemapAction.Parameters>> {
it.from.attribute(
ModTransformationStateAttribute.ATTRIBUTE,
ModTransformationStateAttribute.INITIAL,
)
it.to.attribute(
ModTransformationStateAttribute.ATTRIBUTE,
ModTransformationStateAttribute.of(target, compilation, States.REMAPPED),
)
it.parameters {
it.mappings.set(target.loadMappingsTask.flatMap(LoadMappings::output))
it.sourceNamespace.set(target.modRemapNamespace.get())
it.extraClasspath.from(compilation.intermediaryMinecraftClasspath)
it.cacheDirectory.set(getGlobalCacheDirectory(project))
val modCompileClasspath = project.getModFiles(compilation.sourceSet.compileClasspathConfigurationName) {
it.attributes {
it.attribute(
ModTransformationStateAttribute.ATTRIBUTE,
ModTransformationStateAttribute.INITIAL,
)
}
}
val modRuntimeClasspath = project.getModFiles(compilation.sourceSet.runtimeClasspathConfigurationName) {
it.attributes {
it.attribute(
ModTransformationStateAttribute.ATTRIBUTE,
ModTransformationStateAttribute.INITIAL,
)
}
}
it.modFiles.from(modCompileClasspath)
it.modFiles.from(modRuntimeClasspath)
}
}
project.dependencies.registerTransform(RemapAction::class.java) {
it.from.attribute(IncludeTransformationState.ATTRIBUTE, IncludeTransformationState.Handled)
remapActionSpec.execute(it)
}
project.dependencies.registerTransform(RemapAction::class.java) {
it.from.attribute(IncludeTransformationState.ATTRIBUTE, IncludeTransformationState.None)
remapActionSpec.execute(it)
}
SettingDust
04/30/2025, 11:41 AMVampire
04/30/2025, 11:58 AMafterEvaluate
is a strong sign that you do something bad. :-)SettingDust
04/30/2025, 12:04 PMafterEvaluate
. There is some user defined lazy configurable. The design here is problematic ya.Vampire
04/30/2025, 12:06 PMProperty
that the user configures, but to have a function in the extension that the user can call with the value as argument and then do the necessary configuration in the function body, eventually preventing multiple calls to the function if the first call effect could not be "undone" in the second call.SettingDust
04/30/2025, 12:08 PMSettingDust
04/30/2025, 12:09 PMVampire
04/30/2025, 12:09 PMSome configuration will be created after user configuringThat's why I said, in a function the user calls. 🙂
Vampire
04/30/2025, 12:10 PMSettingDust
04/30/2025, 12:13 PMconfigured
var and execute the configure if it's false when after evaluate?SettingDust
04/30/2025, 12:13 PMSettingDust
04/30/2025, 12:14 PMVampire
04/30/2025, 12:15 PMafterEvaluate
(like now), then still the user could do the configuration himself within afterEvaluate
(which can happen for various reasons) and as he registered his afterEvaluate
after yours, yours run first.
That's why the main earning of using afterEvaluate
is to introduce timing problems, ordering problems, and race conditions.Vampire
04/30/2025, 12:16 PMSettingDust
05/01/2025, 2:29 AMVampire
05/01/2025, 3:07 AMSettingDust
05/02/2025, 12:49 PMVampire
05/02/2025, 6:45 PMSettingDust
05/09/2025, 11:55 PMNone
include state remap action being used. The Handled
one is ignored. The DisambiguationRule
haven't invoked at allSettingDust
05/09/2025, 11:56 PMVampire
05/10/2025, 1:27 AMVampire
05/10/2025, 1:29 AMonce for transforming "extracted and initial" to "extracted and remapped" and once for transforming "none and initial" to "none and remapped"what you did is
once for transforming "extracted and initial" to "remapped" and once for transforming "none and initial" to "remapped"
Vampire
05/10/2025, 1:29 AM