apostrophe icon indicating copy to clipboard operation
apostrophe copied to clipboard

Alias conflicts

Open jth- opened this issue 11 years ago • 3 comments

If you extend a class that has an alias but the subclass something different, the subclass inherits the superclass's alias and conflicts by default.

i.e.

If project-users extends apostrophe-users, but apostrophe-users is aliased to users, project-users will have the alias users as well and cause an error on Apostrophe startup. To make this work right now, you have to override the alias in project-users.

Would proper subclass behavior be to blow away aliases of superclasses?

jth- avatar Jul 13 '15 16:07 jth-

That would be a nice change for sure. On Jul 13, 2015 12:21 PM, "Jimmy Harrison" [email protected] wrote:

If you extend a class that has an alias but the subclass something different, the subclass inherits the superclass's alias and conflicts by default.

i.e.

If project-users extends apostrophe-users, but apostrophe-users is aliased to users, project-users will have the alias users as well and cause an error on Apostrophe startup. To make this work right now, you have to override the alias in project-users.

Would proper subclass behavior be to blow away aliases of superclasses?

— Reply to this email directly or view it on GitHub https://github.com/punkave/apostrophe/issues/294.

boutell avatar Jul 13 '15 17:07 boutell

The correct fix is to report conflicts at startup as a warning. Automatically blowing aliases away would be a bc break in projects that work today because they don't actually touch the aliases.

boutell avatar Oct 23 '17 16:10 boutell

... And we already have that, as a hard error, so this is as good as it can get. Closing.

boutell avatar Oct 23 '17 16:10 boutell