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 ruby to 3.0 #8452
Update ruby to 3.0 #8452
Conversation
e45ea1c
to
357f504
Compare
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.
🚀
4797a6b
to
d09ab45
Compare
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.
@alecslupu You asked me previously about the problem with the attributes of type Rails::Engine
. These changes need to be reverted (or changed to **{}
in Ruby 3) for these attributes to work correctly.
This is explained in the CHANGELOG notes if you search for Rails::Engine
from there.
There is a limitation in the Ruby language that if the method has default values for the previous arguments and defines keyword arguments, the last argument will always receive a respond_to?(:to_hash) call to it which doesn't work for Rails::Engine (you can try it out in the Rails console by calling Rails::Engine.respond_to?(:to_hash)).
EDIT:
Actually in Ruby 3 we just need to pass the hash as an empty keyword argument list as **{}
. I'll modify my comments below.
decidim-core/lib/decidim/participatory_space_context_manifest.rb
Outdated
Show resolved
Hide resolved
decidim-verifications/lib/decidim/verifications/workflow_manifest.rb
Outdated
Show resolved
Hide resolved
decidim-verifications/lib/decidim/verifications/workflow_manifest.rb
Outdated
Show resolved
Hide resolved
dea01d7
to
a9f7555
Compare
@alecslupu Can you rebase this with I'd like to get rid of the deprecation messages to review this properly. |
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.
I'm not sure what to do about these but I would rather try to push these changes to the upstream repositories of these gems.
The Origami gem seems stale at the moment, though...
e62f98b
to
e6e4a38
Compare
Thanks @andreslucena for confirming! I believe this has something to do with the version of Webpacker we are using not being thread safe. If I do the following change at # Comment this out:
# threads min_threads_count, max_threads_count
# Add this instead:
threads 1, 1 Then I cannot make this break anymore. It has something to do webpacker trying to process the |
Wow, Nice catch. It seems that I already had the number of threads set to 1, 1, and this was the reason i could not replicate it. @ahukkanen, Webpacker hits us again >:) ... Maybe it would make sense to continue the discussion about the import maps or alternatives. |
The The reason why it hasn't failed "hard" with Ruby 2.x is this: They changed the conflicting This is further explained here: I also found a commit in Shakapacker which fixes this issue (at least judging by the commit message): This fix seems to be similar to what is explained in that webpacker issue linked above. |
@alecslupu @andreslucena I am adding the proposed monkey patch in the related issue at #9203. Once we get that merged, we should be finally able to merge this one. |
I've just reviewed and merged it. |
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 is good to go now after we got that thread safety issue resolved.
Can you also give your review @andreslucena to indicate @alecslupu that this is ready to be merged and we can revert the lines that we need to revert before merging.
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.
I've just give it a last spin locally and it's fine for me 👍🏽
@alecslupu you can revert the lines anytime you can |
@alecslupu Sorry there is still missing specs because of another recently merged PR: #8866. The problem is on this line: Line 9 in d283907
I'll fix it in another PR shortly. |
I was just looking on it ... and fixing from my end... but if you want to merge, to let it become Core, then i am okay with that |
Should be fixed by #9218. |
@alecslupu Can you merge with develop please? Let's see that the CI is green and then we can finally merge this. 🤞 |
@ahukkanen the pipeline is Green :) |
Enormous work here @alecslupu, many thanks to you and everyone involved! And thanks for the great patience with all the related issues and changes. I've just merged with develop and let's see that the generators CI also passes after this. |
🎩 What? Why?
Upgrade Decidim to Ruby 3.0.2