-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DukTape error: "unsupported" #35
Comments
Update: Babel 6 generated code works, but this Babel 7 code does not. |
After replacing the Babel 7 class code with Babel 6 code I got past the above error (which still stands though, I think we really need a solution for Babel 7) I ran into a problem with the The output starts with two lines from
The code at the location, including the console.log(1, subscriptions.entries());
console.log(1, subscriptions.entries()[Symbol.iterator]);
try {
for (var _iterator = subscriptions.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
... |
NOW RUNNING ON THE DEVICE (using var TEST_RECIPE_RULE_PROPERTIES = (function () {
var a = [1,2,3,4,5,6,7,8,9].map(function (o) {
var e = ['s1', 's2'];
console.log(10, 'Adding to Map:', e);
return e;
});
console.log(11, a);
var m = new Map(a);
return m;
})(); Output:
If I remove the I would really like to see the code Babel generates here, it seems to be completely off. This is why I would prefer to Babel the code myself and send it to the device with transpilation disabled. At least I'll know what the code looks like and can use the line numbers from stack traces. |
just noticed there is more than the initial error. |
Regarding the TypeError: undefined not callable (property [Symbol wellknown '?Symbol.iterator?'] of [object Object]) problem: It seems like the code is calling Symbol.iterator on a map iterator. So creating an iterator of an iterator. new Map()Symbol.iteratorSymbol.iteratorSymbol.iteratorSymbol.iteratorSymbol.iterator is valid. Would like to update low.js so this also works here. Right now only an iterator of a map can be created. But what is an iterator of an iterator of a map? Is it just a copy of the iterator, pointing to the same position the original iterator is also in? Cannot find anything about this online. Any idea? Regarding the second problem with the console.log(10, 'Adding to Map:', e); : So weird that the behaviour on the board is supposedly different. Will try out tomorrow. |
Babel bug? To two, yes it runs on low.js, the issue only occurred when I transferred it to the device. |
I cannot reproduce your problem. Here, both with the console.log and without the output is: [01:03:35] 11 [ [ 's1', 's2' ], ... can you retry? |
Update: It's on my TODO list, as soon as I can get the device working again... |
This seems to be still happening with the latest version
The relevant code fragment in line 4050 looks like this: |
Babel (7.2), using only "preset-env" without options (e.g. no "target"), produced this code, all functions at the top are Babel helpers:
Result of running this with lowjs-linux-x86_64-20181209:
The original ES 2015 code for the
class
(two or three custom errors are the only uses of classes in our code, everything else is "just functions and objects"):The text was updated successfully, but these errors were encountered: