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

fix: dependency processing race condition #565

merged 10 commits into from Feb 9, 2019

fix: dependency processing race condition #565

merged 10 commits into from Feb 9, 2019


Copy link

@tivac tivac commented Feb 9, 2019


Ensure that walking the tree has completed before allowing exports/dependency information to be flattened.

Motivation and Context

If you called processor.string() or processor.file() on two files with shared dependencies w/o waiting for the first file to complete it's walk of the tree you could get random errors that made no sense.

How Has This Been Tested?

Added a svelte & non-svelte test for it.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)


  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
Copy link

@codecov codecov bot commented Feb 9, 2019

Codecov Report

Merging #565 into master will decrease coverage by 0.08%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #565      +/-   ##
- Coverage   99.06%   98.97%   -0.09%     
  Files          49       49              
  Lines        1173     1176       +3     
  Branches      183      183              
+ Hits         1162     1164       +2     
- Misses         11       12       +1
Impacted Files Coverage Δ
packages/processor/processor.js 100% <100%> (ø) ⬆️
packages/svelte/svelte.js 100% <100%> (ø) ⬆️
packages/webpack/loader.js 91.66% <0%> (-4.17%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a4a6cf6...10f7c9f. Read the comment docs.


@tivac tivac merged commit 436c1c8 into master Feb 9, 2019
9 checks passed
@tivac tivac deleted the svelte-race-condition branch Feb 9, 2019
Copy link

@deflock deflock commented Mar 2, 2019

I'm not sure if this is related, but sometimes I get Error: Use process(css).then(cb) to work with async plugins when using postcss-import in before.


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

Successfully merging this pull request may close these issues.

None yet

2 participants