less / less/less.js

Circular `multiple` imports cause silent eternal loop

Open
#3,058 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request suggestion up-for-grabs
Dominant language
JavaScript
Stars
17k
Forks
3.4k
Avg merge
7h 42m
Merged PRs (30d)
26

Description

Having two files:

foo.less

@import (multiple) 'bar';

bar.less

@import (multiple) 'foo';

Running command:

lessc foo.less

Expecting result (either):

  • automatic loop resolve, or
  • exiting with import loop exception

Actual result:

Silent endless loop (ended only by Ctrl+C or JavaScript out-of-memory)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue by creating foo.less and bar.less with the circular (multiple) imports, then run lessc foo.less. Trace the import handling until the loop is detected; done means compilation terminates by resolving the cycle or reporting an import-loop exception instead of hanging silently.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.