Why does my language have to extend the language I want to output in my generator?

I have a completely self-contained language that doesn't extend any existing language that I want to generate c++ (well, gtext). This worked w/o complaint in 1.5, but I'm trying it in the recent 2.0 rc5 and though things continue to work I get a red underline error on the generator saying that my language should extend gtext. I think this isn't really what I want as gtext is not supposed to be part of my language. Do I misunderstand what it means to extend a language, or ?
I have a similar situation.

I don't need to add the target-language to the extending languages.
My generator module has it as used language as well as my generator model.

So I can't help you here.
Here's a minimal project demonstrating the warning.

The language contains one Concept called 'Thing'. Thing generates as "This is a thing." in GText. I don't want the language to extend GText, just generate it, but MPS is telling me that it should.

ExtendGText.zip (51KB)
Hi jbrownson,

you seem to be right with this example.

I tried adding another language to the project to see if the problem is still there, when generating to a language that is created in the same project.
There was no problem with that. So your problem seems to be quite special to generating to a packed language perhaps.

I would suggest that you file an issue report on the youtrack issue tracker.
ExtendGText2.zip (101KB)
This error appears when intermediate language in generation chain has a runtime, which is definitely required for generated code to work. Without adding an extends dependency on that language MPS won't be able to build correct compilation/runtime classpath for your code.

Your case:
Your language is reduced into gtext, while gtext is reduced into baseLanguage. gText has a runtime (see j.m.gtext.runtime), containing classes like TBaseBuilderContext, TBuffer etc.

To be honest, we are mixing two relations here. 'Generates into a language' is not the same as 'Extends concepts', and in the future we are going to split them.
Okay thanks for clarifying. I'll just have it extend GText for now then. I'm a little confused how/why gText is "reduced into baseLanguage". I'd think it'd be a pretty direct trip to text. Maybe I'll have to poke around the source a bit.

Please sign in to leave a comment.