You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On bundling, symbols are defined, but they seem to be captured incorrectly. Take for example the setUrlParseFn - my library imports that from another library.
On bundling deno the deno bundle rewrites in the mjs like:
line# 369 - the original function in library nats.deno - setUrlParseFn has been remapped to setUrlParseFn2:
let urlParseFn;
function setUrlParseFn2(fn) {
urlParseFn = fn;
}
line# 1404: - the bundler remaps setUrlParseFn2 to setUrlParseFn1:
const setUrlParseFn1 = setUrlParseFn2;
line# 3951 - code on the nats.ws which imports setUrlParseFn from the nats.deno library, in copied, but not mapped to one of the imported functions (should be setUrlParseFn1?:
function connect2(opts7 = {
}) {
setUrlParseFn(wsUrlParseFn);
^^^^^^^^^^^^^ This symbol has been renamed, to setUrlParse2 or setUrlParse1 - runtime will not find this function
setTransportFactory(()=>{
return new WsTransport();
});
return NatsConnectionImpl.connect(opts7);
}
Finally on # 7572: - the combined libraries export setUrlParseFn, but while this is the correct name for the re-export, the internal version is not mapped correctly:
export {
// lots of stuff elided
setUrlParseFn1 as setUrlParseFn
// more stuff elided
};
The above is just representative of this symbol. Manually patching them eventually fixes the issue like #8478
The text was updated successfully, but these errors were encountered:
aricart
changed the title
deno bundle in 1.5.4 exports incorrectly
deno bundle in 1.5.4 imports and remaps symbols incorrectly
Nov 24, 2020
On bundling, symbols are defined, but they seem to be captured incorrectly. Take for example the
setUrlParseFn
- my library imports that from another library.On bundling deno the deno bundle rewrites in the mjs like:
line# 369 - the original function in library
nats.deno
-setUrlParseFn
has been remapped tosetUrlParseFn2
:line# 1404: - the bundler remaps
setUrlParseFn2
tosetUrlParseFn1
:line# 3951 - code on the
nats.ws
which importssetUrlParseFn
from thenats.deno
library, in copied, but not mapped to one of the imported functions (should besetUrlParseFn1
?:Finally on # 7572: - the combined libraries export
setUrlParseFn
, but while this is the correct name for the re-export, the internal version is not mapped correctly:The above is just representative of this symbol. Manually patching them eventually fixes the issue like #8478
The text was updated successfully, but these errors were encountered: