Rake 0.9.0 changes break Sprouts

51 views
Skip to first unread message

justin

unread,
May 22, 2011, 5:23:51 AM5/22/11
to ProjectSprouts
Hi,
it seems Rake 0.9.0 which was released yesterday breaks Sprouts due to
DSL changes (http://github.com/jimweirich/rake/blob/master/CHANGES),
so a new user following the website instructions and attempting to
rake a new project results in:

undefined method `file' for #<FlashSDK::MXMLC:0x0000010251dd50>
sprout-1.1.11.pre/lib/sprout/executable/base.rb:421:in
`create_outer_task'
...

Should gem dependencies in Sprouts be specified with a pessimistic
version constraint (~>) to avoid these windows of brokenness?
http://docs.rubygems.org/read/chapter/16#page74

thanks,
justin.

Luke Bayes

unread,
May 24, 2011, 12:52:55 PM5/24/11
to project...@googlegroups.com
Hey Justin,

Thanks so much for working through this, and also for following up on
the other threads!

You're probably right about having more pessimistic dependencies, but
I hesitate because in the past, people wanted newer (compatible)
versions of dependencies but wouldn't be able to get them because
Sprouts was locking down to an old one.

In order to get you (and others) unblocked, you should be able to
uninstall that released version of Rake, and explicitly install the
previous version.

gem uninstall rake
gem install rake -v 0.8.7

We could update Sprouts to depend on 0.8.7, but I'd prefer to go ahead
and make it compatible with head, and increment the dependency rather
than decrement it (I'm assuming that getting it up to speed is not too
much work).

Anyone up for working through this issue?

Thanks,

Luke

> --
> You received this message because you are subscribed to the Google Groups "ProjectSprouts" group.
> To post to this group, send email to project...@googlegroups.com
> To unsubscribe from this group, send email to projectsprout...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/projectsprouts?hl=en
>
> For other info you can visit our project at: http://projectsprouts.org, or on Github at: http://github.com/lukebayes/project-sprouts
>

Luke Bayes

unread,
May 26, 2011, 1:13:28 PM5/26/11
to project...@googlegroups.com
Just a heads up.

I began working through this issue yesterday and got pretty far along. Of course, the update to Rake broke Sprouts in some pretty deep ways - given our reliance on some Rake internals.

I expect to put in a couple more hours in the coming days and should have an updated release in the next week or so.


Thanks!

Luke

creynders

unread,
May 30, 2011, 9:05:54 AM5/30/11
to project...@googlegroups.com
Hi,

I uninstalled Rake v0.9.0 (but didn't need to install v0.8.7 since it was already installed) but now if I try to run Rake I get the following error:
"Could not find rake-0.9.0 in any of the sources"

Any idea how to solve this?

Regards,
Camille


Luke Bayes

unread,
May 31, 2011, 2:21:12 PM5/31/11
to project...@googlegroups.com
Hey Camille,

The 0.9.0 install clobbered your 0.8.7 executable, and uninstall left it in place b/c there was still another Rake gem there.

To fix, uninstall all versions of Rake, then install 0.8.7 again.

gem install rake -v 0.8.7


Thanks,

Luke





--

newtriks

unread,
Jun 8, 2011, 4:45:28 PM6/8/11
to ProjectSprouts
Hey Luke,

Can you please confirm what the current status of this is? Do we
still have to stick with 0.8.7 or is 0.9.2 compatibility sorted? If I
just run with the latest gem install of the flashsdk, create a new
project, install the dependencies I note I get version 0.9.2 of rake
and on running rake I get this output:

WARNING: Global access to Rake DSL methods is deprecated. Please
include
... Rake::DSL into classes and modules which use the Rake DSL
methods.
WARNING: DSL method FlashSDK::MXMLC#file called at /Users/
newtriks/.rvm/gems/ruby-1.9.2-p136/gems/sprout-1.1.11.pre/lib/sprout/
executable/base.rb:421:in `create_outer_task'
WARNING: Global access to Rake DSL methods is deprecated. Please
include
... Rake::DSL into classes and modules which use the Rake DSL
methods.
WARNING: DSL method Sprout::Executable::FileParam#file called at /
Users/newtriks/.rvm/gems/ruby-1.9.2-p136/gems/sprout-1.1.11.pre/lib/
sprout/executable/file_param.rb:45:in `prepare_prerequisites'
WARNING: DSL method FlashSDK::MXMLC#task called at /Users/
newtriks/.rvm/gems/ruby-1.9.2-p136/gems/sprout-1.1.11.pre/lib/sprout/
executable/base.rb:294:in `to_rake'
WARNING: Global access to Rake DSL methods is deprecated. Please
include
... Rake::DSL into classes and modules which use the Rake DSL
methods.
WARNING: DSL method Sprout::Library#file called at /Users/
newtriks/.rvm/gems/ruby-1.9.2-p136/gems/sprout-1.1.11.pre/lib/sprout/
library.rb:215:in `define_file_task'
WARNING: DSL method Sprout::Library#task called at /Users/
newtriks/.rvm/gems/ruby-1.9.2-p136/gems/sprout-1.1.11.pre/lib/sprout/
library.rb:218:in `define_file_task'
WARNING: DSL method Sprout::Library#task called at /Users/
newtriks/.rvm/gems/ruby-1.9.2-p136/gems/sprout-1.1.11.pre/lib/sprout/
library.rb:149:in `create_outer_task'
WARNING: Global access to Rake DSL methods is deprecated. Please
include
... Rake::DSL into classes and modules which use the Rake DSL
methods.
WARNING: DSL method FlashSDK::MXMLC#file called at /Users/
newtriks/.rvm/gems/ruby-1.9.2-p136/gems/sprout-1.1.11.pre/lib/sprout/
executable/base.rb:421:in `create_outer_task'
WARNING: Global access to Rake DSL methods is deprecated. Please
include
... Rake::DSL into classes and modules which use the Rake DSL
methods.
WARNING: DSL method Sprout::Executable::FileParam#file called at /
Users/newtriks/.rvm/gems/ruby-1.9.2-p136/gems/sprout-1.1.11.pre/lib/
sprout/executable/file_param.rb:45:in `prepare_prerequisites'
WARNING: DSL method FlashSDK::MXMLC#task called at /Users/
newtriks/.rvm/gems/ruby-1.9.2-p136/gems/sprout-1.1.11.pre/lib/sprout/
executable/base.rb:294:in `to_rake'
WARNING: Global access to Rake DSL methods is deprecated. Please
include
... Rake::DSL into classes and modules which use the Rake DSL
methods.
WARNING: DSL method FlashSDK::COMPC#file called at /Users/
newtriks/.rvm/gems/ruby-1.9.2-p136/gems/sprout-1.1.11.pre/lib/sprout/
executable/base.rb:421:in `create_outer_task'
WARNING: Global access to Rake DSL methods is deprecated. Please
include
... Rake::DSL into classes and modules which use the Rake DSL
methods.
WARNING: DSL method Sprout::Executable::Paths#file called at /Users/
newtriks/.rvm/gems/ruby-1.9.2-p136/gems/sprout-1.1.11.pre/lib/sprout/
executable/paths.rb:18:in `block (2 levels) in prepare_prerequisites'
WARNING: DSL method Sprout::Executable::Paths#file called at /Users/
newtriks/.rvm/gems/ruby-1.9.2-p136/gems/sprout-1.1.11.pre/lib/sprout/
executable/paths.rb:18:in `block (2 levels) in prepare_prerequisites'
WARNING: DSL method FlashSDK::COMPC#task called at /Users/
newtriks/.rvm/gems/ruby-1.9.2-p136/gems/sprout-1.1.11.pre/lib/sprout/
executable/base.rb:294:in `to_rake'
WARNING: Global access to Rake DSL methods is deprecated. Please
include
... Rake::DSL into classes and modules which use the Rake DSL
methods.
WARNING: DSL method FlashSDK::AsDoc#task called at /Users/
newtriks/.rvm/gems/ruby-1.9.2-p136/gems/flashsdk-1.0.27.pre/lib/
flashsdk/asdoc.rb:134:in `create_outer_task'
WARNING: Global access to Rake DSL methods is deprecated. Please
include
... Rake::DSL into classes and modules which use the Rake DSL
methods.
WARNING: DSL method Sprout::Executable::Files#file called at /Users/
newtriks/.rvm/gems/ruby-1.9.2-p136/gems/sprout-1.1.11.pre/lib/sprout/
executable/files.rb:23:in `block in prepare_prerequisites'
WARNING: Global access to Rake DSL methods is deprecated. Please
include
... Rake::DSL into classes and modules which use the Rake DSL
methods.
WARNING: DSL method Sprout::Executable::Files#file called at /Users/
newtriks/.rvm/gems/ruby-1.9.2-p136/gems/sprout-1.1.11.pre/lib/sprout/
executable/files.rb:23:in `block in prepare_prerequisites'
WARNING: DSL method FlashSDK::AsDoc#task called at /Users/
newtriks/.rvm/gems/ruby-1.9.2-p136/gems/sprout-1.1.11.pre/lib/sprout/
executable/base.rb:294:in `to_rake'
>> Copied file from: (/Users/newtriks/.rvm/gems/ruby-1.9.2-p136/gems/asunit4-4.2.3.pre/sprout/lib/../../bin/AsUnit-4.2.3.pre.swc) to: (lib/asunit4/AsUnit-4.2.3.pre.swc)
/Users/newtriks/Library/Sprouts/1.1/cache/flex4/4.1.0.16076/bin/mxmlc -
debug -output=bin/SomeProject-debug.swf -static-link-runtime-shared-
libraries src/SomeProject.as
Loading configuration file /Users/newtriks/Library/Sprouts/1.1/cache/
flex4/4.1.0.16076/frameworks/flex-config.xml
/Users/newtriks/Development/dev/playground/SomeProject/bin/SomeProject-
debug.swf (796 bytes)
[MXMLC] Compilation complete in 2.2375502586364746 seconds.
>> Tailing '/Users/newtriks/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt', press CTRL+C to quit
[trace] Warning: 'flash' has no property 'prototype'
[trace] >> SomeProject Instantiated!
[trace] Warning: 'flash' has no property 'prototype'



On May 31, 7:21 pm, Luke Bayes <lba...@google.com> wrote:
> Hey Camille,
>
> The 0.9.0 install clobbered your 0.8.7 executable, and uninstall left it in
> place b/c there was still another Rake gem there.
>
> To fix, uninstall all versions of Rake, then install 0.8.7 again.
>
> gem install rake -v 0.8.7
>
> Thanks,
>
> Luke
>

Luke Bayes

unread,
Jun 8, 2011, 6:16:04 PM6/8/11
to project...@googlegroups.com
I dug into the source and discovered that I integrated with Rake in
ugly, lame ways.

Specifically, I was referring to the Rake globals like 'file' and
'task' rather than using inheritance against the class definitions
that they provided - like Rake::FileTask or Rake::Task.

The latest release of Rake pulled these tasks out of the global scope
for any environment that doesn't explicitly include them, but it also
added some new (colliding) names to the global scope when they are
included.

I am about 90% finished with the fix, but working through a final test
failure that I think is just a problem in the test itself. I got
sidetracked but will make some time to get this released asap -
possibly before this weekend is up.

Thanks for surfacing this again!


lb.

Luke Bayes

unread,
Jun 9, 2011, 12:55:47 AM6/9/11
to project...@googlegroups.com
Update II:

I just pushed a small change to trunk here:

https://github.com/lukebayes/project-sprouts/commit/2c6b0ccea40c6b770ff4c25d83586b57e9214e67

And I pushed my in-progress changes to a new flashsdk branch here:

https://github.com/lukebayes/sprout-flashsdk/tree/rake-update

The flashsdk branch still has a failing test case, but I (or someone?)
still need to dig in to figure out the root cause. I believe it's
related to our legacy Rake::Task.clear failing to clear out executed
rake tasks somehow.


Thanks,

Luke

Simon Bailey

unread,
Jun 9, 2011, 5:47:26 AM6/9/11
to project...@googlegroups.com
Thanks for the response Luke,

Ok, that sounds cool.  I am underway with writing a blog post for PS and IDEA and decided to write it with V1 in mind as opposed to V0.7 which I still use on my projects.  The problem is (on mac os x) I am seriously chasing my tail using V1 getting all sorts of errors or warnings (one of which is included below) :(  I have tried all sorts of different versions (ensuring I clean up my gems each time) and nothing produces a solid result which I can then use as instructions in my blogpost, I am obvioulsy trying to avoid any convoluted route to getting PS up and running i.e. changing rake versions as I see if one is to use rake 0.8.7 then the Gemfile.lock has to also be changed, then I get a --bundler issue and I am chasing tails again :)  I would love to help but knowledge is too low looking at your ruby code, also when I download the latest forks both the ps and flash sdk throw errors either on install or rake.

This isn't a moan tbh, its just me trying to get a clear definitive path to use in my blogpost.

Cheers,

Simon

-- 
Cheers,

Simon
Sent with Sparrow

Luke Bayes

unread,
Jun 9, 2011, 1:29:53 PM6/9/11
to project...@googlegroups.com
Hey Simon,

Thanks for following up. I'll do my best to get the fix out this weekend.

Please hold off on the blog post until the fix is pushed. I'd like to
have the happy path working cleanly, so that we don't document
workarounds to transient issues.

I'm sorry for how long I've left this broken, and thanks to everyone
for your patience!

Luke

Simon Bailey

unread,
Jun 9, 2011, 1:43:48 PM6/9/11
to project...@googlegroups.com
Hey man listen it's no drama and I just want to re-iterate I am in no way complaining or negative about this.  Your running an open source project on the side and hell I don't know where you would find the time, so cool!  Thanks for your work!

-- 
Cheers,

Simon

Luke Bayes

unread,
Jun 9, 2011, 1:58:20 PM6/9/11
to project...@googlegroups.com
Got it - thanks!

lb.

Victor Powell

unread,
Jun 9, 2011, 2:01:22 PM6/9/11
to project...@googlegroups.com
can you remove me from your mailing list? for some reason, it wont do it for me.
Victor Powell
Reply all
Reply to author
Forward
0 new messages