ooyala / barkeep

The friendly code review system.
getbarkeep.org
1.42k stars 145 forks source link

Our sinatra/reloader workflow doesn't play well with Pinion #409

Open philc opened 11 years ago

philc commented 11 years ago

If you edit barkeep_server.rb, sinatra reloader loads this file. Pinion then throws an exception when its configure lines are re-evaluated:

Error: there is already a bundle called vendor_js with different component files. Each bundle must have a unique name.
.../gems/pinion-0.3.0/lib/pinion/server.rb:139:in `create_bundle'
/Users/reformist/p/barkeep/barkeep_server.rb:64:in `block in <class:BarkeepServer>'
.../gems/sinatra-1.3.2/lib/sinatra/base.rb:1273:in `configure'
/Users/reformist/p/barkeep/barkeep_server.rb:57:in `<class:BarkeepServer>'
/Users/reformist/p/barkeep/barkeep_server.rb:52:in `<top (required)>'

I realize our sinatra/reloader workflow is kind of broken already, but having the app crash every time we modify barkeep_server is really painful. We should either patch pinion to not raise an exception in this case, or decide on a different approach than sinatra reloader.

cespare commented 11 years ago

Agreed; I've noticed this with other projects as well. I think we should fix it in Pinion. I filed cespare/pinion#11.