Shopify / lighthouse-ci-action

MIT License
100 stars 50 forks source link

Update action to Shopify CLI 3, lhci 0.13 and ruby 3.2 #77

Closed jamesmengo closed 8 months ago

jamesmengo commented 8 months ago

Bump installed Ruby Version to 3.2.0 to satisfy Nokigiri dependancy (more context in issue) Ruby Maintenance Branches

Why did this happen?

Nokogiri is included as a dependancy via shopify-theme-check, so this started to break since the latest release ended support for Ruby 2.7

We could consider freezing the version in the gemspec for theme_check, but that would come with the tradeoff of not receiving future updates

Why Version 3.2.0?

Validating this change

image

More notes

octipus commented 8 months ago

@jamesmengo was 3.1.4 not working then? I have tried it on a fork here but couldn't get it working. Haven't tried 3.2.0 though

octipus commented 8 months ago

Nokogiri seems to be a dependency of shopify-cli 2x, not theme-check. I believe that bumping the ruby env on the lighthouse repo is not actually getting it fixed. I have tried it myself as well.

I believe the issue is here, where shopify-cli uses Nokogiri 1.13 whereas we need 1.15 or above. So basically the Shopify-cli needs to bump nokogiri dependency version.

Hope this helps

jamesmengo commented 8 months ago

Nokogiri seems to be a dependency of shopify-cli 2x, not theme-check. I believe that bumping the ruby env on the lighthouse repo is not actually getting it fixed. I have tried it myself as well.

I believe the issue is here, where shopify-cli uses Nokogiri 1.13 whereas we need 1.15 or above. So basically the Shopify-cli needs to bump nokogiri dependency version.

Hope this helps

You're correct that Nokogiri is a dependancy of shopify-cli, but from my understanding the version causing an issue isn't coming from there, it's coming from theme-check which doesn't specify the version, which is what led to this breaking.

    nokogiri (1.14.2)
    theme-check (1.15.0)
      liquid (>= 5.4.0)
      nokogiri (>= 1.12)
      parser (~> 3)

https://github.com/Shopify/cli/blob/86c15f8f5da2ff99e9f710980dc9a2bd6d55f8c2/packages/cli-kit/assets/cli-ruby/Gemfile.lock#L114-L117