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

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

Merged
merged 1 commit into from
Jun 24, 2018

Conversation

matthew-dean
Copy link
Member

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

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
Copy link

hawkerboy7 commented Jun 24, 2018

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

@matthew-dean
Copy link
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
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

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

@matthew-dean
Copy link
Member Author

@hawkerboy7 You're very welcome! 😁

@akx
Copy link

akx commented Jul 3, 2018

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
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