-
Notifications
You must be signed in to change notification settings - Fork 416
Remove dependency on win32ole
#1051
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
Conversation
This will become bundled in Ruby 3.5 Unfortunately there is no portable way of checking for this. The wmic command is deprecated, though I don't observe this myself on W11 (yet?)
2c42376 to
6742a0d
Compare
eregon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great, thank you!
|
@MSP-Greg I wonder if you might know what's the best way to get the number of (physical) cores on a Windows machine from Ruby? |
|
The PowerShell command On my system, it shows 10. Do you mean via c code? |
|
I meant via the command-line. |
|
I made a release with this: https://github.com/ruby-concurrency/concurrent-ruby/releases/tag/v1.3.2 |
- Added concurrent-ruby 1.3.4 constraint to Gemfile to fix Logger NameError - This resolves the "uninitialized constant LoggerThreadSafeLevel::Logger" error - Updated MIGRATION_GUIDE with Issue 7 documenting the problem and solution - Updated README to mention the concurrent-ruby compatibility fix - All 47 tests passing The concurrent-ruby 1.3.5+ has a known issue with Ruby 3.2+ causing Logger::Severity errors. Pinning to 1.3.4 resolves this until the upstream bug is fixed. See: ruby-concurrency/concurrent-ruby#1051 Co-authored-by: nsano-rururu <[email protected]>
This will become bundled in Ruby 3.5
Unfortunately there is no portable way of checking for this. The wmic command is deprecated, though I don't observe this myself on W11 (yet?)
Closes #1048
The powershell variant will work in at least releases from 2012 (Windows 8):
https://learn.microsoft.com/en-us/previous-versions/powershell/module/cimcmdlets/get-ciminstance?view=powershell-3.0
https://learn.microsoft.com/en-us/previous-versions/powershell/module/microsoft.powershell.utility/select-object?view=powershell-3.0
https://learn.microsoft.com/en-us/powershell/scripting/install/powershell-support-lifecycle?view=powershell-7.4
There are no docs from earlier so I can't say about versions from before that. Maybe supporting 12 year old versions is good enough and
wmicdoesn't even need to be used? Let me know.This is overall very defensive in what could happen because I'm not primarily developing on windows.