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

warning: loading in progress, circular require considered harmful #129

Open
lloeki opened this issue Aug 1, 2017 · 0 comments
Open

warning: loading in progress, circular require considered harmful #129

lloeki opened this issue Aug 1, 2017 · 0 comments

Comments

@lloeki
Copy link

lloeki commented Aug 1, 2017

When running tests on a project depending on transpec some warnings are raised (see below).

This is because with a recent rake (>=11.0), ruby warnings are now on by default.

What do you think about fixing those warnings as well as running the test suite with ruby -w / $VERBOSE = true / t.warning = true ?

Relevant excerpt:

/Users/lloeki/.gem/ruby/2.3.4/gems/activesupport-5.0.4/lib/active_support/dependencies.rb:293: warning: loading in progress, circular require considered harmful - /Users/lloeki/.gem/ruby/2.3.4/gems/transpec-3.3.0/lib/transpec.rb
    from /Users/lloeki/.gem/ruby/2.3.4/gems/transpec-3.3.0/lib/transpec.rb:3:in  `<top (required)>'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/transpec-3.3.0/lib/transpec/rspec_version.rb:3:in  `<top (required)>'

Full trace:

/Users/lloeki/.gem/ruby/2.3.4/gems/activesupport-5.0.4/lib/active_support/dependencies.rb:293: warning: loading in progress, circular require considered harmful - /Users/lloeki/.gem/ruby/2.3.4/gems/transpec-3.3.0/lib/transpec.rb
    from /Users/lloeki/.gem/ruby/2.3.4/bin/bundle:22:in  `<main>'
    from /Users/lloeki/.gem/ruby/2.3.4/bin/bundle:22:in  `load'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/bundler-1.13.7/exe/bundle:26:in  `<top (required)>'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/bundler-1.13.7/lib/bundler/friendly_errors.rb:100:in  `with_friendly_errors'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/bundler-1.13.7/exe/bundle:34:in  `block in <top (required)>'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/bundler-1.13.7/lib/bundler/cli.rb:11:in  `start'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/base.rb:440:in  `start'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/bundler-1.13.7/lib/bundler/cli.rb:20:in  `dispatch'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor.rb:359:in  `dispatch'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in  `invoke_command'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/bundler-1.13.7/lib/bundler/vendor/thor/lib/thor/command.rb:27:in  `run'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/bundler-1.13.7/lib/bundler/cli.rb:332:in  `exec'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:27:in  `run'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:74:in  `kernel_load'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/bundler-1.13.7/lib/bundler/cli/exec.rb:74:in  `load'
    from /Users/lloeki/.gem/ruby/2.3.4/bin/rake:22:in  `<top (required)>'
    from /Users/lloeki/.gem/ruby/2.3.4/bin/rake:22:in  `load'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/rake-11.3.0/exe/rake:27:in  `<top (required)>'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/rake-11.3.0/lib/rake/application.rb:77:in  `run'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/rake-11.3.0/lib/rake/application.rb:178:in  `standard_exception_handling'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/rake-11.3.0/lib/rake/application.rb:79:in  `block in run'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/rake-11.3.0/lib/rake/application.rb:95:in  `load_rakefile'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/rake-11.3.0/lib/rake/application.rb:178:in  `standard_exception_handling'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/rake-11.3.0/lib/rake/application.rb:96:in  `block in load_rakefile'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/rake-11.3.0/lib/rake/application.rb:686:in  `raw_load_rakefile'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/rake-11.3.0/lib/rake/rake_module.rb:28:in  `load_rakefile'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/rake-11.3.0/lib/rake/rake_module.rb:28:in  `load'
    from /Users/lloeki/Workspace/adhoc/web/cel3/cel3-core/Rakefile:9:in  `<top (required)>'
    from /Users/lloeki/Workspace/adhoc/web/cel3/cel3-core/Rakefile:9:in  `load'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/railties-5.0.4/lib/rails/tasks/engine.rake:72:in  `<top (required)>'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/rake-11.3.0/lib/rake/application.rb:152:in  `invoke_task'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/rake-11.3.0/lib/rake/task.rb:173:in  `invoke'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/rake-11.3.0/lib/rake/task.rb:180:in  `invoke_with_call_chain'
    from /Users/lloeki/.rubies/ruby-2.3.4/lib/ruby/2.3.0/monitor.rb:214:in  `mon_synchronize'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/rake-11.3.0/lib/rake/task.rb:187:in  `block in invoke_with_call_chain'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/rake-11.3.0/lib/rake/task.rb:243:in  `execute'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/rake-11.3.0/lib/rake/task.rb:243:in  `each'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/rake-11.3.0/lib/rake/task.rb:248:in  `block in execute'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/railties-5.0.4/lib/rails/tasks/engine.rake:2:in  `block in <top (required)>'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/rake-11.3.0/lib/rake/dsl_definition.rb:140:in  `namespace'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/rake-11.3.0/lib/rake/task_manager.rb:218:in  `in_namespace'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/railties-5.0.4/lib/rails/tasks/engine.rake:3:in  `block (2 levels) in <top (required)>'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/railties-5.0.4/lib/rails/tasks/engine.rake:3:in  `load'
    from /Users/lloeki/Workspace/adhoc/web/cel3/cel3-core/spec/dummy/Rakefile:5:in  `<top (required)>'
    from /Users/lloeki/Workspace/adhoc/web/cel3/cel3-core/spec/dummy/Rakefile:5:in  `require'
    from /Users/lloeki/Workspace/adhoc/web/cel3/cel3-core/spec/dummy/config/application.rb:11:in  `<top (required)>'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/bundler-1.13.7/lib/bundler.rb:106:in  `require'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in  `require'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/bundler-1.13.7/lib/bundler/runtime.rb:75:in  `each'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:in  `block in require'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/bundler-1.13.7/lib/bundler/runtime.rb:86:in  `each'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/bundler-1.13.7/lib/bundler/runtime.rb:91:in  `block (2 levels) in require'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/bundler-1.13.7/lib/bundler/runtime.rb:91:in  `require'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/transpec-3.3.0/lib/transpec.rb:3:in  `<top (required)>'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/activesupport-5.0.4/lib/active_support/dependencies.rb:293:in  `require'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/activesupport-5.0.4/lib/active_support/dependencies.rb:259:in  `load_dependency'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/activesupport-5.0.4/lib/active_support/dependencies.rb:293:in  `block in require'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/activesupport-5.0.4/lib/active_support/dependencies.rb:293:in  `require'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/transpec-3.3.0/lib/transpec/rspec_version.rb:3:in  `<top (required)>'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/activesupport-5.0.4/lib/active_support/dependencies.rb:293:in  `require'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/activesupport-5.0.4/lib/active_support/dependencies.rb:259:in  `load_dependency'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/activesupport-5.0.4/lib/active_support/dependencies.rb:293:in  `block in require'
    from /Users/lloeki/.gem/ruby/2.3.4/gems/activesupport-5.0.4/lib/active_support/dependencies.rb:293:in  `require'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant