Skip to content
This repository has been archived by the owner on Jul 7, 2024. It is now read-only.

Minifying breaks Linemapping #21

Closed
ardera opened this issue Apr 16, 2015 · 2 comments
Closed

Minifying breaks Linemapping #21

ardera opened this issue Apr 16, 2015 · 2 comments
Labels

Comments

@ardera
Copy link
Contributor

ardera commented Apr 16, 2015

If you minify a program that has the linemapping feature enabled, the linenumbers used by the linemapper will be broken.

@SquidDev
Copy link
Member

But line mappings won't be accurate anyway seeing as the minifier removes most whitespace. The only useful information you will get is the file it errored in.

@ardera
Copy link
Contributor Author

ardera commented Apr 16, 2015

Thats right. I think the best option would be to cut the linemapper in a minified program. If you find a bug, you simply reproduce it in an unminified version.

Also, in the linemapper, if the line you give as an index to the lineToModule table is too far away from the next existing entry, the linemapper will crash with an stackoverflow, since the __index metamethod is recursive. (I heard if you use tailcalls, the stack won't grow. This is false it seems)

The best fix would be to add an entry every 100 indexes or something, so the __index metamethod finds a value before the stack becomes to big. Do you understand what I mean?

@SquidDev SquidDev added the bug label Jul 30, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants