I’m using Spoofax Eclipse 2.6.0-SNAPSHOT. When building the project with incremental Stratego compilatin, I get the following error:

16:13 | INFO  | Build log                      - > Compile to separate strategy ast files: /<snip>/trans/external.str
16:13 | ERROR | Build log                      - Builder failed unexpectedly
java.io.IOException: Transformation failed
	at org.metaborg.spoofax.meta.core.pluto.build.StrIncrFrontEnd.runStrategoCompileBuilder(StrIncrFrontEnd.java:372) ~[org.metaborg.spoofax.meta.core_2.6.0.20181210-201828-master.jar:na]
	at org.metaborg.spoofax.meta.core.pluto.build.StrIncrFrontEnd.build(StrIncrFrontEnd.java:280) ~[org.metaborg.spoofax.meta.core_2.6.0.20181210-201828-master.jar:na]
	at org.metaborg.spoofax.meta.core.pluto.build.StrIncrFrontEnd.build(StrIncrFrontEnd.java:1) ~[org.metaborg.spoofax.meta.core_2.6.0.20181210-201828-master.jar:na]
	at build.pluto.builder.Builder.triggerBuild(Builder.java:134) [pluto-1.11.0.jar:na]
	at build.pluto.builder.BuildManager.executeBuilder(BuildManager.java:98) [pluto-1.11.0.jar:na]
	at build.pluto.builder.BuildManager.require(BuildManager.java:335) [pluto-1.11.0.jar:na]
	at build.pluto.builder.Builder.requireBuild(Builder.java:214) [pluto-1.11.0.jar:na]
	at org.metaborg.spoofax.meta.core.pluto.build.StrIncr.build(StrIncr.java:195) [org.metaborg.spoofax.meta.core_2.6.0.20181210-201828-master.jar:na]
	at org.metaborg.spoofax.meta.core.pluto.build.StrIncr.build(StrIncr.java:1) [org.metaborg.spoofax.meta.core_2.6.0.20181210-201828-master.jar:na]
	at build.pluto.builder.Builder.triggerBuild(Builder.java:134) [pluto-1.11.0.jar:na]
	at build.pluto.builder.BuildManager.executeBuilder(BuildManager.java:98) [pluto-1.11.0.jar:na]
	at build.pluto.builder.BuildManager.require(BuildManager.java:335) [pluto-1.11.0.jar:na]
	at build.pluto.builder.Builder.requireBuild(Builder.java:214) [pluto-1.11.0.jar:na]
	at org.metaborg.spoofax.meta.core.pluto.build.main.GenerateSourcesBuilder.buildStratego(GenerateSourcesBuilder.java:450) [org.metaborg.spoofax.meta.core_2.6.0.20181210-201828-master.jar:na]
	at org.metaborg.spoofax.meta.core.pluto.build.main.GenerateSourcesBuilder.build(GenerateSourcesBuilder.java:169) [org.metaborg.spoofax.meta.core_2.6.0.20181210-201828-master.jar:na]
	at org.metaborg.spoofax.meta.core.pluto.build.main.GenerateSourcesBuilder.build(GenerateSourcesBuilder.java:1) [org.metaborg.spoofax.meta.core_2.6.0.20181210-201828-master.jar:na]
	at build.pluto.builder.Builder.triggerBuild(Builder.java:134) [pluto-1.11.0.jar:na]
	at build.pluto.builder.BuildManager.executeBuilder(BuildManager.java:98) [pluto-1.11.0.jar:na]
	at build.pluto.builder.BuildManager.require(BuildManager.java:335) [pluto-1.11.0.jar:na]
	at build.pluto.builder.BuildManager.requireInitially(BuildManager.java:262) [pluto-1.11.0.jar:na]
	at org.metaborg.spoofax.meta.core.build.LanguageSpecBuilder.plutoBuild(LanguageSpecBuilder.java:318) [org.metaborg.spoofax.meta.core_2.6.0.20181210-201828-master.jar:na]
	at org.metaborg.spoofax.meta.core.build.LanguageSpecBuilder.compile(LanguageSpecBuilder.java:141) [org.metaborg.spoofax.meta.core_2.6.0.20181210-201828-master.jar:na]
	at org.metaborg.spoofax.eclipse.meta.build.CompileBuilder$1.run(CompileBuilder.java:49) [org.metaborg.spoofax.eclipse.meta_2.6.0.20181210-201828-master.jar:na]
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2289) [org.eclipse.core.resources_3.13.0.v20180512-1138.jar:na]
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2316) [org.eclipse.core.resources_3.13.0.v20180512-1138.jar:na]
	at org.metaborg.spoofax.eclipse.meta.build.CompileBuilder.build(CompileBuilder.java:69) [org.metaborg.spoofax.eclipse.meta_2.6.0.20181210-201828-master.jar:na]
	at org.metaborg.spoofax.eclipse.meta.build.Builder.build(Builder.java:53) [org.metaborg.spoofax.eclipse.meta_2.6.0.20181210-201828-master.jar:na]
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:795) [org.eclipse.core.resources_3.13.0.v20180512-1138.jar:na]
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) [org.eclipse.equinox.common_3.10.0.v20180412-1130.jar:na]
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:216) [org.eclipse.core.resources_3.13.0.v20180512-1138.jar:na]
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:259) [org.eclipse.core.resources_3.13.0.v20180512-1138.jar:na]
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:312) [org.eclipse.core.resources_3.13.0.v20180512-1138.jar:na]
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) [org.eclipse.equinox.common_3.10.0.v20180412-1130.jar:na]
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:315) [org.eclipse.core.resources_3.13.0.v20180512-1138.jar:na]
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:367) [org.eclipse.core.resources_3.13.0.v20180512-1138.jar:na]
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:388) [org.eclipse.core.resources_3.13.0.v20180512-1138.jar:na]
	at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:501) [org.eclipse.core.resources_3.13.0.v20180512-1138.jar:na]
	at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:408) [org.eclipse.core.resources_3.13.0.v20180512-1138.jar:na]
	at org.eclipse.ui.actions.BuildAction$1.runInWorkspace(BuildAction.java:288) [org.eclipse.ui.ide_3.14.0.v20180517-1842.jar:na]
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39) [org.eclipse.core.resources_3.13.0.v20180512-1138.jar:na]
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60) [org.eclipse.core.jobs_3.10.0.v20180427-1454.jar:na]
Caused by: org.metaborg.core.AggregateMetaborgException: Multiple exception occurred. * Invoking Stratego strategy clean-and-compile-module failed at term:   
	Module(   
  "external"   
, [ Strategies(   
      [ExtSDef("get-name", [], []), ExtSDef("reset-name", [], [])]   
    )   
  ]   
)   
Stratego trace:   
	clean_and_compile_module_0_0   
	clean_and_compile_module_0_0   
	with_1_1   
	compile_module_0_2   
	with_1_1 <==   
	frontend_sep_comp_0_0   
	m_transform_split_definitions_1_0   
	dr_scope_all_verbose_1_0   
	dr_scope_1_1   
