Verify Reloader Works #530

Closed
nesquena opened this Issue May 17, 2011 · 28 comments

Comments

Projects
None yet
6 participants
Owner

nesquena commented May 17, 2011

Before the next release all of us should use the latest reloader in development and ensure that it works as expected. @achiu Last we spoke, the reloader on git padrino was failing for you right? Let's keep this open until the reloader works for all of us.

achiu was assigned May 17, 2011

Owner

DAddYE commented May 17, 2011

@nesquena, can u make some test?

Owner

achiu commented May 17, 2011

@nesquena, @DAddYE i've tried the latest, and it seems to be operating again.

Owner

DAddYE commented May 17, 2011

@achiu make some stress test on one of your biggest project.

Tested a lot today with @pepe, now is more more fast because we reload only necessary things, need to be improved, I need to check reloading of single apps and more, but please please please report back your experience.

Owner

nesquena commented May 17, 2011

@achiu @DAddYE Yes I agree we need to test this heavily. I am going to be testing multiple padrino apps today and see if I run into any problems. You guys should do the same. Thanks for making a better reloader Davide! I know it is a tricky problem.

Contributor

pepe commented May 18, 2011

For me everything is going well. I haven't encountered issue after @0d297031da823e0ad4bc.

Owner

nesquena commented May 18, 2011

@pepe Thanks for the update. Glad to hear the reloader is working more reliably for you now.

Owner

nesquena commented May 18, 2011

@DAddYE Tested the latest reloader with after 47c1aba and it appears to be working for a couple apps.

@pepe, @achiu, @bernerdschaefer Can you guys confirm the reloader works and is not slower then 0.9.28?

Contributor

bernerdschaefer commented May 19, 2011

@nesquena

Model reloads don't seem to work at all for me -- is there something special I need to do? As far as speed -- it's much better than before, but still ~2 seconds slower than 0.9.28 on startup time for me.

Owner

nesquena commented May 19, 2011

@DAddYE why startup time would be 2 seconds slower in git then in 0.9.28?

Contributor

bernerdschaefer commented May 19, 2011

@nesquena I'm also seeing namespaced models getting loaded multiple times:

[11:23:43] "Loading app/models/board.rb"
[11:23:43] "Loading app/models/boards.rb"
[11:23:43] "Loading app/models/boards/giga_job.rb"
[11:23:43] "Loading app/models/boards/giga_job/job.rb"
[11:23:43] "Loading app/models/boards/step_stone.rb"
[11:23:43] "Loading app/models/boards/step_stone/job.rb"
[11:23:44] "Loading app/models/job.rb"
[11:23:44] "Loading app/models/boards/giga_job/job.rb"
[11:23:44] "Loading app/models/boards/step_stone/job.rb"
[11:23:44] "Loading app/models/job.rb"
[11:23:44] "Loading app/models/boards/giga_job/job.rb"
[11:23:44] "Loading app/models/boards/step_stone/job.rb"

Where the models look like this:

class Board; end
module Boards; end
class Boards::GigaJob < ::Board; end
class Boards::GigaJob::Job < ::Job; end
# ...
Owner

DAddYE commented May 19, 2011

@bernerdschaefer which orm do u have? Can you gist me what's happen when you edit a model and reload the page? Gist me the console output. Thanks

@nesquena, now we lock at startup (but in future only for devel) loaded classes so in this way, we don't remove (as we do in previous releases) constants that are necessary for the project ex: HttpRouter, ActiveRecord, Rake, Thor etc...

Owner

DAddYE commented May 19, 2011

@bernerdschaefer do you use super latest padrino-edge?

solnic commented May 19, 2011

@DAddYE I can confirm that reloading namespaced STI models is broken (at least with latest stable version). I'm using DataMapper

Contributor

bernerdschaefer commented May 19, 2011

@DAddYE

Yes, this was tested against master. I'm using Mongoid -- and there's no devel output whatsoever when changing a model. Only when I change, e.g., my application file or a controller.

Owner

DAddYE commented May 19, 2011

@solnic yep a well know problem of previous reloader, can you try with the git version of padrino?
@bernerdschaefer but the model is not reloaded?

Contributor

bernerdschaefer commented May 19, 2011

@DAddYE Correct. I'm seeing no model reloading whatsoever.

solnic commented May 19, 2011

@DAddYE sorry to report that but with master models reloading doesn't work at all :(

Owner

DAddYE commented May 19, 2011

@bernerdschaefer tell me:

# location of the model that you edit
# kind of model, mongoid, datamapper, activerecord
puts Padrino::Reloader.exclude_constants
puts Padrino.load_paths

Thanks!

Owner

DAddYE commented May 19, 2011

@solnic tell me:

# location of the model that you edit
# kind of model, mongoid, datamapper, activerecord
puts Padrino::Reloader.exclude_constants
puts Padrino.load_paths
# Edit a model, then go on the browser and gist me the console output

Thanks!

Contributor

bernerdschaefer commented May 19, 2011

@DAddYE

  1. app/models/board.rb
  2. Mongoid
    3/4: https://gist.github.com/980513
Owner

DAddYE commented May 19, 2011

@bernerdschaefer the model is called board?

Contributor

pepe commented May 19, 2011

sorry, I had something urgent today, and I just come to office.

I noticed yesterday that models are not reloading with specs, but haven't tested it more in development. Now I am going to another meeting and after that, we would like to try to hack inherited templates in padrino with @botanicus.

So I will get to development tomorrow againg. I will report what's happening with latest version.

And yes it's faster for me than latest stable.

Also tell me what to test, or which outputs are interesting for you.

pepe

solnic commented May 19, 2011

@DAddYE https://gist.github.com/45c08e73dec3f5a06479

Also I just noticed controllers are not being reloaded as well

Owner

DAddYE commented May 19, 2011

@solnic, @pepe, @nesquena, @achiu, @bernerdschaefer can u make a test right now?

solnic commented May 19, 2011

@DAddYE I can confirm it works perfectly now! Thank you guys!

Contributor

bernerdschaefer commented May 19, 2011

Yep. Works for me, too.

Contributor

pepe commented May 19, 2011

@DAddYE like charm men. It's even faster for me, than the @16bb800ccc91 was.

Owner

nesquena commented May 19, 2011

@DAddYE Yeah its looking a lot better, working for me too. Thanks @solnic, @pepe, @bernerdschaefer for helping us test this tricky reloader :)

DAddYE closed this May 21, 2011

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