stylus
stylus copied to clipboard
avoid infinite loop in add-property
What / Why:
https://github.com/stylus/stylus/issues/2771
How:
I suspect the infinite loop may be happening due to the local definition for add-property
overshadowing the js definition, thereby creating an infinite loop. There seems to be a race condition for when that overshadowing happens, which occasionally allows the tests to pass.
Checklist:
- [ ] Documentation
- [ ] Unit Tests
- [ ] Code complete
- [ ] Changelog
Deploy Preview for stylus-docs canceled.
Name | Link |
---|---|
Latest commit | 203ad7c1a0072b56588f097565531f430fdb8044 |
Latest deploy log | https://app.netlify.com/sites/stylus-docs/deploys/64067f62e2a8b10007462290 |
Hey, can you add unit test for this PR ? Thanks
Hey, can you add unit test for this PR ? Thanks
Hm. I'm not sure if I can. It seems to me that there's a race condition, which causes this error in certain situations (as specified in #2771 ).
From my testing with my project's build tooling, the fix in this PR does seem to resolve the issue.
However, I'm not sure how to trigger it in a unit test. It seems like there are already unit tests for add-property
( test/cases/bifs.add-property.styl ), and those didn't catch this issue. Any suggestions?