Skip to content
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

1.20.2 yanked? #304

Closed
MrJoy opened this issue Sep 12, 2021 · 8 comments
Closed

1.20.2 yanked? #304

MrJoy opened this issue Sep 12, 2021 · 8 comments

Comments

@MrJoy
Copy link

MrJoy commented Sep 12, 2021

I see that 1.20.2 was yanked from Rubygems, and looking at the diff I don't really see an obvious reason as to why it might need to have been yanked. Could you outline what went wrong that resulted in the need to yank this?

@grosser
Copy link
Owner

grosser commented Sep 12, 2021

change had to be reverted because it broke other peoples stuff #301

@grosser
Copy link
Owner

grosser commented Sep 12, 2021

@pamgluss-slack @pedromartinez can tell you more / hopefully have and idea if this is good as is or should be moved forward again ... I could not reproduce either of their issues 🤷

@MrJoy
Copy link
Author

MrJoy commented Sep 12, 2021

Ahhhhh, I see what happened, and why the code misbehaved!

https://github.com/grosser/parallel/pull/299/files

Note the trailing comma on the when line. That's going to basically make Ruby read the code like so:

ppc = case RbConfig::CONFIG["target_os"]
        when /darwin[12]/, IO.popen("/usr/sbin/sysctl -n hw.physicalcpu").read.to_i
          # empty block
        when /linux/
           cores = {}  # unique physical ID / core ID combinations

So it will always execute /usr/sbin/sysctl -n hw.physicalcpu, no matter what system you're on. If /usr/sbin/sysctl isn't present, then IO.popen raises an error. If it does exist, then the output is read, and converted to an integer and used as a test value for whether that when block matches RbConfig::CONFIG["target_os"] -- which is probably never gonna happen, obviously.

@grosser
Copy link
Owner

grosser commented Sep 13, 2021

oh wow 🤦 totally missed that ... 🎉

@grosser
Copy link
Owner

grosser commented Sep 13, 2021

... rubocop would have found that 😞

@grosser
Copy link
Owner

grosser commented Sep 13, 2021

welp rubocop does not care either ...

@grosser
Copy link
Owner

grosser commented Sep 13, 2021

1.21.0

@grosser grosser closed this as completed Sep 13, 2021
@MrJoy
Copy link
Author

MrJoy commented Sep 13, 2021

Many eyes make all bugs shallow. Happy I could be of assistance, and thank you for your prompt response!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants