-
Notifications
You must be signed in to change notification settings - Fork 27
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
This modules LESS Analyzer class cannot handle LESS files which use @import url() on css files #73
Comments
Hi @furan917. Thank you for your report. Join Magento Community Engineering Slack and ask your questions in #github channel. |
Option 1 of magento#73
Related to magento#73 - option 2, if you wish to see a more indepth writeup The Less Analyzer class cannot handle Less files that import css as the object they convert into mean the $node->path->value is a Link_Tree_Quoted object and not a string castable value, so we add an additional check for if we are a CSS quoted file or if value is an object which contains another value and use that instead (In the off chance similar future issues may arise with new objects)
For the sake of ease, I have created a PR for both options so you can see the direct changes I proposed to help better understand my point. Option 1, Guard clause, this might be too aggressive of an option |
When using this tool it was discovered that if you have a module that uses an @import url() on a css file the analyzer would break with the following error:
Take for example if your branch(es) included AdminAdobeIms which does this here.
The reason behind this is because when parsing over the modules content it converts the import to a
Link_Tree_Import
which is comprised of aLink_Tree_Uri
as thepath
and aLink_Tree_Quoted
as thevalue.
This means that the check done here is not sufficient enough to handle it.
You could handle it by adding another guard check near the top of the foreach (or expanding the current one)
or specifically handle the nodeKey set with something like
The text was updated successfully, but these errors were encountered: