User-defined routes missing from generated path/URL helper RBI files after upgrading to Rails 8
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
Research direction
Start with config/routes.rb and the DSL generation command shown in the generated RBI headers: bin/tapioca dsl GeneratedPathHelpersModule and GeneratedUrlHelpersModule. Compare the custom routes with the contents of sorbet/rbi/dsl/generated_path_helpers_module.rbi and sorbet/rbi/dsl/generated_url_helpers_module.rbi after generation. Done means user-defined path and URL helpers appear in both generated files on Rails 8.
Written by the indexing model from the issue text.
Description
We’ve recently upgraded our application to Rails 8. After the upgrade, we noticed that our user-defined routes are no longer present in the RBI files generated by Tapioca for path and URL helpers.
Specifically, the following files appear to be affected:
- sorbet/rbi/dsl/generated_path_helpers_module.rbi
- sorbet/rbi/dsl/generated_url_helpers_module.rbi
It seems that only routes defined by Rails itself are still present in these files, while all our custom routes defined in config/routes.rb are missing. This was working correctly before the Rails 8 upgrade.
Rails version: 8.0.2
Tapioca version: 0.17.1
Ruby version: 3.4.3
sorbet/rbi/dsl/generated_path_helpers_module.rbi
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for dynamic methods in `GeneratedPathHelpersModule`.
# Please instead update this file by running `bin/tapioca dsl GeneratedPathHelpersModule`.
module GeneratedPathHelpersModule
include ::ActionDispatch::Routing::UrlFor
include ::ActionDispatch::Routing::PolymorphicRoutes
sig { params(args: T.untyped).returns(String) }
def rails_blob_path(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_blob_representation_path(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_blob_representation_proxy_path(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_direct_uploads_path(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_disk_service_path(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_info_notes_path(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_info_path(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_info_properties_path(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_info_routes_path(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_mailers_path(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_representation_path(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_service_blob_path(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_service_blob_proxy_path(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_storage_proxy_path(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_storage_redirect_path(*args); end
sig { params(args: T.untyped).returns(String) }
def update_rails_disk_service_path(*args); end
end
sorbet/rbi/dsl/generated_url_helpers_module.rbi
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for dynamic methods in `GeneratedUrlHelpersModule`.
# Please instead update this file by running `bin/tapioca dsl GeneratedUrlHelpersModule`.
module GeneratedUrlHelpersModule
include ::ActionDispatch::Routing::UrlFor
include ::ActionDispatch::Routing::PolymorphicRoutes
sig { params(args: T.untyped).returns(String) }
def rails_blob_representation_proxy_url(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_blob_representation_url(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_blob_url(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_direct_uploads_url(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_disk_service_url(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_info_notes_url(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_info_properties_url(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_info_routes_url(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_info_url(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_mailers_url(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_representation_url(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_service_blob_proxy_url(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_service_blob_url(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_storage_proxy_url(*args); end
sig { params(args: T.untyped).returns(String) }
def rails_storage_redirect_url(*args); end
sig { params(args: T.untyped).returns(String) }
def update_rails_disk_service_url(*args); end
end
- 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 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bensheldon/good_job#1816 · 5 comments ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
notch8/utk_knapsack#148 ·