Skip to content
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

multiple circular requires cause very lengthy warnings #571

Closed
indirect opened this issue Jun 13, 2014 · 4 comments
Closed

multiple circular requires cause very lengthy warnings #571

indirect opened this issue Jun 13, 2014 · 4 comments

Comments

@indirect
Copy link

active_model/serializer.rb requires active_model/array_serializer.rb on line 1, which requires active_model/serializer on line 3.

active_model/serializer.rb requires active_model/serializer/associations.rb on line 3, which requires active_model/serializer on line 2.

😰

./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247: warning: loading in progress, circular require considered harmful - ./.bundle/ruby/2.1.0/bundler/gems/active_model_serializers-2e31a141252a/lib/active_model/serializer.rb
    from bin/rspec:20:in  `<main>'
    from bin/rspec:20:in  `load'
    from ./.bundle/ruby/2.1.0/gems/rspec-core-3.0.1/exe/rspec:4:in  `<top (required)>'
    from ./.bundle/ruby/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/runner.rb:38:in  `invoke'
    from ./.bundle/ruby/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/runner.rb:70:in  `run'
    from ./.bundle/ruby/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/runner.rb:85:in  `run'
    from ./.bundle/ruby/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/runner.rb:97:in  `setup'
    from ./.bundle/ruby/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/configuration.rb:1051:in  `load_spec_files'
    from ./.bundle/ruby/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/configuration.rb:1051:in  `each'
    from ./.bundle/ruby/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/configuration.rb:1051:in  `block in load_spec_files'
    from ./.bundle/ruby/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/configuration.rb:1051:in  `load'
    from ./spec/controllers/conversations_controller_spec.rb:1:in  `<top (required)>'
    from ./spec/controllers/conversations_controller_spec.rb:1:in  `require'
    from ./spec/rails_helper.rb:2:in  `<top (required)>'
    from ./spec/rails_helper.rb:2:in  `require_relative'
    from ./config/environment.rb:2:in  `<top (required)>'
    from ./config/environment.rb:2:in  `require'
    from ./config/application.rb:7:in  `<top (required)>'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in  `require'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:232:in  `load_dependency'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in  `block in require'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in  `require'
    from ./.bundle/ruby/2.1.0/bundler/gems/active_model_serializers-2e31a141252a/lib/active_model_serializers.rb:2:in  `<top (required)>'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in  `require'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:232:in  `load_dependency'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in  `block in require'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in  `require'
    from ./.bundle/ruby/2.1.0/bundler/gems/active_model_serializers-2e31a141252a/lib/active_model/serializer.rb:1:in  `<top (required)>'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in  `require'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:232:in  `load_dependency'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in  `block in require'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in  `require'
    from ./.bundle/ruby/2.1.0/bundler/gems/active_model_serializers-2e31a141252a/lib/active_model/array_serializer.rb:3:in  `<top (required)>'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in  `require'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:232:in  `load_dependency'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in  `block in require'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in  `require'

./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247: warning: loading in progress, circular require considered harmful - ./.bundle/ruby/2.1.0/bundler/gems/active_model_serializers-2e31a141252a/lib/active_model/serializer.rb
    from bin/rspec:20:in  `<main>'
    from bin/rspec:20:in  `load'
    from ./.bundle/ruby/2.1.0/gems/rspec-core-3.0.1/exe/rspec:4:in  `<top (required)>'
    from ./.bundle/ruby/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/runner.rb:38:in  `invoke'
    from ./.bundle/ruby/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/runner.rb:70:in  `run'
    from ./.bundle/ruby/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/runner.rb:85:in  `run'
    from ./.bundle/ruby/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/runner.rb:97:in  `setup'
    from ./.bundle/ruby/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/configuration.rb:1051:in  `load_spec_files'
    from ./.bundle/ruby/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/configuration.rb:1051:in  `each'
    from ./.bundle/ruby/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/configuration.rb:1051:in  `block in load_spec_files'
    from ./.bundle/ruby/2.1.0/gems/rspec-core-3.0.1/lib/rspec/core/configuration.rb:1051:in  `load'
    from ./spec/controllers/conversations_controller_spec.rb:1:in  `<top (required)>'
    from ./spec/controllers/conversations_controller_spec.rb:1:in  `require'
    from ./spec/rails_helper.rb:2:in  `<top (required)>'
    from ./spec/rails_helper.rb:2:in  `require_relative'
    from ./config/environment.rb:2:in  `<top (required)>'
    from ./config/environment.rb:2:in  `require'
    from ./config/application.rb:7:in  `<top (required)>'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in  `require'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:232:in  `load_dependency'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in  `block in require'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in  `require'
    from ./.bundle/ruby/2.1.0/bundler/gems/active_model_serializers-2e31a141252a/lib/active_model_serializers.rb:2:in  `<top (required)>'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in  `require'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:232:in  `load_dependency'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in  `block in require'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in  `require'
    from ./.bundle/ruby/2.1.0/bundler/gems/active_model_serializers-2e31a141252a/lib/active_model/serializer.rb:3:in  `<top (required)>'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in  `require'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:232:in  `load_dependency'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in  `block in require'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in  `require'
    from ./.bundle/ruby/2.1.0/bundler/gems/active_model_serializers-2e31a141252a/lib/active_model/serializer/associations.rb:2:in  `<top (required)>'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in  `require'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:232:in  `load_dependency'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in  `block in require'
    from ./.bundle/ruby/2.1.0/gems/activesupport-4.1.2.rc1/lib/active_support/dependencies.rb:247:in  `require'
@steveklabnik
Copy link
Contributor

Yes, this is a bug, and is bad. 😢

@bf4
Copy link
Member

bf4 commented Aug 24, 2015

Fixed in 0.10.x in #1067

@bf4
Copy link
Member

bf4 commented Aug 31, 2015

Also related to - Fix circular load warning as described in cf6a074
in #1017

@NullVoxPopuli
Copy link
Contributor

this looks like it's fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants