Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Circular dependency when running `warble config` on a project that has Warbler::Task.new in its Rakefile #137

Open
gregkare opened this Issue · 2 comments

2 participants

@gregkare

I realize create a config file after adding the Rake task probably isn't very common, but it just happens to be what I've done the first time I've used Warbler.

Here's how to reproduce the issue (I'm using Warbler 1.3.6):

$ (
cat <<'EOF'
require 'rake'
require 'warbler'
Warbler::Task.new
EOF
) > Rakefile
$ mkdir config; touch config/environment.rb

And the stack trace:

warble aborted!
stack level too deep
org/jruby/RubyArray.java:1613:in `each'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:56:in `load_project_rakefile'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler.rb:25:in `project_application'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits/rails.rb:27:in `before_configure'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits.rb:28:in `before_configure'
org/jruby/RubyArray.java:1613:in `each'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits.rb:28:in `before_configure'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/config.rb:176:in `initialize'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/task.rb:48:in `initialize'
/Users/user/code/warbler/spec/sample_rake_bug/rakefile:3:in `(root)'
org/jruby/RubyKernel.java:1046:in `load'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:1:in `(root)'
org/jruby/RubyArray.java:1613:in `each'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:58:in `load_project_rakefile'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:56:in `load_project_rakefile'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler.rb:25:in `project_application'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits/rails.rb:27:in `before_configure'
org/jruby/RubyArray.java:1613:in `each'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits.rb:28:in `before_configure'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits.rb:28:in `before_configure'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/config.rb:176:in `initialize'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/task.rb:48:in `initialize'
org/jruby/RubyKernel.java:1046:in `load'
/Users/user/code/warbler/spec/sample_rake_bug/rakefile:3:in `(root)'
org/jruby/RubyArray.java:1613:in `each'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:1:in `(root)'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:58:in `load_project_rakefile'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:56:in `load_project_rakefile'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler.rb:25:in `project_application'
org/jruby/RubyArray.java:1613:in `each'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits/rails.rb:27:in `before_configure'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits.rb:28:in `before_configure'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits.rb:28:in `before_configure'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/config.rb:176:in `initialize'
org/jruby/RubyKernel.java:1046:in `load'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/task.rb:48:in `initialize'
org/jruby/RubyArray.java:1613:in `each'
/Users/user/code/warbler/spec/sample_rake_bug/rakefile:3:in `(root)'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:1:in `(root)'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:58:in `load_project_rakefile'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:56:in `load_project_rakefile'
org/jruby/RubyArray.java:1613:in `each'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler.rb:25:in `project_application'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits/rails.rb:27:in `before_configure'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits.rb:28:in `before_configure'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits.rb:28:in `before_configure'
org/jruby/RubyKernel.java:1046:in `load'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/config.rb:176:in `initialize'
org/jruby/RubyArray.java:1613:in `each'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/task.rb:48:in `initialize'
/Users/user/code/warbler/spec/sample_rake_bug/rakefile:3:in `(root)'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:1:in `(root)'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:58:in `load_project_rakefile'
org/jruby/RubyArray.java:1613:in `each'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:56:in `load_project_rakefile'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler.rb:25:in `project_application'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits/rails.rb:27:in `before_configure'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits.rb:28:in `before_configure'
org/jruby/RubyKernel.java:1046:in `load'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits.rb:28:in `before_configure'
org/jruby/RubyArray.java:1613:in `each'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/config.rb:176:in `initialize'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/task.rb:48:in `initialize'
/Users/user/code/warbler/spec/sample_rake_bug/rakefile:3:in `(root)'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:1:in `(root)'
org/jruby/RubyArray.java:1613:in `each'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:58:in `load_project_rakefile'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:56:in `load_project_rakefile'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler.rb:25:in `project_application'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits/rails.rb:27:in `before_configure'
org/jruby/RubyKernel.java:1046:in `load'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits.rb:28:in `before_configure'
org/jruby/RubyArray.java:1613:in `each'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits.rb:28:in `before_configure'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/config.rb:176:in `initialize'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/task.rb:48:in `initialize'
/Users/user/code/warbler/spec/sample_rake_bug/rakefile:3:in `(root)'
org/jruby/RubyArray.java:1613:in `each'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:1:in `(root)'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:58:in `load_project_rakefile'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:56:in `load_project_rakefile'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler.rb:25:in `project_application'
org/jruby/RubyKernel.java:1046:in `load'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits/rails.rb:27:in `before_configure'
org/jruby/RubyArray.java:1613:in `each'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits.rb:28:in `before_configure'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits.rb:28:in `before_configure'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/config.rb:176:in `initialize'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/task.rb:48:in `initialize'
org/jruby/RubyArray.java:1613:in `each'
/Users/user/code/warbler/spec/sample_rake_bug/rakefile:3:in `(root)'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:1:in `(root)'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:58:in `load_project_rakefile'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:56:in `load_project_rakefile'
org/jruby/RubyKernel.java:1046:in `load'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler.rb:25:in `project_application'
org/jruby/RubyArray.java:1613:in `each'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits/rails.rb:27:in `before_configure'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits.rb:28:in `before_configure'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits.rb:28:in `before_configure'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/config.rb:176:in `initialize'
org/jruby/RubyArray.java:1613:in `each'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/task.rb:48:in `initialize'
/Users/user/code/warbler/spec/sample_rake_bug/rakefile:3:in `(root)'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:1:in `(root)'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:58:in `load_project_rakefile'
org/jruby/RubyKernel.java:1046:in `load'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:56:in `load_project_rakefile'
org/jruby/RubyArray.java:1613:in `each'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler.rb:25:in `project_application'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits/rails.rb:27:in `before_configure'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits.rb:28:in `before_configure'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits.rb:28:in `before_configure'
org/jruby/RubyArray.java:1613:in `each'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/config.rb:176:in `initialize'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/task.rb:48:in `initialize'
/Users/user/code/warbler/spec/sample_rake_bug/rakefile:3:in `(root)'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:1:in `(root)'
org/jruby/RubyKernel.java:1046:in `load'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:58:in `load_project_rakefile'
org/jruby/RubyArray.java:1613:in `each'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/application.rb:56:in `load_project_rakefile'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler.rb:25:in `project_application'
/Users/user/.rbenv/versions/jruby-1.7.2/lib/ruby/gems/shared/gems/warbler-1.3.6/lib/warbler/traits/rails.rb:27:in `before_configure'
@jkutner
Collaborator

In the past I've worked around this by creating my own tasks that create the warbler task on the fly. Like this:

namespace :deploy do
  desc "Package the application into a WAR file and deploy it"
  task :war do
    Warbler::Task.new(:warble)
    Rake::Task['warble'].invoke
    # do deployment stuff
  end
end

This is also nice if you want to supplement the particular warbler task with some other actions.

@gregkare

It looks like having Warbler::Task.new in your Rakefile only creates problems, I also get a "stack level too deep" error when running warble executable war if it's in there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.