-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 caveats: refresh not happening for nested css under @layout ...
. nor when changing the input css only
#7679
Comments
Hey thanks for the detailed issue! I've followed every step outlined here in this screencast and everything works as expected for me: mono.movCan you provide an actual reproduction project and more details about your environment so we can try and reproduce as exactly as possible? A screen recording going through this stuff would be helpful too just to see if we notice any ancillary details that don't seem important enough to provide but could provide the clue to the actual source of any issue you are seeing. |
Here's a repository containing the code from that screencast that you can test: https://github.com/adamwathan/tailwindcss-issue-7679 Maybe you'll notice some configuration difference or something that could explain the difference in behavior. If not my bet is on it being WSL2 related — we have seen some issues where WSL2 doesn't handle filesystem events properly in other situations: If that's the culprit we may need to introduce a polling option for Windows users. |
Going to close this since haven’t heard anything back, I can’t reproduce it, and I’ve demonstrated it working as expected. If this is still an issue though and what I’ve provided here helps you narrow down the difference in our setups, definitely open a new issue, happy to take a look! Just can’t keep our issues in a healthy organized state if we leave inactive issues open that have no reproduction, hope that’s understandable! Thanks ❤️ |
@adamwathan, thank you very much for your detailed feedback and sorry for the delayed update from my side! I took your repo and the issue reproduced with it as well. As I see things are working on your demo so I guess there is some platform-specific issue. I see you are on Mac, my environment(s) are Ubuntu Linux 21.10 (one native and another within WSL2). I will try to setup some CI job on GithubActions and see if I can reproduce it there. After some more experiments I can confirm that the issue exists both on native Ubuntu and WSL2. It happens when I use vim editor (in interactive mode) for changing the source files. If I copy/paste files or just touch them after using vim - things work OK. I gess there is something special in the way |
What version of Tailwind CSS are you using?
v3.0.23 (fresh install via npm, npx), v3.0.7 (via tailwindcss-rails)
What build tool (or framework if it abstracts the build tool) are you using?
bin/dev
(i.e. rails taiwindcss:watch)Issue has been reproduced with most recent tailwindcss without other special framework on top
What version of Node.js are you using?
For example: v17.6.0 for my test with v3.0.23. And for rails I don't have anything else than what is generated via
rails new -c tailwind
What browser are you using?
Chrome. But the issue has been observed without brouser (just by checking the content of the generated css)
What operating system are you using?
Ubuntu 21.10 (either via WSL2 and a native one)
Reproduction URL
My simplified test-case is based on https://tailwindcss.com/docs/installation. I start with the initial example. Tailwind is started in watch mode as described. Then I gradually modify index.html and index.css adding 3 buttons and styles. Final version is:
tailwind.config.js is unchanged
Describe your issue
My steps:
Scenario 1
btn-cool-1
style toinput.css
under@layer components
. (Nothing changes in output.css)<button class="btn-cool-1" ...
to index.html. I can see new Rebuilding... output of tailwindcss watch commandcat dist/output.css | grep cool
- blank output) [FAIL]Conclusion for Scenario 1: changes are not being picked at all!
Scenario 2 (continues with the state at the end of Scenario 1
btn-cool-2
style toinput.css
(on top level, not under@layer components
)<button class="btn-cool-2" in
index.html`. I can see new Rebuilding... in the log.btn-cool-2
in output.css.Conclusing for Scenario 2: changes are reflected at the end. [SUCCESS]
Not immediately but only after changing the .html file. I assume this might be expected optimization for building used css classes only - if that is the case, seems correct outocme.
Scenaro 3 (continues from the end of Scenario 2)
btn-cool-2
ininput.css
- changing the color.touch src/index.html
, no changes in it.Conclusion for Scenario 3:
Scenario 4 (continues from end of Scenario 3)
12. I add
btn-cool-3
style toinput.css
13. I touch
index.html
. I see "Rebuilding..." in tailwind log.14. Result: the change is properly reflected in output.css [SUCCESS]
Conclusing for Scenario 4:
buttn-cool-1
(under@layout components
) - it is not refreshed. Seems Being under@layout ...
is breaking the synchronization.Scenario 5:
When I stop and restart tawilndcss --watch command: the
button-cool-1
style is generated insideoutput.css
. So it kind of works but not inwatch
mode.Related to #7679 #6553
The text was updated successfully, but these errors were encountered: