-
Notifications
You must be signed in to change notification settings - Fork 93
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
Improve DX #33
Improve DX #33
Conversation
Is this cross-browser-compatible? |
The only real change is that context data are now solely attached to the error object, and can't be gleaned from the message string. I've never researched but I assume thrown objects work with properties in all legacy browsers? The main reason for this change is that I've noticed all libraries that use luaparse need to manipulate the error object to be usable, ie https://github.com/rameshvarun/linter-luaparse/blob/master/lib/linter.js#L17:L20. If we go this way, it would also be nice to get at least the plumbing for tolerant error handling before bumping the major version. |
I was asking because error objects have historically had different names and formats for properties/values in different engines. Not sure what the current status is on |
Ah, thanks for the heads up! I'll make sure to look into it. |
@oxyc, are you planning to merge this at some point? May want to rebase it with my changes to the testing framework. |
0f625d4
to
c0968bf
Compare
@fstirlitz thanks for the heads up, I'll do that. As this is a breaking change which doesn't really fix any bugs or add much, I'm in no hurry to get it merged. I was thinking if there's ever some larger feature (eg error tolerance), it could be added in the same version bump. Lately seems I've been neglecting the project though, thanks for keeping it going! |
As for breaking changes, I've already added the Lua versioning switch and interpretation of escape sequences in string literals. What do you think about the issue I mentioned in a comment in And with regards to this specific change, I'd also change the error object so that it's no longer a |
8022c30
to
365842c
Compare
This PR has stalled, and I think I'll be addressing problems raised here in a different way. Closing. |
Considering adding this as v3. Seems more logical to set the humanly readable line numbers in the cli instead of hardcoding into the message.