dragonfly
dragonfly copied to clipboard
warning: loading in progress, circular require considered harmful
gem 'dragonfly-s3_data_store'
$ grep dragonfly Gemfile
gem 'dragonfly-s3_data_store'
$ grep dragonfly Gemfile.lock
dragonfly (1.1.4)
dragonfly-s3_data_store (1.3.0)
dragonfly (~> 1.0)
dragonfly-s3_data_store
$ ruby -w -e 'require "dragonfly"'
/path/to/rubygems/core_ext/kernel_require.rb: warning: loading in progress, circular require considered harmful - /path/to/gems/dragonfly-1.1.4/lib/dragonfly.rb
Is this tied to dragonfly
, this particular version, or some other dependency chain in the configuration? It would be helpful if others could comment as to its reproducibility.
Reproducible when having only dragonfly
(ruby -w thisscript.rb
).
require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'dragonfly', '1.3.0', require: false
end
require 'dragonfly'
This was introduced in dragonfly 1.0, reproducible in versions >= 1.0, not reproducible in <= 0.9.15.
For example, dragonfly.rb
requires dragonfly/middleware
:
https://github.com/markevans/dragonfly/blob/82254ecc81250ac03b5cff070c074990e5774b75/lib/dragonfly.rb#L12
And dragonfly/middleware.rb
requires dragonfly
again:
https://github.com/markevans/dragonfly/blob/82254ecc81250ac03b5cff070c074990e5774b75/lib/dragonfly/middleware.rb#L1
This happens for:
-
dragonfly
->dragonfly/app
->dragonfly/shell
-
dragonfly
->dragonfly/model
->dragonfly/model/class_methods
-
dragonfly
->dragonfly/middleware