marko-js / marko

A declarative, HTML-based language that makes building web apps fun
https://markojs.com/
MIT License
13.36k stars 643 forks source link

Confusing marko taglib parsing error #118

Closed kristianmandrup closed 9 years ago

kristianmandrup commented 9 years ago

I think it comes down to a missing dependency or something, but would be nice with a clearer error message than this:

the marko-taglib.json it complains about.

{
    "tags-dir": "./_global/components"
}

Confusing error message:

Error: Error while handling properties for /home/isaura/tecla5/repo-manager-v2/apps/marko-taglib.json: Error while applying option of "tags-dir". Cause: SyntaxError: Unexpected token }
      at Object.parse (native)
      at scanTagsDir (/home/isaura/tecla5/repo-manager-v2/node_modules/marko/compiler/taglibs/taglib-loader/scanTagsDir.js:66:27)
      at Object.TaglibHandlers.tagsDir (/home/isaura/tecla5/repo-manager-v2/node_modules/marko/compiler/taglibs/taglib-loader/loader-taglib.js:134:13)
      at invokeHandlers (/home/isaura/tecla5/repo-manager-v2/node_modules/marko/node_modules/property-handlers/lib/index.js:66:29)
      at Object.exports.loadTaglib (/home/isaura/tecla5/repo-manager-v2/node_modules/marko/compiler/taglibs/taglib-loader/loader-taglib.js:257:5)
patrick-steele-idem commented 9 years ago

Thanks for reporting the confusing error message. I just pushed a commit that should make things less confusing. New version published: marko@2.7.10

Please let me know if you see any other issues. Thanks.

kristianmandrup commented 9 years ago

Awesome :) Gracias amigo! When do you expect a Marko Widgets 5.0 release? 1wk, 2wks, more?

patrick-steele-idem commented 9 years ago

You're welcome.

For Marko Widgets, we hope to release v5 next week. I've been focusing on benchmarking and testing this week and I do not expect the API to change for the final v5 release. That is, I encourage you to use the latest beta version now so that we can find and fix any bugs sooner :)

I'm not sure if you have had a chance to review, but I have updated the docs and added benchmarks to morphdom. See: https://github.com/patrick-steele-idem/morphdom

I've also updated the benchmarks we used to compare performance of Marko Widgets with React using the latest 5.0.0-beta.2 release: Marko vs React: Performance Benchmark (summary: React and Marko Widgets perform almost identical in the browser, but Marko Widgets is 10x faster when rendering on the server. In addition, Marko Widgets is much more lightweight)