Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not refetch gems across gemsets (perhaps cache across gemsets for the same Ruby instead?) #4978

Open
AndyObtiva opened this issue Sep 18, 2020 · 0 comments

Comments

@AndyObtiva
Copy link
Member

Description

I just wanted to note that it's silly to refetch gems across gemsets. I wish RVM would just cache gems across gemsets as if I'm just using Bundler in one gemset.

For example, under multiple JRuby apps with different gemsets, I keep seeing this line:

Fetching jruby-jars-9.2.13.0.gem

It takes a long time to download and finish despite my 100Mbps Internet connection. It would be much better if it is cached just as Bundler does within the same gemset.

Steps to reproduce

  1. rvm install jruby && rvm gemset use gs1 --create && gem install jruby-jars
  2. rvm gemset use gs2 --create && gem install jruby-jars
  3. rvm gemset use gs3 --create && gem install jruby-jars

Expected behavior

Suggestion: steps 2 & 3 above should just reuse the jruby-jars gem downloaded in step 1 due to caching

Actual behavior

jruby-jars is fetched over and over again.

Debug mode:

Environment info

jruby-9.2.13.0@glimmer-cs-calculator:

system:
uname: "Darwin Users-iMac-2.local 19.6.0 Darwin Kernel Version 19.6.0: Sun Jul 5 00:43:10 PDT 2020; root:xnu-6153.141.1~9/RELEASE_X86_64 x86_64"
name: "OSX"
version: "10.15"
architecture: "x86_64"
bash: "/bin/bash => GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin19)"
zsh: "/bin/zsh => zsh 5.7.1 (x86_64-apple-darwin19.0)"
remote_path: "osx/10.15/x86_64"
xcode: "11.6"

rvm:
version: "1.29.10.2 (latest)"
updated: "14 days 19 hours 38 minutes 37 seconds ago"
path: "/Users/User/.rvm"
autolibs: "[enable] Allow RVM to use package manager if found, install missing dependencies, install package manager (only OS X)."

ruby:
interpreter: "jruby"
version: "9.2.13.0"
date: "jruby 9.2.13.0 (2.5.7) 2020-08-03 9a89c94bcc Java HotSpot(TM) 64-Bit Server VM 25.241-b07 on 1.8.0_241-b07 +jit [darwin-x86_64]"
platform: "darwin-x86_64"
patchlevel: "TM"
full_version: "jruby 9.2.13.0 (2.5.7) 2020-08-03 9a89c94bcc Java HotSpot(TM) 64-Bit Server VM 25.241-b07 on 1.8.0_241-b07 +jit [darwin-x86_64]"

homes:
gem: "/Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-cs-calculator"
ruby: "/Users/User/.rvm/rubies/jruby-9.2.13.0"

binaries:
ruby: "/Users/User/.rvm/rubies/jruby-9.2.13.0/bin/ruby"
irb: "/Users/User/.rvm/rubies/jruby-9.2.13.0/bin/irb"
gem: "/Users/User/.rvm/rubies/jruby-9.2.13.0/bin/gem"
rake: "/Users/User/.rvm/rubies/jruby-9.2.13.0/bin/rake"

environment:
PATH: "/Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-cs-calculator/bin:/Users/User/.rvm/gems/jruby-9.2.13.0@global/bin:/Users/User/.rvm/rubies/jruby-9.2.13.0/bin:/Users/User/.rvm/bin:/Users/User/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/Library/Apple/usr/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin:/Users/User/.rvm-dev/bin:/usr/local/phantomjs-2.1.1-macosx/bin:/usr/local/apache-maven-3.5.0/bin:/opt/scala-2.12.2/bin:/Users/User/code/problem_two_conference_track_management_ruby/bin:/Users/User/.cargo/bin"
GEM_HOME: "/Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-cs-calculator"
GEM_PATH: "/Users/User/.rvm/gems/jruby-9.2.13.0@glimmer-cs-calculator:/Users/User/.rvm/gems/jruby-9.2.13.0@global"
MY_RUBY_HOME: "/Users/User/.rvm/rubies/jruby-9.2.13.0"
IRBRC: "/Users/User/.rvm/rubies/jruby-9.2.13.0/.irbrc"
RUBYOPT: ""
gemset: "glimmer-cs-calculator"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant