Skip to content

Rhino Support in 2.x #2316

Closed
Closed

Description

@renoth

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?

Activity

  1. antoncl commented on Dec 4, 2014

    @antoncl

    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.

  2. SomMeri commented on Dec 4, 2014

    @SomMeri
    Member

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

  3. xtracoder commented on Feb 17, 2016

    @xtracoder

    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.

  4. topera commented on Feb 29, 2016

    @topera

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

  5. matthew-dean commented on Apr 4, 2017

    @matthew-dean
    Member

    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.

  6. stale commented on Nov 14, 2017

    @stale

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions