GeneratedAttributeMethods is inconsistently included in the RBI files
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start by reproducing tapioca dsl and tapioca dsl --verify with the reported MyModel example on an M1 Mac and Ubuntu 24.04 x86 GitHub Actions runner. Investigate why GeneratedAttributeMethods is included only in the CI-generated RBI files; done means generation is consistent across both environments.
Written by the indexing model from the issue text.
Description
I’m running into a weird issue. We run tapioca dsl --verify on CI and recently it started to detect uncommitted changes and indeed when running tapioca dsl on the CI it does generate differently than it does on local. To give you an example, the model
class MyModel < ApplicationRecord
self.primary_key = :id
self.table_name = "my_table"
end
will generate the following rbi file on local (M1 machine)
class MyModel
extend CommonRelationMethods
extend GeneratedRelationMethods
and on CI, which runs on x86 linux I get
class MyModel
+ include GeneratedAttributeMethods
extend CommonRelationMethods
extend GeneratedRelationMethods
Happens for multiple models that were not even modified recently. Tested both on tapioca (0.13.3) and the newest tapioca (0.15.1). We don’t have any compiler options.
CI is Github actions with ubuntu-latest is Ubuntu 24.04 TLS x86 architecture and on local I'm running on an M1 Macbook Air.
Besides the architecture, there is no difference between the two setups, environment variables and Tapioca config file is the same. Any ideas would be appreciated. Thanks!
- Dominant language
- Ruby
- Stars
- 873
- Forks
- 164
- Avg merge
- 4d 27m
- Merged PRs (30d)
- 9
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Shopify/tapioca
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
bug
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 58/100
Similar issues
-
user-reported
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Kong/developer.konghq.com#7316 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
TheOdinProject/curriculum#31408 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
notch8/utk_knapsack#148 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Homebrew/homebrew-cask#288729 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100