https://bugzilla.wikimedia.org/show_bug.cgi?id=43905
--- Comment #7 from Mark A. Hershberger <[email protected]> --- (In reply to comment #6) > > Then the whole loaderScripts parameter is out of place, or, at the very > > least, mis-designed and poorly documented. > > I haven't needed to use it often, but this is highly exaggerated and uncalled > for. Truly, then: I apologize. I think we're agreed that the documentation is lacking. I should have left it at that. > * You don't know much about how ResourceLoader works internally True. > * You don't understand the purpose of the "loaderScripts" feature. True. Though I would point out the documentation for it is could be improved. > * You're trying to do something (what exactly?) in an extension that is > related to the words "loader" and "scripts". So you look for documentation, > don't find much but do find "loaderScripts". You've already shown me how to do what I wanted. I appreciate that. I was trying to focus on the documentation issue and ask you to consider how this is designed. It acts in unexpected ways. > * You decide to try and use it, and fail because the way it should be used is > undocumented. It isn't doing what you want and so claim the feature is > mis-designed? That it didn't do what I wanted was because of the documentation and lack of knowledge. You were a great help in this. When the option is used, it changes the behavior of RL in unexpected ways. I think that is where the poor design comes in. This design problem could just be a naming issue, but when I add "loaderScripts" to a working stanza and leave my later mw.loader.load that depends on that compoent unchanged, mw.loader.load can no longer find the stanza. Should adding "loaderScripts" to a previously working stanza result in an emitted warning: Error: Unknown dependency: ext.abc That is the misdesign I was talking about. An error may be appropriate, but it should be coming from somewhere else. If adding "loaderScripts" makes a dependency suddenly unknown, then something is wrong. Maybe it is as easy as improving the error handling here. The developer should be told something like "You used 'loaderScripts' but forgot to do X". -- You are receiving this mail because: You are on the CC list for the bug. You are the assignee for the bug. You are watching all bug changes. _______________________________________________ Wikibugs-l mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/wikibugs-l
