As a WikibaseLexeme developer, I want to use debug=true so that I can set resource loader to debug mode in order to disable JS minification for setting breakpoints and to disable caching.
At the moment, any lexeme page with debug=true fails to load any of the JavaScript functionality. It fails with Error: View lexemeview does not exist. Example: https://wikidata.beta.wmflabs.org/wiki/Lexeme:L1?debug=true
I think the following happens:
- EntityParserOutputGenerator loads 'wikibase.ui.entityViewInit'
- ViewLexemeAction concurrently loads 'wikibase.lexeme.lexemeview'
- entityViewInit has no dependency on Lexeme, so it may run before any Lexeme code is there
- the Lexeme ViewFactory is not registered https://github.com/wikimedia/mediawiki-extensions-Wikibase/blob/master/repo/resources/wikibase.ui.entityViewInit.js#L135 because it's not there yet
- Wikibase's ViewFactory calls getEntityView which fails because lexemeview isn't there
We should fix this soon since it makes working with the lexeme JavaScript code rather painful.
Questions:
Why does the code still work without debug=true?
This definitely worked at some point. When/why did it break? Recent ResourceLoader optimizations?