jruby-gradle / jruby-gradle-plugin

A Gradle plugin for working with JRuby projects for fun and profit. Mostly profit.
http://jruby-gradle.org
Other
93 stars 38 forks source link

JRubyExec should employ bundler-esque version pinning behaviors #154

Open rtyler opened 9 years ago

rtyler commented 9 years ago

As a user, when I'm evaluating newer or older versions of a Gem, the runtime environment of JRubyExec may lead to inadvertently loading incorrect versions of a gem unless I explicitly ./gradlew clean between invocations of the JRubyExec task.

A concrete example, if I'm seeing issues with v2 of a gem, so I downgrade in my build.gradle to v1, the v2 is still in build/gems and will still be used by default, whether I'm aware of it or not.

This is confusing behavior and should be fixed IMO

rtyler commented 9 years ago

One option that would address this that @mkristian and I discussed was making it such that the GemUtils. code would prune the gem specifications for versions that are not actively being used from the$buildDir/gems` directory.