Skip to content

Fixes #3185 - Invalidate less-node file cache if modified - #3219

Merged
matthew-dean merged 1 commit into
less:masterfrom
matthew-dean:cache-modified
Jun 24, 2018
Merged

matthew-dean merged 1 commit into
less:masterfrom
matthew-dean:cache-modified

Conversation

@matthew-dean

@matthew-dean matthew-dean commented Jun 17, 2018 •

Copy link
Copy Markdown
Member

Fixes #3185

@matthew-dean matthew-dean changed the title Invalidate less-node file cache if modified Fixes #3185 - Invalidate less-node file cache if modified Jun 22, 2018
@matthew-dean
matthew-dean merged commit 3c081ff into less:master Jun 24, 2018
@hawkerboy7

hawkerboy7 commented Jun 24, 2018 •

Copy link
Copy Markdown

Cool! When u think we can expect less 3.0.5 (or a higher version) including this fix :)?

@matthew-dean

Copy link
Copy Markdown
Member Author

@hawkerboy7 I'd like #3228 reviewed and merged before I publish a new release, because it improves upon a new parsing feature previously merged this week.

@matthew-dean

Copy link
Copy Markdown
Member Author

@hawkerboy7 I realized I could publish this as a beta. So you can get this merged-in fix if you install with npm install less@beta.

@hawkerboy7

Copy link
Copy Markdown

@matthew-dean Ahh very nice, thank you! =)

@matthew-dean

Copy link
Copy Markdown
Member Author

@hawkerboy7 You're very welcome! 😁

@akx

akx commented Jul 3, 2018

Copy link
Copy Markdown

Could the asynchronous code path here use fs.stat instead of fs.statSync?

Synchronous calls stall the entire Node.js process, which I've measured can cause significant performance impacts in e.g. build processes.

@matthew-dean

Copy link
Copy Markdown
Member Author

@akx Yes, it could... it's just callback hell to write. If Less were updated to ES7/Babel-transformed code, it would be a simple matter of changing to await.

Part of the challenge with that bit of code is that there is a feature for sync imports (I guess to make it easier for building tests?). So I was trying to avoid duplicated code by essentially having the less-node file adapter either call a Promise or mock a promise and call things synchronously.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants