digital-fabric / polyphony

Fine-grained concurrency for Ruby
https://www.rubydoc.info/gems/polyphony
MIT License
655 stars 17 forks source link

Fix KERNEL_INFO_RE #88

Closed dezza closed 2 years ago

dezza commented 2 years ago

Polyphony fails to build if uname -sr is not formed a certain way

Current regex requires:

Other samples I found:

I propose: Linux (\d)\.(\d+)(?:\.)?((?:\d+\.?)*)(?:\-)?([\w\-]+)?

Which will match on: Linux 5.10.63.62.63, infinite patch numbers Linux 5.10.60.1-microsoft-standard-WSL2, word at the end including -

Test: https://regex101.com/r/CLX00x/1

noteflakes commented 2 years ago

Out of curiosity, why did you close the PR? This seems like a valuable change. Nevermind, I now see your other PR #89.