Community
Participate
Working Groups
A grammar as follows doesn't result in any validation errors. Conflicting meta model aliases should not be allowed. grammar org.xtext.example.mydsl.Three with org.xtext.example.mydsl.Two import "http://www.xtext.org/example/mydsl/One" as one import "http://www.xtext.org/example/mydsl/Two" as one generate three "http://www.xtext.org/example/mydsl/Three" Model: greetings+=Greeting*;
fixed in HEAD
IIRC this was a feature and not a bug. Please revert the patch. We should discuss whether our motiviation to use the same alias for multiple packages is still valid.
done (In reply to comment #2) > IIRC this was a feature and not a bug. Please revert the patch. We should > discuss whether our motiviation to use the same alias for multiple packages is > still valid.
The idea was to enable users to group several packages by means of the same alias. If the classes from the packages do not have the same name, it is no problem to use the same alias. If we disallow this we should try to simplify the linking implementation of the Xtext grammar as well.
I would like to close this as won't fix, because it should be ok, to import multiple ecore models into the same namespace. Why not If there's no naming conflict and in case I use two different ecore models a lot I would like to import them both into the default namespace (i.e. no namespace).
Obviously I didn't read the documentation carefully enough, where this feature is described! I can see that someone would want to import multiple packages into the default namespace, but I don't think I've ever seen anyone associating multiple packages with the same alias. And IMHO this should be discouraged.
Did it surprise you anyhow or caused trouble?
I totally agree. Please reopen if we missed anything.
Sorry, I missed both last comments :-(
Closing as WONTFIX is fine by me. The only thing that surprised me was that it was possible :-)
see comment #10