Skip to content

Move default JSA path to $HOME/.cache - #9692

Draft
headius wants to merge 1 commit into
jruby:masterfrom
headius:config_jsa_home
Draft

headius wants to merge 1 commit into
jruby:masterfrom
headius:config_jsa_home

Conversation

@headius

@headius headius commented Sep 15, 2026 •

Copy link
Copy Markdown
Member

In order to avoid writing into the installed JRuby directory, we
move the default location to the .cache directory in the user's
$HOME, where most programs store such caches these days.

Relates to the new JSA home config from #9698

@headius

headius commented Sep 15, 2026

Copy link
Copy Markdown
Member Author

See #9667 which this is intended to fix.

@headius headius added this to the JRuby 10.1.2.0 milestone Sep 16, 2026
@headius

headius commented Sep 16, 2026

Copy link
Copy Markdown
Member Author

I'm going to hold off on the default location change for now and merge the config for both 10.0 and 10.1.

I like the new default but it's a pretty visible change that should probably bake in jruby-head for a while (and I don't think it should be backported to 10.0).

In order to avoid writing into the installed JRuby directory, we
move the default location to the .cache directory in the user's
$HOME, where most programs store such caches these days.

Relates to the new JSA home config from jruby#9698
@headius headius changed the title Allow configuring the home location for JSA files Move default JSA path to $HOME/.cache Sep 16, 2026
@headius

headius commented Sep 16, 2026

Copy link
Copy Markdown
Member Author

This now contains just the default location change (to $HOME/.cache), with the configurable JSA home merged from #9698. Will merge after 10.1.2.0 and let it bake in jruby-head for a bit.

@jcharaoui

Copy link
Copy Markdown
Contributor

I wonder if it's best to assume $HOME/.cache exists here. Other platforms like Mac have a different path for such data, and depending on the host, the operator might have defined it otherwise using the XDG_CACHE_HOME environment variable.

@headius

headius commented Sep 16, 2026

Copy link
Copy Markdown
Member Author

Well, that is a fair point, but is it worse than assuming the JRuby install location is writable? I'm trying to find a better option that allows users to get the benefit of the JSA file without requiring that.

Presumably this is also why the Debian package defaults to .cache. I want to reduce the amount of third-party patching required to maintain JRuby packages.

@headius

headius commented Sep 16, 2026

Copy link
Copy Markdown
Member Author

FWIW on my MacOS machine I do have a .cache directory, containing several Ruby-related items and a few from packages I've installed with Homebrew:

$ ls -1 ~/.cache                    
bashbrew
codex-runtimes
gem
install4j
javasharedresources
jruby
opencode
rbs
rubocop_cache
ruby-install
uv
vllm

Interestingly, the javasharedresources directory is put there by IBM's OpenJ9 JVM (Semeru) as a place to store that JVM's equivalent of AppCDS JSA files:

eclipse-openj9/openj9#2862

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

Successfully merging this pull request may close these issues.

2 participants