Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InvalidAstShapeException when adding command-def #93

Closed
Gohla opened this issue Nov 10, 2021 · 1 comment
Closed

InvalidAstShapeException when adding command-def #93

Gohla opened this issue Nov 10, 2021 · 1 comment
Labels
C-Bug Category: bug. Not working as expected

Comments

@Gohla
Copy link
Member

Gohla commented Nov 10, 2021

Summary

InvalidAstShapeException when adding command-def

What you did

Add the following to a CFG file:

let compileTask = command-def {
  display-name = "Compile"
}

What you expected to happen

No exception to occur.

What actually happened

The following exception occurred:

mb.aterm.common.InvalidAstShapeException: BUG: invalid AST shape, expected command definition with one CommandDefTaskDef option in AST: CommandDef([CommandDefDisplayName(String("\"Compile\""{TermIndex("eclipse-resource##/chocopy.reference/spoofaxc.cfg",123)}){TermIndex("eclipse-resource##/chocopy.reference/spoofaxc.cfg",124)}){TermIndex("eclipse-resource##/chocopy.reference/spoofaxc.cfg",125)}]{TermIndex("eclipse-resource##/chocopy.reference/spoofaxc.cfg",128)}){TermIndex("eclipse-resource##/chocopy.reference/spoofaxc.cfg",129)}
	at mb.cfg.convert.CfgAstToObject.lambda$getCommandDefTaskType$54(CfgAstToObject.java:493)
	at mb.common.option.Option.unwrapOrElseThrow(Option.java:219)
	at mb.cfg.convert.CfgAstToObject.getCommandDefTaskType(CfgAstToObject.java:493)
	at mb.cfg.convert.CfgAstToObject.convert(CfgAstToObject.java:390)
	at mb.cfg.task.CfgToObject.toOutput(CfgToObject.java:159)
	at mb.cfg.task.CfgToObject.lambda$exec$0(CfgToObject.java:136)
	at mb.common.option.Option.mapOrElse(Option.java:129)
	at mb.common.result.Result.flatMap(Result.java:409)
	at mb.cfg.task.CfgToObject.lambda$exec$1(CfgToObject.java:136)
	at mb.common.option.Option.mapOrElse(Option.java:129)
	at mb.common.result.Result.flatMap(Result.java:409)
	at mb.cfg.task.CfgToObject.exec(CfgToObject.java:134)
	at mb.cfg.task.CfgToObject.exec(CfgToObject.java:26)
	at mb.pie.api.Task.exec(Task.java:56)
	at mb.pie.runtime.exec.TaskExecutor.execInternal(TaskExecutor.java:130)
	at mb.pie.runtime.exec.TaskExecutor.exec(TaskExecutor.java:87)
	at mb.pie.runtime.exec.BottomUpRunner.exec(BottomUpRunner.java:370)
	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:72)
	at mb.pie.runtime.SessionImpl.handleException(SessionImpl.java:227)
	at mb.pie.runtime.MixedSessionImpl.updateAffectedBy(MixedSessionImpl.java:72)
	at mb.spoofax.eclipse.pie.PieRunner.updateAffectedBy(PieRunner.java:500)
	at mb.spoofax.eclipse.pie.PieRunner.addOrUpdateEditor(PieRunner.java:142)
	at mb.spoofax.eclipse.editor.EditorUpdateJob.update(EditorUpdateJob.java:97)
	at mb.spoofax.eclipse.editor.EditorUpdateJob.run(EditorUpdateJob.java:74)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Context

  • Spoofax version: 0.16.0
  • Operating system & version: Any
  • Java version (if applicable):
  • Eclipse version (if applicable):
  • Gradle version (if applicable):
@Gohla Gohla added the C-Bug Category: bug. Not working as expected label Nov 10, 2021
@Gohla
Copy link
Member Author

Gohla commented Nov 11, 2021

Fixed by 0046900

@Gohla Gohla closed this as completed Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Bug Category: bug. Not working as expected
Projects
None yet
Development

No branches or pull requests

1 participant