-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Got FrozenError after dry-core upgrade to 0.9.1 #55
Comments
I'm seeing the same issue, as well. Using dry-validation initialization error:
dry-* dependency differences between working and not working application upgrade is:
I'm guessing that there's some load order or requirement weirdness with the recent zeitwerk changes across the libraries which introduced this issue to dry-rails. |
Please upgrade to dry-rails 0.6.0 where it should work |
@solnic Thank you! 👏. Attempting an upgrade now and I'll post back, shortly. |
@solnic thanks 👏 My project is working correctly again. |
Well, I got a different error now. 😀 I'll look into that and see if it's on my side or in the upgrade/dependency chain... either way, this NameError issue certainly seems to be corrected. Thank you again!
|
@nbibler oh :/ which version of dry-system did you have before? We've been making some Hanami-related tweaks in dry-system lately as a preparation for dry-system 1.0.0 and you're probably affected. I should be able to help resolve this though. |
@solnic : I think the only changes were dry-validation (1.8.1 -> 1.9.0), dry-schema (1.10.6 -> 1.11.2), and the dry-rails bump (0.5.0 -> 0.6.0): diff --git a/Gemfile b/Gemfile
index 92e718ad9..ef7bc316b 100644
--- a/Gemfile
+++ b/Gemfile
@@ -27,7 +27,7 @@ gem 'doorkeeper-jwt', '~> 0.4.0'
gem 'dotenv-rails', '~> 2.0'
gem 'dry-matcher', '~> 0.9.0'
gem 'dry-monads', '~> 1.0'
-gem 'dry-rails', '~> 0.5.0'
+gem 'dry-rails', '~> 0.6.0'
gem 'dry-struct', '~> 1.2'
gem 'dry-transaction', '~> 0.13.0'
gem 'dry-transformer', '~> 0.1'
diff --git a/Gemfile.lock b/Gemfile.lock
index 6a3207aa5..c5f0fb21a 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -223,17 +223,18 @@ GEM
concurrent-ruby (~> 1.0)
dry-core (~> 0.9, >= 0.9)
zeitwerk (~> 2.6)
- dry-rails (0.5.0)
- dry-schema (~> 1.7)
- dry-system (~> 0.23, >= 0.23)
- dry-validation (~> 1.5)
- dry-schema (1.10.6)
+ dry-rails (0.6.0)
+ dry-schema (~> 1.11, >= 1.11.2)
+ dry-system (~> 0.27, >= 0.27.2)
+ dry-validation (~> 1.9, >= 1.9.0)
+ dry-schema (1.11.2)
concurrent-ruby (~> 1.0)
- dry-configurable (~> 0.13, >= 0.13.0)
- dry-core (~> 0.5, >= 0.5)
+ dry-configurable (~> 0.16, >= 0.16)
+ dry-core (~> 0.9, >= 0.9)
dry-initializer (~> 3.0)
- dry-logic (~> 1.2)
- dry-types (~> 1.5)
+ dry-logic (~> 1.3)
+ dry-types (~> 1.6)
+ zeitwerk (~> 2.6)
dry-struct (1.5.2)
dry-core (~> 0.9, >= 0.9)
dry-types (~> 1.6)
@@ -259,12 +260,13 @@ GEM
dry-inflector (~> 0.1, >= 0.1.2)
dry-logic (~> 1.3, >= 1.3)
zeitwerk (~> 2.6)
- dry-validation (1.8.1)
+ dry-validation (1.9.0)
concurrent-ruby (~> 1.0)
dry-container (~> 0.7, >= 0.7.1)
- dry-core (~> 0.5, >= 0.5)
+ dry-core (~> 0.9, >= 0.9)
dry-initializer (~> 3.0)
- dry-schema (~> 1.8, >= 1.8.0)
+ dry-schema (~> 1.11, >= 1.11.0)
+ zeitwerk (~> 2.6)
equivalent-xml (0.6.0)
nokogiri (>= 1.4.3)
erubi (1.11.0)
@@ -727,7 +729,7 @@ DEPENDENCIES
dotenv-rails (~> 2.0)
dry-matcher (~> 0.9.0)
dry-monads (~> 1.0)
- dry-rails (~> 0.5.0)
+ dry-rails (~> 0.6.0)
dry-struct (~> 1.2)
dry-transaction (~> 0.13.0)
dry-transformer (~> 0.1) |
@nbibler hmmm does it work when you add |
@solnic: Yep! That seems to fix it. 😄 Thanks again! 👏 |
@nbibler 😅 good, sorry for the trouble. I think we should make it lazy-loadable in dry-system. I reported an issue about it: dry-rb/dry-system#252 |
No problem at all! Thanks for the rapid responses and help! |
Describe the bug
The
ActiveSupport::Dependencies.autoload_paths
is frozen but still some autoload paths is attached.debug gem trace
To Reproduce
Reference this file to remove
dry-core
version pin and update it to reproducehttps://github.com/BasalticStudio/new-era/blob/e52e10fae29dda85d0c635a4da6421ba176c78cd/Gemfile
Updated - 1
ruby debug gem with:
When
#freeze
is called, the Rails seems to continue running the initializer again.Updated - 2
It is caused by
dry-validation ~> 1.9.0
cannot correct load the moduleIf downgraded to
1.8.1
other dry gem have same issue.Expected behavior
The initializer should not be called after the freeze.
My environment
3.0.4
or3.1.2
are breaksThe text was updated successfully, but these errors were encountered: