metaborg/spoofax-pie

Unable to have a Value argument-provider for a string parameter in spoofax.cfg

arnoudvanderleer opened this issue · 1 comments

Summary

Adding a Value argument-provider for a string parameter in spoofax.cfg gives an error.

What you did

I added the following piece of code to spoofax.cfg (inside command-def -> parameters)

    asdf = parameter {
      type = java String
      argument-providers = [Value("Hello")]
    }

What you expected to happen

I expected the program to not give an error, and pass the string parameter to the command/task.

What actually happened

I got an error:

'CFG editor update' has encountered a problem. An internal error occurred during "CFG editor update".

An internal error occurred during: "CFG editor update".
BUG: invalid AST shape, expected a string as first subterm in AST: ValueArgumentProvider(String("\"Hello\""{TermIndex("eclipse-resource##/chocopy.backend/spoofaxc.cfg",519)}){TermIndex("eclipse-resource##/chocopy.backend/spoofaxc.cfg",520)}){TermIndex("eclipse-resource##/chocopy.backend/spoofaxc.cfg",521)}

Context

Spoofax version: 0.16.10
Operating system: Ubuntu 20.04.3 LTS

Additional information

Gohla commented

Fixed by b4a108e.