Inconsistent behaviour when refreshing circular referenced templates
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 17k
- Forks
- 3.4k
- Avg merge
- 7h 42m
- Merged PRs (30d)
- 26
Description
Create template called circular.less as below:
@import "circular.less";
Declare it in the head element via a link element.
When loading the page for the first time, it only loads circular.less once.
In the developer console, type:
less.refresh()
Verify that it loads circular.less 3 times.
If the circular reference occurs across 2 files, it will load the 2 files twice.
If the circular reference occurs across 3 files, it will load the 3 files once then the first 2 again.
I'm not sure what the expected behaviour is, but this seems a little fishy.
This is vaguely related to #1484.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the circular.less case by loading it through a link element and calling less.refresh() in the developer console, then compare it with two- and three-file cycles. Review the related behavior in issue #1484; done should mean the expected refresh behavior is established and circular references no longer cause inconsistent repeated loads.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100