Internal error: 'with' clause failed unexpectedly in 'compile-module'

	at org.metaborg.spoofax.core.stratego.StrategoCommon.invoke(StrategoCommon.java:78) ~[org.metaborg.spoofax.core_2.6.0.20181210-201828-master.jar:na]
	at org.metaborg.spoofax.meta.core.pluto.build.StrIncrFrontEnd.runStrategoCompileBuilder(StrIncrFrontEnd.java:370) ~[org.metaborg.spoofax.meta.core_2.6.0.20181210-201828-master.jar:na]
	... 40 common frames omitted
16:13 | ERROR | Build log                      - Required builder failed
java.io.IOException: Transformation failed
	at org.metaborg.spoofax.meta.core.pluto.build.StrIncrFrontEnd.runStrategoCompileBuilder(StrIncrFrontEnd.java:372) ~[org.metaborg.spoofax.meta.core_2.6.0.20181210-201828-master.jar:na]
	at org.metaborg.spoofax.meta.core.pluto.build.StrIncrFrontEnd.build(StrIncrFrontEnd.java:280) ~[org.metaborg.spoofax.meta.core_2.6.0.20181210-201828-master.jar:na]
	at org.metaborg.spoofax.meta.core.pluto.build.StrIncrFrontEnd.build(StrIncrFrontEnd.java:1) ~[org.metaborg.spoofax.meta.core_2.6.0.20181210-201828-master.jar:na]
	at build.pluto.builder.Builder.triggerBuild(Builder.java:134) [pluto-1.11.0.jar:na]
	at build.pluto.builder.BuildManager.executeBuilder(BuildManager.java:98) [pluto-1.11.0.jar:na]
	at build.pluto.builder.BuildManager.require(BuildManager.java:335) [pluto-1.11.0.jar:na]
	at build.pluto.builder.Builder.requireBuild(Builder.java:214) [pluto-1.11.0.jar:na]
	at org.metaborg.spoofax.meta.core.pluto.build.StrIncr.build(StrIncr.java:195) ~[org.metaborg.spoofax.meta.core_2.6.0.20181210-201828-master.jar:na]
	at org.metaborg.spoofax.meta.core.pluto.build.StrIncr.build(StrIncr.java:1) ~[org.metaborg.spoofax.meta.core_2.6.0.20181210-201828-master.jar:na]
	at build.pluto.builder.Builder.triggerBuild(Builder.java:134) [pluto-1.11.0.jar:na]
	at build.pluto.builder.BuildManager.executeBuilder(BuildManager.java:98) [pluto-1.11.0.jar:na]
	at build.pluto.builder.BuildManager.require(BuildManager.java:335) [pluto-1.11.0.jar:na]
	at build.pluto.builder.Builder.requireBuild(Builder.java:214) [pluto-1.11.0.jar:na]
	at org.metaborg.spoofax.meta.core.pluto.build.main.GenerateSourcesBuilder.buildStratego(GenerateSourcesBuilder.java:450) [org.metaborg.spoofax.meta.core_2.6.0.20181210-201828-master.jar:na]
	at org.metaborg.spoofax.meta.core.pluto.build.main.GenerateSourcesBuilder.build(GenerateSourcesBuilder.java:169) [org.metaborg.spoofax.meta.core_2.6.0.20181210-201828-master.jar:na]
	at org.metaborg.spoofax.meta.core.pluto.build.main.GenerateSourcesBuilder.build(GenerateSourcesBuilder.java:1) [org.metaborg.spoofax.meta.core_2.6.0.20181210-201828-master.jar:na]
	at build.pluto.builder.Builder.triggerBuild(Builder.java:134) [pluto-1.11.0.jar:na]
	at build.pluto.builder.BuildManager.executeBuilder(BuildManager.java:98) [pluto-1.11.0.jar:na]
	at build.pluto.builder.BuildManager.require(BuildManager.java:335) [pluto-1.11.0.jar:na]
	at build.pluto.builder.BuildManager.requireInitially(BuildManager.java:262) [pluto-1.11.0.jar:na]
	at org.metaborg.spoofax.meta.core.build.LanguageSpecBuilder.plutoBuild(LanguageSpecBuilder.java:318) [org.metaborg.spoofax.meta.core_2.6.0.20181210-201828-master.jar:na]
	at org.metaborg.spoofax.meta.core.build.LanguageSpecBuilder.compile(LanguageSpecBuilder.java:141) [org.metaborg.spoofax.meta.core_2.6.0.20181210-201828-master.jar:na]
	at org.metaborg.spoofax.eclipse.meta.build.CompileBuilder$1.run(CompileBuilder.java:49) [org.metaborg.spoofax.eclipse.meta_2.6.0.20181210-201828-master.jar:na]
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2289) [org.eclipse.core.resources_3.13.0.v20180512-1138.jar:na]
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2316) [org.eclipse.core.resources_3.13.0.v20180512-1138.jar:na]
	at org.metaborg.spoofax.eclipse.meta.build.CompileBuilder.build(CompileBuilder.java:69) [org.metaborg.spoofax.eclipse.meta_2.6.0.20181210-201828-master.jar:na]
	at org.metaborg.spoofax.eclipse.meta.build.Builder.build(Builder.java:53) [org.metaborg.spoofax.eclipse.meta_2.6.0.20181210-201828-master.jar:na]
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:795) [org.eclipse.core.resources_3.13.0.v20180512-1138.jar:na]
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) [org.eclipse.equinox.common_3.10.0.v20180412-1130.jar:na]
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:216) [org.eclipse.core.resources_3.13.0.v20180512-1138.jar:na]
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:259) [org.eclipse.core.resources_3.13.0.v20180512-1138.jar:na]
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:312) [org.eclipse.core.resources_3.13.0.v20180512-1138.jar:na]
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) [org.eclipse.equinox.common_3.10.0.v20180412-1130.jar:na]
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:315) [org.eclipse.core.resources_3.13.0.v20180512-1138.jar:na]
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:367) [org.eclipse.core.resources_3.13.0.v20180512-1138.jar:na]
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:388) [org.eclipse.core.resources_3.13.0.v20180512-1138.jar:na]
	at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:501) [org.eclipse.core.resources_3.13.0.v20180512-1138.jar:na]
	at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:408) [org.eclipse.core.resources_3.13.0.v20180512-1138.jar:na]
	at org.eclipse.ui.actions.BuildAction$1.runInWorkspace(BuildAction.java:288) [org.eclipse.ui.ide_3.14.0.v20180517-1842.jar:na]
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39) [org.eclipse.core.resources_3.13.0.v20180512-1138.jar:na]
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60) [org.eclipse.core.jobs_3.10.0.v20180427-1454.jar:na]
Caused by: org.metaborg.core.AggregateMetaborgException: Multiple exception occurred. * Invoking Stratego strategy clean-and-compile-module failed at term:   
	Module(   
  "external"   
, [ Strategies(   
      [ExtSDef("get-name", [], []), ExtSDef("reset-name", [], [])]   
    )   
  ]   
)   
Stratego trace:   
	clean_and_compile_module_0_0   
	clean_and_compile_module_0_0   
	with_1_1   
	compile_module_0_2   
	with_1_1 <==   
	frontend_sep_comp_0_0   
	m_transform_split_definitions_1_0   
	dr_scope_all_verbose_1_0   
	dr_scope_1_1   
Internal error: 'with' clause failed unexpectedly in 'compile-module'

	at org.metaborg.spoofax.core.stratego.StrategoCommon.invoke(StrategoCommon.java:78) ~[org.metaborg.spoofax.core_2.6.0.20181210-201828-master.jar:na]
	at org.metaborg.spoofax.meta.core.pluto.build.StrIncrFrontEnd.runStrategoCompileBuilder(StrIncrFrontEnd.java:370) ~[org.metaborg.spoofax.meta.core_2.6.0.20181210-201828-master.jar:na]
	... 40 common frames omitted

The contents of external.str:

module external

strategies

  external get-name(|)
  external reset-name(|)

Not sure if external strategies are not supported by intention or by mistake, but I thought I’d report it anyway. Cheers!

Submitted by Martijn on 9 January 2019 at 16:18

On 10 January 2019 at 15:44 Martijn commented:

Fixed in latest development release, thanks @Jeff!

Log in to post comments