Closed perbergland closed 2 months ago
I tried replacing the contents of test/tla/exported-declaration.js with my old test case
const asyncInitializer = async () => 'value';
export const test = await asyncInitializer();
but the test is still green…
Emitted code (in programs/server/app/app.js):
Without workaround:
const AuditLog = await createCollectionAsync("auditlog", {
indices,
schema: getAuditLogSchema()
});
__reify_async_result__();
} catch (_reifyError) {
return __reify_async_result__(_reifyError);
}
__reify_async_result__()
}, {
self: this,
async: false
});
with workaround:
await 0;
const AuditLog = await createCollectionAsync("auditlog", {
indices,
schema: getAuditLogSchema()
});
__reify_async_result__();
} catch (_reifyError) {
return __reify_async_result__(_reifyError);
}
__reify_async_result__()
}, {
self: this,
async: true
});
Ping @leonardoventurini I can’t figure this one out, would appreciate help if you have time
The problem does not seem to be in this lib but in the combination of reify, babel and meteor-tools and package versioning
https://github.com/meteor/meteor/issues/12986 is still not resolved for me in 0.25.2 (meteor 3.0.1).
This code does NOT trigger TLA:
The workaround to add an
await 0
in the file still works.