|Answered by Julia Beliaeva|
"Extend" dependency between languages in MPS mean one of the following:
1. "extend" relation between languages concepts (for example, if a language has a concept that extends Expression from baseLanguage, then this language should extend baseLanguage).
2. "generates" relation between languages (for example, language has a concepts which is generated into an Expression from baseLanguage).
I know that these cases should be separated, but this is how it is in MPS now. So, answering to your question, you should extend baseLanguage.
|Improved by Sascha Lißon|
Check if "JDK" is listed in the dependencies (Constants_Demo2.sandbox -> Module Properties -> Dependencies Tab). If not, add it and it should compile.
|Improved by Julia Beliaeva|
Adding JDK into sandbox as a dependency is not required here. The language generates baseLanguage, therefore it should extend it, therefore JDK will be in compilation dependencies of sanbox since it is a baseLanguage runtime.
|Improved by Mihail Muhin|
Actually, the current MPS dependency system is not precise enough to describe real module dependencies. We plan to reinvent this subsystem in further versions.
As for current state, there's a number of questions a correct dependencies system should give answer for. E.g. "which generators should I use to generate a model that uses languages A, B and C?", "which code is visible from here?" etc. So, our solution about which type of dependency should be added in the current system was based on which dependency type will give correct answers for most of these questions in most cases.
In your example, the error shown can be somehow explained like "if you generate into some language, your language extends the possibilities given to you by a language you generate into. That's why you should extend it". To be honest, this is not true because the meaning of "extended language" is not defined actually. This is what we plan to fix.
Plus, though it's not obvious why an extended language should be added, but it's very simple to check and ask the user to do a thing which will fix his problem. We know that asking the user to do something he doesn't understand fully is not a correct way for IDE to behave, but still we can't fix everything immediately. Regretfully.