GNOME Bugzilla – Bug 700862
importer: Only allow importing native modules on the root importer
Last modified: 2013-05-23 15:59:49 UTC
While working on gnome-shell, I added a file in js/ui/ called "system.js", which collided with the name of a native module and made it impossible to import anything but. This is a bit of a hack relying on the fact that native modules only exist at the root, which is a guarantee I made a little while ago. I want to replace this mess with require() so bad, you have no idea.
Created attachment 245088 [details] [review] Remove some leftover cruft from external native modules
Created attachment 245089 [details] [review] importer: Only allow importing native modules on the root importer Otherwise, native modules could take priority over another submodule with the same name, e.g. a module named "system".
Review of attachment 245088 [details] [review]: Yes
Review of attachment 245089 [details] [review]: This is correct, but system is a JS module, not native, so this should not collide.
My mistake, system is a native only module, so the diagnosis is correct.
Attachment 245088 [details] pushed as ce589d4 - Remove some leftover cruft from external native modules Attachment 245089 [details] pushed as 270416b - importer: Only allow importing native modules on the root importer