-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
Update specs for 3.4 behavior changes #1207
Comments
Ruby 3.4 is not yet released, so it doesn't make sense to test here against it as it keeps changing. |
For example see ruby/ruby@c94815b which will be mirrored here at the next synchronization. |
Sounds good. |
If you mean creating an item list like #1016 for 3.3 or 3.4, feel free to create it. |
We are interested in syncing the specs sooner than whatever schedule @andrykonchin does it. I'm reading through the instructions for upstreaming and downstreaming now. |
I attempted to sync from MRI and got an error about the last merge being too long ago?
This is with mspec and rubyspec as sibling directories both on master and following the instructions at https://github.com/ruby/spec/wiki/Merging-specs-from-JRuby-and-other-sources |
There is an env var to skip that check, see the source of that script. |
Yes, I saw that, but has it really been that long since the specs were synced? If so that's fine, I just thought I did something wrong. |
Yes, the last sync was on July 1: ruby/ruby#11080 jruby/jruby#8311 |
I made an attempt here but a huge amount of pack and unpack specs are failing. They appear to have no version guards. |
Ahh I see, there are mspec changes that need to be synced as well. I'll try to pick this up tomorrow. |
Yes, MSpec should be sync'd first as documented in https://github.com/ruby/spec/wiki/Merging-specs-from-JRuby-and-other-sources#upstream-mspec-changes-in-mri-jruby-and-truffleruby |
The first thing the document does is list the order in which things should be synced:
So that is where I started. Perhaps the document should be updated to make it clear what the actual sequence of steps is supposed to be. |
That's the general overview of the approach, the expectation is steps are done in the order they are written. |
It appears the issues were not entirely my fault. CRuby has made backward-incompatible changes to mspec that prevent current specs from passing: ruby/mspec#70 Specifically, they changed the way that some platform details are guarded, for example the platform bit width for native numeric types. Without mspec and rubyspec updating at the same time it's not possible to pass CI on either side.
Done. I will probably have additional edits. |
With both mspec and ruby/spec changes from CRuby rebased, it does pass as expected. |
I have restored the removed |
It is unclear to me whether upstreaming changes should be one PR or multiple. The script creates separate branches for each impl. |
The script updates your local |
Fixed by #1210. |
@headius Did you do the |
I'll fix it, although I don't really have time for that today. |
Done, I used the script to extract the new upstream spec commits from ruby & truffleruby in between, by cherry-picking the changes from the |
I did JRuby first because that's what I was most interested in catching up to 3.4 specs. I would have continued with the other two but you got to it while I was working on the JRuby PR. |
Reflecting back on this, thank you for filing the issue, due to several events Andrii missed the few last syncs. |
It had been months since the last sync and I needed it done, so I wanted to take this opportunity to try to learn the process so I could help do it as needed in the future. Three months is too long to go without syncing, and I'm sure many of the problems I ran into were because of that. I will continue to do syncs as needed because the once-monthly sync was not keeping up with the specs we need to pull from CRuby for 3.4, and we need to stay on top of that through the final release. Thank you for helping me to learn how to handle issues during the sync process; I will also continue to update the wiki with details I learned along the way. Regarding specific issues you mentioned...
I believe this is called teaching. I needed to learn the process and you taught me. Thank you. I assume you did the same for Andrii when he started out.
I was not aware of the time-sensitive nature of syncing specs back to CRuby because it was not mentioned in the wiki document. Thank you for letting me know and helping to finish the process. I notice you have updated the document to make clear that the entire sync process should happen the same day; perhaps that should be modified to include "as quickly as possible" since it is surprisingly problematic if more specs come in during the sync. I was planning to finish the sync all in the same day, but that clearly was not quick enough.
Again, the spec had been passing for JRuby for several weeks without a single failure, passed on my local system with CRuby, and has passed every single ruby/spec CI run on Linux and Windows after the merge. The failure on Darwin seems like much more than a transient issue; the sleep times are off by a huge margin. I could not find where it was failing for CRuby since they generate thousands of CI runs per day, but I'd like to see why it failed. However... the spec is written to ensure that sub-millisecond sleeps work correctly and actually do sleep; perhaps it's enough to make sure that 100 sleeps of 0.1ms adds up to at least 10ms and drop the less-than check. Any failure from that point would clearly mean the sleeps were not sleeping for at least 0.1ms and something is broken.
Sounds like OSS to me. Delegating is hard. |
Why does JRuby suddenly want very frequent syncs where monthly was enough for many years? In any case, please let us know whenever you sync to avoid duplicated work (or let's design some schedule).
Yes, except I did it over a call with him so he knew all the details.
Will do, also I'll edit the wiki to make it clear whoever makes the sync has to do everything themselves, it's not OK to ask others to help because that would add non-trivial delays, even more so since we are not in the same time zone. I appreciate your help with syncing, hopefully it will be smoother next time. |
JRuby 10 will be released with Ruby 3.4 support early in 2025. |
ruby/spec is currently not being run on Ruby 3.4, and as a result there are a number of failures. Most of these are related to the new Hash#inspect formatting (preferring
a: 1
over:a => 1
with some spacing changes) but there are others.We will need to update the specs and add version guards for cosmetic changes like this, and audit the remaining specs for real behavior changes that should be guarded or added.
The text was updated successfully, but these errors were encountered: