This tool offers an expressive syntax for creating ZObjects. Among other things, this syntax can improve developer velocity by accelerating test creation.
- Move to Gerrit and set up code review.
- Add tests.
- Set up continuous integration.
This tool offers an expressive syntax for creating ZObjects. Among other things, this syntax can improve developer velocity by accelerating test creation.
It turns out the error UnhandledPromiseRejectionWarning: TypeError: s.toLowerCase(...).replaceAll is not a function was caused by my Node version being too old: https://stackoverflow.com/questions/13340131/string-prototype-replaceall-not-working. I switched to a newer version and the error went away.
Now getting "could not delabel reference" when trying to evaluate:
lambda.js --evaluate 'and(false, true)' No config.json exists, using config.default.json instead. Error error type: "could not delabel reference" error value: ZToken K1: "ZSymbol" K2: "1" K3: "and"
That one was resolved by pointing the "wiki" in the config to the correct address ("http://localhost:8080"). By default the first one in the config is used (which by default is "https://wikifunctions.beta.wmflabs.org").
Some fixes were submitted in https://github.com/vrandezo/lambda-cli/pull/2.
Lists are still broken after the switch to Benjamin arrays.
Also mentioned with Denny and Ori the idea of bringing it over from Github into the WMF repositories and setting up CI for it to avoid future breakages.
James suggested creating this under the mediawiki/tools namespace, which makes sense to me. The full repo name can be mediawiki/tools/wikilambda-cli. The process for requesting a new repository is documented here: https://www.mediawiki.org/wiki/Gerrit/New_repositories. @AAssaf-WMF, do you want to give this a shot? If not, I'd be happy to request it.
Change 814155 had a related patch set uploaded (by AAssaf; author: AAssaf):
[mediawiki/tools/wikilambda-cli@master] Bring lambda CLI up to date with latest function schemata.
Change 814155 merged by jenkins-bot:
[mediawiki/tools/wikilambda-cli@master] Bring lambda CLI up to date with latest function schemata.
Hey @AAssaf-WMF, in the task triage meeting today we wondered if this was ready to mark as Resolved; if you're OK with it, shall we do that?
There are still some undefined that show up due to the typed lists migration that we need to fix.
Actually might not be related to lists migration, but here is an example:
$ lambda --noeval --normal 'if(true, [String, "a", "b"] , [String, "c", "d"])' { "Z1K1": { "Z1K1": "Z9", "Z9K1": "Z7" }, "Z7K1": { "Z1K1": "Z9", "Z9K1": "Z802" }, "Z802K1": { "Z1K1": "Z9", "Z9K1": "Z41" }, "Z802K2": { "Z1K1": { "Z1K1": { "Z1K1": "Z9", "Z9K1": "Z7" }, "Z7K1": { "Z1K1": "Z9", "Z9K1": "Z881" }, "Z881K1": { "Z1K1": "Z9", "Z9K1": "Z6" } }, "K1": { "Z1K1": "Z6", "Z6K1": "a" }, "K2": { "Z1K1": { "Z1K1": { "Z1K1": "Z9", "Z9K1": "Z7" }, "Z7K1": { "Z1K1": "Z9", "Z9K1": "Z881" }, "Z881K1": { "Z1K1": "Z9", "Z9K1": "Z6" } }, "K1": { "Z1K1": "Z6", "Z6K1": "b" }, "K2": { "Z1K1": { "Z1K1": { "Z1K1": "Z9", "Z9K1": "Z7" }, "Z7K1": { "Z1K1": "Z9", "Z9K1": "Z881" }, "Z881K1": { "Z1K1": "Z9", "Z9K1": "Z6" } } } } }, "Z802K3": { "Z1K1": { "Z1K1": { "Z1K1": "Z9", "Z9K1": "Z7" }, "Z7K1": { "Z1K1": "Z9", "Z9K1": "Z881" }, "Z881K1": { "Z1K1": "Z9", "Z9K1": "Z6" } }, "K1": { "Z1K1": "Z6", "Z6K1": "c" }, "K2": { "Z1K1": { "Z1K1": { "Z1K1": "Z9", "Z9K1": "Z7" }, "Z7K1": { "Z1K1": "Z9", "Z9K1": "Z881" }, "Z881K1": { "Z1K1": "Z9", "Z9K1": "Z6" } }, "K1": { "Z1K1": "Z6", "Z6K1": "d" }, "K2": { "Z1K1": { "Z1K1": { "Z1K1": "Z9", "Z9K1": "Z7" }, "Z7K1": { "Z1K1": "Z9", "Z9K1": "Z881" }, "Z881K1": { "Z1K1": "Z9", "Z9K1": "Z6" } } } } } } undefined function: If condition: true then: undefined K1: "a" K2: undefined K1: "b" K2: undefined else: undefined K1: "c" K2: undefined K1: "d" K2: undefined
Change 820136 had a related patch set uploaded (by AAssaf; author: AAssaf):
[mediawiki/tools/wikilambda-cli@master] Fix indentation in formatting of lambda CLI output.
Change 820136 merged by jenkins-bot:
[mediawiki/tools/wikilambda-cli@master] Fix indentation in formatting of lambda CLI output.
Change 820449 had a related patch set uploaded (by AAssaf; author: AAssaf):
[mediawiki/tools/wikilambda-cli@master] Fix formatting of complex objects.
Change 820449 merged by jenkins-bot:
[mediawiki/tools/wikilambda-cli@master] Fix formatting of complex objects.