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

Rhino Support in 2.x #2316

Closed
renoth opened this issue Nov 28, 2014 · 6 comments
Closed

Rhino Support in 2.x #2316

renoth opened this issue Nov 28, 2014 · 6 comments

Comments

@renoth
Copy link

renoth commented Nov 28, 2014

How does Rhino support work in 2.x? I noticed that the information on the webpage is outdated because there is no less-rhino in 2.x although the website states:
http://lesscss.org/#command-line-with-rhino

"Each less.js release contains also rhino-compatible version."
and
"java -jar js.jar -f less-rhino-.js lessc-rhino-.js styles.less styles.css"

How does one proceed here?

@antoncl
Copy link

antoncl commented Dec 4, 2014

I've been looking into the same thing my self. The bad news is it would seem you're stuck on 1.7.5 for now.

The heart of the matter is that 2.x is a major overhaul of less, specifically they have started to rely heavly on the use of Promises, which is only supported by quite modern browsers: (This link has a fairly complete list of platforms which support Promises: http://kangax.github.io/compat-table/es6/)

Based on a quick glance of the code, it would seem that they have tried to mitigate this requirement by implementing a polyfill of Promises. Unfortunately that implementation seems to be borked, specifically they invoke a parameterless Resolve() in line 680, which causes Less to shortcircut the remaining logic.

In short, even if the team distributed the missing files, it will not work. Less v. 2.x cannot easily be brought to execute successfully using Rhino, and the browser option is limited to the versions shown in the link above.

Since I'm just a user like you, I cannot know if, when and how they plan to handle this issue.

@SomMeri
Copy link
Member

SomMeri commented Dec 4, 2014

This is related to #2322 (premises) and probably to #2063 (nashorn support).

@xtracoder
Copy link

It would be nice to at least update documentation, which currently says ...

Each less.js release contains also rhino-compatible version.

... and causes waste of time trying to find the way to run LESS 2.x with Rhino.

@topera
Copy link

topera commented Feb 29, 2016

Yes.....I also wasted precious time because of this...

@matthew-dean
Copy link
Member

matthew-dean commented Apr 4, 2017

Unfortunately, there aren't active maintainers who know anything about Rhino. Without expertise in Rhino, the maintenance of that piece has fallen by the wayside.

I would propose that someone make a separate less-rhino repo that's more dedicated to this piece, and that this is removed from the main less.js repo. There were never any tests made for Rhino, whomever did the original implementation, and it was not integrated into the main build process, meaning it wasn't, by default, part of regular releases.

@stale
Copy link

stale bot commented Nov 14, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

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

No branches or pull requests

6 participants