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
Starting from k6 v0.53, it is not possible to call any http methods from ClojureScript for no obvious reason. It seems that imports stopped working correctly.
k6 version
v0.53, v0.54
OS
Ubuntu 22.04
Docker version and image (if applicable)
No response
Steps to reproduce the problem
I am using shadow-cljs to compile ClojureScript with the following relevant configuration:
With v0.53 onwards, it's either an empty array (regular require), or this ($default require):
TypeError: Cannot convert undefined or null to object
at keys (native)
If I perform the same from TypeScript code, everything's fine with the new version.
Basically, imports from ClojureScript don't work anymore. All things given, I assume this is a regression from v0.52 behaviour.
Could something change in the runtime ESM support that breaks this between the v0.52 and v0.53? I see CJS/ESM related breaking changes listed for v0.53, but I don't quite understand from the description how they are related.
Thomas Heller, the author of shadow-cljs, was kind to provide his expertise and has debugged it with me, but he also has no idea why this doesn't work as the code emitted by shadow-cljs should work if ESM is implemented correctly by the runtime.
Expected behaviour
k6/http is imported correctly and all the methods are callable.
Actual behaviour
TypeError: Object has no member 'get'
The content you are editing has changed. Please copy your edits and refresh the page.
Thanks for opening an issue. To help us replicate the issue, could you provide us with a working script that works in v0.52 and doesn't work in v0.53 of k6?
@ankur22 Sure thing, I'll have to spend some time to put together a minimal example with an instruction. If I upload it to a separate GitHub repo would that work for you?
Great news, @trueneu! Thanks for being proactive and checking against your own scripts 😄 🎉 The fix will make it into the next release, so you should be able to work with that instead of a custom build once that has been released.
Brief summary
Starting from k6 v0.53, it is not possible to call any
http
methods from ClojureScript for no obvious reason. It seems that imports stopped working correctly.k6 version
v0.53, v0.54
OS
Ubuntu 22.04
Docker version and image (if applicable)
No response
Steps to reproduce the problem
I am using shadow-cljs to compile ClojureScript with the following relevant configuration:
Then, I import
k6/http
(the results are the same):k6 v0.52 will make an http call if I do
However, starting from v0.53, it complains there's no such method.
If I do
(js/Object.keys http)
, with v0.52 everything's fine:With v0.53 onwards, it's either an empty array (regular require), or this ($default require):
If I perform the same from TypeScript code, everything's fine with the new version.
Basically, imports from ClojureScript don't work anymore. All things given, I assume this is a regression from v0.52 behaviour.
Could something change in the runtime ESM support that breaks this between the v0.52 and v0.53? I see CJS/ESM related breaking changes listed for v0.53, but I don't quite understand from the description how they are related.
Thomas Heller, the author of shadow-cljs, was kind to provide his expertise and has debugged it with me, but he also has no idea why this doesn't work as the code emitted by shadow-cljs should work if ESM is implemented correctly by the runtime.
Expected behaviour
k6/http
is imported correctly and all the methods are callable.Actual behaviour
Tasks
The text was updated successfully, but these errors were encountered: