Listen doesn't identify macOS 10.16/11.0 as compatible with the Darwin-adapter because of version number change, and falls back to polling.
The Darwin-adapter checks _targetos for version compatibility by looking for versions starting with "1", capturing [10,19].
macOS Big Sur has a _targetos of "darwin20", failing to be captured by the regex and causing listen to fall back to polling.
#listen/adapter/darwin.rb
OS_REGEXP = /darwin(?<major_version>1\d+)/i
#(...)
version = RbConfig::CONFIG['target_os'][OS_REGEXP, :major_version]
return false unless version
return true if version.to_i >= 13 # darwin13 is OS X 10.9
Could be fixed by changing the regex, assuming there are no other reasons adapter should break on Big Sur.
OS_REGEXP = /darwin(?<major_version>(1|2)\d+)/i
Notes:
This issue naturally causes high CPU-usage on Rails for developers upgrading to macOS Big Sur, when application is not properly configured to use Polling.
It seems to be working as expected with the above change, but I haven't tested it extensively.
Listen doesn't identify macOS 10.16/11.0 as compatible with the Darwin-adapter because of version number change, and falls back to polling.
The Darwin-adapter checks _targetos for version compatibility by looking for versions starting with "1", capturing [10,19].
macOS Big Sur has a _targetos of "darwin20", failing to be captured by the regex and causing listen to fall back to polling.
Could be fixed by changing the regex, assuming there are no other reasons adapter should break on Big Sur.
Notes: This issue naturally causes high CPU-usage on Rails for developers upgrading to macOS Big Sur, when application is not properly configured to use Polling.
It seems to be working as expected with the above change, but I haven't tested it extensively.