-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix Runtime error reports from imported files
- Loading branch information
Showing
5 changed files
with
35 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
aefd310
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid I'm a victim of version chaos. Using 1.2.0 from the dist folder, or from lesscss.org, I get an error when importing less files using @import. The error itself is not very helpful: Cannot call method 'slice' of undefined (using Chrome).
Did this commit make it into the 1.2.0 hotfix? Why did you choose to update in place? I wonder, what (remote) file do you recommend to include? Sure, I could copy the file, but in my case loading from remote is easier, at least for the time being.
aefd310
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This didn't make it in 1.2.0, it is in 1.2.1 however.
aefd310
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When running from the command prompt, from this commit on, a syntax error on an import is producing a big exception like this:
This happens because the getLocation() function is called for an undefined "input" argument.
The degradation of reporting syntax errors at imported files when running "lessc" started already with a first step at commit "6d4516e6fc". Since that commit:
Before commit ""6d4516e6fc", both errors would be reported by "lessc", as I already reported at:
I have been tweaking with the code and managed to have a version reporting both errors, but my current solution is awful, as nothing to do with version 1.2.0 code (which ran ok) and therefore, I am pretty sure there is a better way to do it.
Cheers!
aefd310
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, could you try 1.2.2? I remember fixing something related to this.
aefd310
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did try with 1.2.2, same problem.
Ok, moved my answer to the related issue: