Repository navigation
Update the dependencies and move to Sorbet 0.6 - #56
Merged
Merged
Conversation
A wide bundle update, which takes crass to 1.0.8 for GHSA-pq4g-8rxf-4g29. CI's Rails matrix moves to 7.2.4, 8.0.5.2 and 8.1.4.1, and ruby/setup-ruby to v1.335.0. Rails 8.0.5.2 and 8.1.4.1 have four-part versions, so the docs test that reads the matrix accepts them. LogStruct::SemanticLogger::Logger's signature now uses T::Module, which sorbet-runtime first has in 0.6.12698, so the gemspec requires that version.
Generated by Tapioca, apart from the small changes it needed: - Tapioca 0.20 no longer loads minitest/mock unless it's required. - Zeitwerk is no longer excluded, because the code that uses it needs its types. - BroadcastLogger#tagged is delegated through method_missing, so it's declared in the overrides.
Sorbet now reports error 5051 when a T::Struct prop implements an abstract method without override: true. A prop marked override needs the method to exist already, so the generated structs include their interfaces above their props. Custom log structs need the same change, as the changelog and the docs example now say.
Mostly autocorrections: redundant T.let on constants, grep(Regexp), a void setter signature and blank lines after includes. Sorbet/BlockMethodDefinition is excluded for tests, which build doubles with Class.new, and disabled on Ahoy's prepended track method: define_method can't use implicit super, and its autocorrect breaks both.
Minor and patch updates. Jest 30 still asks for glob 10 and its minimatch, which have open advisories, so overrides move both to patched versions. deepmerge (GHSA-gcqx-w48m-w2h4) has no patched version. Only jest-config uses it, in development, on Jest's own config, so the audit ignores it. CSpell skips the reference and terraform-provider-logstruct checkouts, which aren't part of this repository.
jscpd 4.3.0 detects a file's format from its shebang, so it now scans Bundler's binstubs in bin/, which are alike by design. It also doesn't read docs/.gitignore, so YARD's output under docs/public needs listing too. The check only ran in GitHub's Lint job, so task ci passed without it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the gems, the docs and tooling packages and CI's Rails versions up to date, and clears the audits. It replaces Dependabot's #37, #41, #52, #53, #54 and #55.
Most of the 222 changed files are generated: RBIs, log structs and lockfiles. The hand-written changes come to 56 files, +174/-139, and the commits keep them apart from the generated ones, so reading it commit by commit is easiest.
What changes for people using the gem
sorbet-runtime0.6.12698 or later is now required (it was>= 0.5).LogStruct::SemanticLogger::Logger's signature usesT::Module, which first appears in that version.override: trueon theirlevel,timestampandadditional_dataprops, with the interfaces included above them. The changelog says so, and the docs example is updated.Gemfile.lockonly affects this repository's development and tests, so the gem's other dependencies don't change.Sorbet 0.6
Sorbet moves from 0.5.11888 to 0.6.13635, and Tapioca from 0.16 to 0.20.
T::Structprop implements an abstract method withoutoverride: true. The change is in the generator's template,tools/codegen/templates/sorbet/_event_class_body.rb.erb, and the structs inlib/log_struct/log/are regenerated. A prop markedoverrideneeds the method to exist already, so the interfaceincludes move above the props.minitest/mockunless it's required, sosorbet/tapioca/require.rbrequires it.BroadcastLogger#taggedis declared in the overrides because it's delegated throughmethod_missing.Advisories
crass1.0.8 patches GHSA-pq4g-8rxf-4g29.glob10 and itsminimatch, which have open advisories, so pnpm overrides move both to patched versions, inpackage.jsonanddocs/pnpm-workspace.yaml.deepmerge(GHSA-gcqx-w48m-w2h4) has no patched version. Onlyjest-configuses it, in development, on Jest's own config, sodocs/pnpm-workspace.yamltells the audit to ignore it. Its Dependabot alert stays open until a patch exists or someone dismisses it.RuboCop
RuboCop moves from 1.71 to 1.91 and rubocop-sorbet from 0.8 to 0.17, and the config moves to
plugins:. Most of thelib/andtest/diff is autocorrection: redundantT.lets on constants,grep(Regexp), avoidsignature onMultiErrorReporter.reporter=, and blank lines afterincludes.Four suppressions are worth a look:
Sorbet/BlockMethodDefinitionis excluded fortest/**. Tests build doubles withClass.new, which need real method definitions:define_methodcan't use implicitsuper, and the cop's autocorrect doesn't produce code that parses for all of them.trackmethod, which calls implicitsuper.Sorbet/ConstantsFromStringsis disabled in the GoodJob integration.GoodJob::Notifier::CONNECTION_ERRORSholds class names, because an app might not have loaded the database adapter they belong to.Lint/InterpolationCheckis disabled in the boot logs integration test. That string is a script forrails runner, which does the interpolation.jscpd
jscpd 4.3.0 detects a file's format from its shebang, so it now scans Bundler's binstubs in
bin/, which are alike by design. It also doesn't readdocs/.gitignore, so it scans YARD's output underdocs/public/yardlocally..jscpd.jsonnow lists both.The check only ran in GitHub's Lint job, so
task ciruns it too now.Rails matrix
CI now tests Rails 7.1.6, 7.2.4, 8.0.5.2 and 8.1.4.1. Two of those have four-part versions, so the docs test that reads the matrix accepts them.
Left out
These major versions aren't included: sentry-ruby 7 (#39), honeybadger 6 (#40), simplecov 1 (#38), TypeScript 6 (#33, which also needs a
baseUrlmigration), lucide-react 1 (#47), jscpd 5 (#31), sidekiq 8, minitest 6, dalli 5 and json 3.bigdecimal 4 and openssl 4 did come in with the bundle update, as development dependencies only.
Testing
task cipasses locally on Ruby 3.4.5, on these commits: Sorbet, Tapioca's check, RuboCop, jscpd, CSpell, Prettier, both audits, Jest (184 tests), 530 unit tests and 78 Rails integration tests on Rails 7.1.6. The other Ruby and Rails combinations run on this PR's CI.