Skip to content
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

report errors in the original line #20126

Closed
sigmundch opened this issue Jul 21, 2014 · 3 comments
Closed

report errors in the original line #20126

sigmundch opened this issue Jul 21, 2014 · 3 comments
Labels

Comments

@sigmundch
Copy link
Member

We have situations where we report errors in a line that is transformed, so users can't see where the error really comes from. For example:

> [Warning bwu_fontawesome_iconset_svg|example/index.html]: line 1537, column 1: private symbols cannot be used in event handlers

This error is detected in script compactor after all the inlining is done, so we end up reporting an error in line 1537 for a file with just 66 lines.

Probably the easiest solution is to move some of the checks for private symbols into the linter, which is processing files before any transformation happens.

To avoid parsing all the template expressions twice, we could pass the extracted data as an asset to the later phase.

@sigmundch
Copy link
Member Author

Removed Priority-Unassigned label.
Added Priority-Medium label.

@sigmundch
Copy link
Member Author

This is closer to be working, we still do inlining before we do some portions of the linting. However, Jake did a large refactoring that will make it easier to compose one transformer after another. We should be able to pass the HTML document from one transformer to the next, instead of reparsing the HTML. That way the original source-spans will be preserved, and error messages will contain the correct location.


cc @jakemac53.

@DartBot
Copy link

DartBot commented Jun 5, 2015

This issue has been moved to dart-archive/polymer-dart#420.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants