-
Notifications
You must be signed in to change notification settings - Fork 93
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
--watch mode doesn't always work correctly #44
Comments
@X-Tender How many |
Just two. No includes, just two files for testing. |
That's weird, postcss should error if you are using a single output file with multiple inputs. |
@X-Tender Confirmed Issue. It's not immediately obvious, but the issue is present. Will do a little debugging. |
OK, tracing this down a bit further, if you remove I suspect Will continue debugging. |
The problem is (at least partially) in the import hook for postcss-cli formerly relied on the (undocumented) fact that inside This causes an issue at https://github.com/postcss/postcss-cli/blob/master/index.js#L177. When multiple files use the same There is a request at postcss/postcss-import#234 that asks for a reliable way to determine the import parent. If this is resolved, we could then use that to resolve this issue. (I hope that issue is escalated!) The other part of the problem: postcss-cli ought to error if If this behavior would have been in place from the beginning, postcss-cli would have errored noisily when postcss-import changed its behavior in regards to |
result.messages
.filter((msg) => msg.type === 'dependency' ? msg : '')
.forEach((dep) => chokidar.add(dep.file)) |
@michael-ciniawsky That is one option. Does |
@RyanZim nope, sry, I was busy with social work the last few weeks and hadn't much time for coding, need to take a look at e.g |
@michael-ciniawsky I'm currently not an official maintainer, just a user that watches the repo and responds to almost everything. Have you done any work on the (uncompleted) incremental rebuild aspect? |
No, I don't use output file, I use output dir. Ryan Zimmerman notifications@github.com schrieb am Mo., 24. Okt. 2016,
|
@X-Tender Yeah, this bug isn't present if there is only one input file. |
Hi, thanks for reporting this issue! I just tried to reproduce this issue, but I couldn't. Here is what I did: https://github.com/watilde/postcss-44 @RyanZim Thank you so much for your support as usual. Have you already got the point of the bug? It would be great if you could make a patch :) I'd love to ship it. |
@watilde To reproduce, add content to @michael-ciniawsky @watilde I'll try to put together a patch using |
Sorry so long in getting a patch together, might be next week; I'm currently quite busy trying to ship v1.0.0 over at https://github.com/jprichardson/node-fs-extra. |
This is blocked until postcss/postcss-import#233 is fixed. |
|
postcss/postcss-import#233 is done, will try to get a patch together soon. |
@watilde @ai @michael-ciniawsky Not sure exactly how we should do this. postcss-cli needs to use postcss-import prior to v8.2.0 doesn't support |
@RyanZim I'm in favour of dependency message here, for that reason alone that it is a postcss core 'feature' available to every plugin in need of that feature, not plugin specific like
Yep :) but when both are updated in parallel, new way works-out-of-box on both sides and it enhances the user experience, like it seems to be the case here, I would say party hard 🍾 😛 |
@michael-ciniawsky Good points.
Do you think this should be semver-major or not? |
This will be fixed in v3. |
Fixed on the |
I have the following postcss config:
When I run it the files only get compiled once. When I change it from dir to one css file it works without problems.
"postcss-cli": "^2.6.0",
Window10
The text was updated successfully, but these errors were encountered: