-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Built-in functions are not available in certain contexts (impl. details). #3054
Comments
Output's a little different in 3.x, but it still errors.
(using the same example) |
This is simply because |
Whoops, my bad. |
I assume this is fixed by bad9be8 9440842 ? (sorry for the dupe... my git skills still need improvement. Any help there is welcome.) @seven-phases-max @calvinjuarez All tests should be passing now. At least they are locally. But AppVeyor / Travis are still saying things are broken, which I haven't had time to look into. Otherwise, can you test the above code against alpha 3 and see if this issue can be closed? |
@seven-phases-max I just realized you said |
@seven-phases-max Was there a bug report I missed about |
This issue is a possible dupe of #3112. (But should be checked against current fix.) |
Should this be closed? Still occurring? |
I took a look at this with a function called by a plugin. It definitely isn't eval'd in time, but this is beyond my current understanding of the Less tree. @seven-phases-max can you explain (as best you can) the way context/frames are defined within the Less engine? Maybe that could be documentation added to the code. |
Just try the initial example and if it fails then the issue is still there.
Uh... That would be not so easy. Personalty each time I had to deal with them I almost always went with |
Example:
Result:
The error simply means that the
pi
function is undefined at that point.This happens because each context/frame has its own copy of the functions set, but the set is copied there too late to be available for a (preeval only?) visitor (e.g. like the import visitor above). This obviously prevents any (preeval?) visitor to be able to evaluate any code involving a function call.
Not sure if it still applies to the 3.x branch.
The text was updated successfully, but these errors were encountered: