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

Update middleman 4.3.11+patches to 4.4.0 #580

Merged
merged 4 commits into from
Dec 10, 2021

Conversation

tnir
Copy link
Collaborator

@tnir tnir commented Jun 19, 2021

What was the end-user problem that led to this PR?

The problem was nothing. Just that the middleman version was pinned in #552 so we were not able to get dependency updates from dependabot. Some vulnerable dependency was introduced in #552 (but fixed in #562 later).

What was your diagnosis of the problem?

n/a

What is your fix for the problem, implemented in this PR?

My fix is to upgrade activesupport from 5.2 to 6.1 to fully use Ruby 3.0.

Why did you choose this fix out of the possible options?

To simplify dependencies.

Signed-off-by: Takuya Noguchi [email protected]

@tnir
Copy link
Collaborator Author

tnir commented Jun 19, 2021

Build fails on CI as well as on my local. Error log is as follows (from my local):

       error  build/search/lunr-index.json
uninitialized constant Middleman::Sitemap::SearchIndexResource::V8
/workspace/.rvm/ruby-3.0.0/gems/middleman-search-0.10.0/lib/middleman-search/search-index-resource.rb:35:in `build_index'
/workspace/.rvm/ruby-3.0.0/gems/middleman-search-0.10.0/lib/middleman-search/search-index-resource.rb:29:in `render'
/workspace/.rvm/ruby-3.0.0/gems/middleman-core-4.4.0/lib/middleman-core/rack.rb:113:in `process_request'
/workspace/.rvm/ruby-3.0.0/gems/middleman-core-4.4.0/lib/middleman-core/rack.rb:67:in `block in call'
/workspace/.rvm/ruby-3.0.0/gems/middleman-core-4.4.0/lib/middleman-core/rack.rb:66:in `catch'
/workspace/.rvm/ruby-3.0.0/gems/middleman-core-4.4.0/lib/middleman-core/rack.rb:66:in `call'
/workspace/.rvm/ruby-3.0.0/gems/rack-2.2.3/lib/rack/urlmap.rb:74:in `block in call'
/workspace/.rvm/ruby-3.0.0/gems/rack-2.2.3/lib/rack/urlmap.rb:58:in `each'
/workspace/.rvm/ruby-3.0.0/gems/rack-2.2.3/lib/rack/urlmap.rb:58:in `call'
/workspace/.rvm/ruby-3.0.0/gems/rack-2.2.3/lib/rack/head.rb:12:in `call'
/workspace/.rvm/ruby-3.0.0/gems/rack-2.2.3/lib/rack/lint.rb:50:in `_call'
/workspace/.rvm/ruby-3.0.0/gems/rack-2.2.3/lib/rack/lint.rb:38:in `call'
/workspace/.rvm/ruby-3.0.0/gems/rack-2.2.3/lib/rack/builder.rb:244:in `call'
/workspace/.rvm/ruby-3.0.0/gems/rack-2.2.3/lib/rack/mock.rb:84:in `request'
/workspace/.rvm/ruby-3.0.0/gems/rack-2.2.3/lib/rack/mock.rb:57:in `get'
/workspace/.rvm/ruby-3.0.0/gems/middleman-core-4.4.0/lib/middleman-core/builder.rb:232:in `block in output_resource'
/workspace/.rvm/ruby-3.0.0/gems/activesupport-6.1.3.2/lib/active_support/notifications.rb:205:in `instrument'
/workspace/.rvm/ruby-3.0.0/gems/middleman-core-4.4.0/lib/middleman-core/util.rb:21:in `instrument'
/workspace/.rvm/ruby-3.0.0/gems/middleman-core-4.4.0/lib/middleman-core/builder.rb:225:in `output_resource'
/workspace/.rvm/ruby-3.0.0/gems/contracts-0.13.0/lib/contracts/method_reference.rb:43:in `send_to'
/workspace/.rvm/ruby-3.0.0/gems/contracts-0.13.0/lib/contracts/call_with.rb:76:in `call_with'
/workspace/.rvm/ruby-3.0.0/gems/contracts-0.13.0/lib/contracts/method_handler.rb:138:in `block in redefine_method'
/workspace/.rvm/ruby-3.0.0/gems/parallel-1.20.1/lib/parallel.rb:507:in `call_with_index'
/workspace/.rvm/ruby-3.0.0/gems/parallel-1.20.1/lib/parallel.rb:477:in `process_incoming_jobs'
/workspace/.rvm/ruby-3.0.0/gems/parallel-1.20.1/lib/parallel.rb:459:in `block in worker'
/workspace/.rvm/ruby-3.0.0/gems/parallel-1.20.1/lib/parallel.rb:450:in `fork'
/workspace/.rvm/ruby-3.0.0/gems/parallel-1.20.1/lib/parallel.rb:450:in `worker'
/workspace/.rvm/ruby-3.0.0/gems/parallel-1.20.1/lib/parallel.rb:441:in `block in create_workers'
/workspace/.rvm/ruby-3.0.0/gems/parallel-1.20.1/lib/parallel.rb:440:in `each'
/workspace/.rvm/ruby-3.0.0/gems/parallel-1.20.1/lib/parallel.rb:440:in `each_with_index'
/workspace/.rvm/ruby-3.0.0/gems/parallel-1.20.1/lib/parallel.rb:440:in `create_workers'
/workspace/.rvm/ruby-3.0.0/gems/parallel-1.20.1/lib/parallel.rb:380:in `work_in_processes'
/workspace/.rvm/ruby-3.0.0/gems/parallel-1.20.1/lib/parallel.rb:283:in `map'
/workspace/.rvm/ruby-3.0.0/gems/middleman-core-4.4.0/lib/middleman-core/builder.rb:137:in `output_resources'
/workspace/.rvm/ruby-3.0.0/gems/contracts-0.13.0/lib/contracts/method_reference.rb:43:in `send_to'
/workspace/.rvm/ruby-3.0.0/gems/contracts-0.13.0/lib/contracts/call_with.rb:76:in `call_with'
/workspace/.rvm/ruby-3.0.0/gems/contracts-0.13.0/lib/contracts/method_handler.rb:138:in `block in redefine_method'
/workspace/.rvm/ruby-3.0.0/gems/middleman-core-4.4.0/lib/middleman-core/builder.rb:131:in `output_files'
/workspace/.rvm/ruby-3.0.0/gems/contracts-0.13.0/lib/contracts/method_reference.rb:43:in `send_to'
/workspace/.rvm/ruby-3.0.0/gems/contracts-0.13.0/lib/contracts/call_with.rb:76:in `call_with'
/workspace/.rvm/ruby-3.0.0/gems/contracts-0.13.0/lib/contracts/method_handler.rb:138:in `block in redefine_method'
/workspace/.rvm/ruby-3.0.0/gems/middleman-core-4.4.0/lib/middleman-core/builder.rb:71:in `block in run!'
/workspace/.rvm/ruby-3.0.0/gems/activesupport-6.1.3.2/lib/active_support/notifications.rb:205:in `instrument'
/workspace/.rvm/ruby-3.0.0/gems/middleman-core-4.4.0/lib/middleman-core/util.rb:21:in `instrument'
/workspace/.rvm/ruby-3.0.0/gems/middleman-core-4.4.0/lib/middleman-core/builder.rb:70:in `run!'
/workspace/.rvm/ruby-3.0.0/gems/contracts-0.13.0/lib/contracts/method_reference.rb:43:in `send_to'
/workspace/.rvm/ruby-3.0.0/gems/contracts-0.13.0/lib/contracts/call_with.rb:76:in `call_with'
/workspace/.rvm/ruby-3.0.0/gems/contracts-0.13.0/lib/contracts/method_handler.rb:138:in `block in redefine_method'
/workspace/.rvm/ruby-3.0.0/gems/middleman-cli-4.4.0/lib/middleman-cli/build.rb:84:in `block in build'
/workspace/.rvm/ruby-3.0.0/gems/activesupport-6.1.3.2/lib/active_support/notifications.rb:205:in `instrument'
/workspace/.rvm/ruby-3.0.0/gems/middleman-core-4.4.0/lib/middleman-core/util.rb:21:in `instrument'
/workspace/.rvm/ruby-3.0.0/gems/middleman-cli-4.4.0/lib/middleman-cli/build.rb:83:in `build'
/workspace/.rvm/ruby-3.0.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
/workspace/.rvm/ruby-3.0.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
/workspace/.rvm/ruby-3.0.0/gems/thor-1.1.0/lib/thor/invocation.rb:134:in `block in invoke_all'
/workspace/.rvm/ruby-3.0.0/gems/thor-1.1.0/lib/thor/invocation.rb:134:in `each'
/workspace/.rvm/ruby-3.0.0/gems/thor-1.1.0/lib/thor/invocation.rb:134:in `map'
/workspace/.rvm/ruby-3.0.0/gems/thor-1.1.0/lib/thor/invocation.rb:134:in `invoke_all'
/workspace/.rvm/ruby-3.0.0/gems/thor-1.1.0/lib/thor/group.rb:232:in `dispatch'
/workspace/.rvm/ruby-3.0.0/gems/thor-1.1.0/lib/thor/invocation.rb:116:in `invoke'
/workspace/.rvm/ruby-3.0.0/gems/thor-1.1.0/lib/thor.rb:40:in `block in register'
/workspace/.rvm/ruby-3.0.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
/workspace/.rvm/ruby-3.0.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
/workspace/.rvm/ruby-3.0.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
/workspace/.rvm/ruby-3.0.0/gems/thor-1.1.0/lib/thor/base.rb:485:in `start'
/workspace/.rvm/ruby-3.0.0/gems/middleman-cli-4.4.0/bin/middleman:70:in `<top (required)>'
/workspace/.rvm/ruby-3.0.0/bin/middleman:23:in `load'
/workspace/.rvm/ruby-3.0.0/bin/middleman:23:in `<main>'
/workspace/.rvm/ruby-3.0.0/bin/ruby_executable_hooks:22:in `eval'
/workspace/.rvm/ruby-3.0.0/bin/ruby_executable_hooks:22:in `<main>'

@olleolleolle
Copy link
Member

I found this PR to the plugin which fails to install V8 on 3.0. V8 comes with therubyracer on earlier versions of Ruby.

middleman-search has this not-merged PR, which uses mini_racer instead, which maybe is installable on Ruby 3.0.

We could attempt to use this from a branch:

§gem "middleman-search", github: "workarea-commerce/middleman-search"`

@deivid-rodriguez deivid-rodriguez force-pushed the middleman-4.4.0 branch 2 times, most recently from bfac615 to 06e5e34 Compare December 9, 2021 05:37
@deivid-rodriguez deivid-rodriguez temporarily deployed to bundler-site-middleman--g4evrj December 9, 2021 06:12 Inactive
@deivid-rodriguez
Copy link
Member

I followed @olleolleolle's idea and everything seems to be working fine. I had to make one further update to the middleman-search fork, so I will create yet another PR there and try to get some movement. In the meantime, I think this can be merged!

@deivid-rodriguez deivid-rodriguez merged commit 0e61c6d into rubygems:master Dec 10, 2021
@deivid-rodriguez
Copy link
Member

I created a PR upstream, not superhopeful but we'll never know if we don't try it.

@tnir tnir deleted the middleman-4.4.0 branch March 2, 2022 22:40
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

Successfully merging this pull request may close these issues.

3 participants