Bundler.setup(:group) clears previously bundled load paths with no way to re-load them #932

Closed
wants to merge 1 commit into
from

2 participants

@tigris

If you call Bundler.setup(:group) then call it again with a different group (e.g. :test), the load path from the first call gets wiped. Since setup() caches what it has previously loaded, calling Bundler.setup(:group) again will have no effect.

Not sure how to set github labels for this but i've tested on 1.0.7 (current stable) and 1.1pre (current master), it's a bug in both versions.

@tigris tigris Add test and fix for a bug where Bundler.setup() will clean the load_…
…path but also not re-load previously loaded paths for gem groups.
d44f116
@indirect
Bundler member

Allow groups to be loaded again if they been cleared

Closed by c3b93d3

@indirect
Bundler member

Hey, thanks for reporting this! We wound up unable to use your patch because of another bug that we discovered while applying it. There was not previously a test for the bug we found, so we added tests for both the issue you discovered and the other one that we found while investigating. :)

@tigris

No problem. Thanks for fixing it.

FWIW, I had trouble figuring out what the expected behavior was when you call Bundler.setup() twice with separate groups. E.g. should both groups get loaded, or is the last call to setup() the groups you should have. Which, based on your fix, it looks like I got it wrong anyway so my patch wouldn't have been what you wanted :)

@leobessa leobessa pushed a commit that referenced this pull request Apr 18, 2011
@indirect indirect Add tests for the problem described in #932 b3ffd2a
@leobessa leobessa pushed a commit that referenced this pull request Apr 18, 2011
@indirect indirect Allow groups to be loaded again if they been cleared
Closes #932
c3b93d3
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment