Skip to content

Commit

Permalink
fix state machines name collision, add base relation types to railtie…
Browse files Browse the repository at this point in the history
…, restrict tapioca version
  • Loading branch information
stathis-alexander committed Nov 30, 2024
1 parent 1f4f243 commit 961b868
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
PATH
remote: .
specs:
boba (0.0.11)
boba (0.0.12)
sorbet-static-and-runtime (~> 0.5)
tapioca (~> 0.16.4)
tapioca (<= 0.16.5)

GEM
remote: https://rubygems.org/
Expand Down
6 changes: 6 additions & 0 deletions History.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Boba History

## 0.0.12

- Rename `StateMachines` compiler back to `StateMachinesExtended` to avoid load order nonsense with Tapioca.
- Add all base relation types used to the AR railtie so they're all defined at runtime.
- Make Tapioca version more conservative, since we're overriding compiler internals and incremental bumps could break them.

## 0.0.11

- Dupe Tapioca `StateMachines` compiler and fix bug with abstract classes and preloading instance methods.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Boba

> :warning: This gem is in pre-release and is not ready for use.
> :warning: This software is currently under active development. It should not be considered stable until 1.0.0.
Boba is a collection of compilers for Sorbet & Tapioca.

Expand Down
2 changes: 1 addition & 1 deletion boba.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ Gem::Specification.new do |spec|
spec.required_ruby_version = ">= 3.0.0"

spec.add_dependency("sorbet-static-and-runtime", "~> 0.5")
spec.add_dependency("tapioca", "~> 0.16.4")
spec.add_dependency("tapioca", "<=0.16.5")
end
2 changes: 2 additions & 0 deletions lib/boba/relations_railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ def inherited(child)
super(child)

child.const_set("PrivateRelation", Object)
child.const_set("PrivateAssociationRelation", Object)
child.const_set("PrivateCollectionProxy", Object)
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/boba/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
# frozen_string_literal: true

module Boba
VERSION = "0.0.11"
VERSION = "0.0.12"
end
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ module Compilers
# end
# end
# ~~~
class StateMachines < Compiler
class StateMachinesExtended < Compiler
extend T::Sig

ACTIVE_RECORD_RELATION_MODULE_NAMES = [
Expand Down

0 comments on commit 961b868

Please sign in to comment.