Description
There are two problems:
DDC imports with unqualified names like "foo"
instead of relative paths like "./foo"
. While this is supported by existing JS module systems, it is not supported by built-in ES6 module loaders. We also need to remove module-root
because it's not the right UX. Instead we should allow the user to provide the JS import path along with a summary for that module, with some sort of default behavior (probably flat modules: "./module_name"
). We'll also need a way to provide the SDK import path.
The other problem is with library names. They are exports of temporary identifiers, which can be renamed, breaking the module's ABI. It works in existing JS module systems, because DDC desugars ES6 export into a renamed local and a non-renamed export. We should be able to fix this by using export as. I think import
already has a way to handle TemporaryId
names and generate as
when needed.
(Original proposal/discussion here: #27262)