Closed lackneets closed 2 years ago
After I realized that the selector inside :not(), will be split into child selector, that won't be walked through.
Finally, after dig out selector-parser works, I rewrote the detection method. It should walk though each selector to find any one ":hover" pseudo node, instead of walk through whole selectors.
I also ran into this issue today wondering why there was an infinite loop, and sure enough it was :not(:hover)
just like you discovered.
Although, I think it should instead ignore :not(:hover)
because in a user agent without hover support the selector would (and should) match.
Hey @lackneets and @dustinwilson, thanks for the detailed bug report and confirmation. I'm aiming to take a look at this now and get a release out in the next few hours. As @dustinwilson suggested; I'll change the selector processor to omit selectors where :hover
is within a :not
or some variation of that logic.
I'll let you know when a patch is out there ready to test 👍
Hello again – I've just released a patch which hopefully resolves the issue. I had to do a manual release as it looks like travis-ci.org
is no longer operational. I guess that means I'll have to spend some more time migrating to GitHub Actions sometime soon.
Regarding the source of this problem: the way that selectors are identified, parsed, and rewritten definitely needs a rethink at some point, but sadly I don't have the time to dive into it right now.
Thanks again for the bug report, confirmation, and suggestion of solutions 🙏
What happened?
I found my webpack-dev-server startup hangs on with 100% cpu usage forever. To find out what happened, I modify the source code with console.log to see what's going on. As a result, It stuck on this rule, keeping looping
To reproduce this problem
source (stylus)