I changed the .cfg of my Tiger language to use JSGLR2 instead of JSGLR1, rebuilt and restarted the LWB, and PIE fails to compile the new language, giving this error:
ValidationException: Visited task with same key was required with different input in same session.
What you did
I changed the parser configuration of my Tiger pure Spoofax 3 project from:
I did some other things in between, which is why I rebuilt and restarted the LWB. The Tiger language was loaded again, and PIE gave the above error on build.
What you expected to happen
I expected PIE to recognize that the configuration has changed, and rerun the appropriate tasks. I suspect PIE has serialized some state that is now incorrect.
What actually happened
I got this error:
11:34:12.354 | DEBUG | → mb.spoofax.compiler.adapter.AdapterProjectCompiler(AdapterProjectInputSupplier(mb.cfg.task.CfgRootDirectoryToObject(eclipse-resource##/tiger))) (reason: directly or indirectly affected by change)
11:34:12.361 | DEBUG | ← mb.pie.runtime.layer.ValidationException: Visited task with same key was required with different input in same session.
mb.pie.runtime.layer.ValidationException: Visited task with same key was required with different input in same session. Cause:
task with key
#mb.spoofax.compiler.adapter.ParserAdapterCompiler(eclipse-resource##/tiger)
was already visited with input
Input{..., languageProjectInput=Input{..., variant=jsglr1(), ...}, ...}
while now required with input
Input{..., languageProjectInput=Input{..., variant=jsglr2(Recovery), ...}, ...}
at mb.pie.runtime.layer.ValidationLayer.error(ValidationLayer.java:466)
at mb.pie.runtime.layer.ValidationLayer.validateVisited(ValidationLayer.java:187)
at mb.pie.runtime.exec.BottomUpRunner.getData(BottomUpRunner.java:201)
at mb.pie.runtime.exec.BottomUpRunner.require(BottomUpRunner.java:185)
at mb.pie.runtime.exec.ExecContextImpl.require(ExecContextImpl.java:110)
at mb.pie.runtime.exec.ExecContextImpl.require(ExecContextImpl.java:90)
at mb.spoofax.compiler.adapter.AdapterProjectCompiler.lambda$compile$1(AdapterProjectCompiler.java:134)
at java.base/java.util.Optional.ifPresent(Optional.java:183)
at mb.spoofax.compiler.adapter.AdapterProjectCompiler.compile(AdapterProjectCompiler.java:134)
at mb.spoofax.compiler.adapter.AdapterProjectCompiler.lambda$exec$0(AdapterProjectCompiler.java:125)
at mb.common.result.Result.mapThrowing(Result.java:294)
at mb.spoofax.compiler.adapter.AdapterProjectCompiler.exec(AdapterProjectCompiler.java:125)
at mb.spoofax.compiler.adapter.AdapterProjectCompiler.exec(AdapterProjectCompiler.java:47)
at mb.pie.api.Task.exec(Task.java:56)
at mb.pie.runtime.exec.TaskExecutor.execInternal(TaskExecutor.java:126)
at mb.pie.runtime.exec.TaskExecutor.exec(TaskExecutor.java:82)
at mb.pie.runtime.exec.BottomUpRunner.exec(BottomUpRunner.java:369)
at mb.pie.runtime.exec.BottomUpRunner.execAndSchedule(BottomUpRunner.java:133)
at mb.pie.runtime.exec.BottomUpRunner.execScheduled(BottomUpRunner.java:120)
at mb.pie.runtime.exec.BottomUpRunner.requireInitial(BottomUpRunner.java:83)
at mb.pie.runtime.MixedSessionImpl.lambda$updateAffectedBy$0(MixedSessionImpl.java:70)
at mb.pie.runtime.SessionImpl.handleException(SessionImpl.java:160)
at mb.pie.runtime.MixedSessionImpl.updateAffectedBy(MixedSessionImpl.java:70)
at mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder.bottomUpBuild(SpoofaxLwbBuilder.java:192)
at mb.spoofax.lwb.eclipse.SpoofaxLwbBuilder.incrBuild(SpoofaxLwbBuilder.java:135)
Summary
I changed the
.cfg
of my Tiger language to use JSGLR2 instead of JSGLR1, rebuilt and restarted the LWB, and PIE fails to compile the new language, giving this error:What you did
I changed the parser configuration of my Tiger pure Spoofax 3 project from:
to
I did some other things in between, which is why I rebuilt and restarted the LWB. The Tiger language was loaded again, and PIE gave the above error on build.
What you expected to happen
I expected PIE to recognize that the configuration has changed, and rerun the appropriate tasks. I suspect PIE has serialized some state that is now incorrect.
What actually happened
I got this error:
Full error:
Context