Skip to content

Make daikon.bashrc ask javac or java for JAVA_HOME - #911

Closed
mernst wants to merge 2 commits into
codespecs:masterfrom
mernst:daikon-bashrc-java-home
Closed

mernst wants to merge 2 commits into
codespecs:masterfrom
mernst:daikon-bashrc-java-home

Conversation

@mernst

@mernst mernst commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

daikon.bashrc no longer infers JAVA_HOME only by resolving symlinks from which javac, which is wrong for wrapper scripts such as those of jenv, asdf, or mise, and for the macOS /usr/bin/javac stub. It still follows symlinks first, because that is fast. If the result is not a JDK home (it lacks a release file), daikon.bashrc asks the javac on the PATH for its java.home. It handles JDK 8, whose java.home is the jre/ subdirectory. This replaces the macOS-specific /usr/libexec/java_home call.

Daikon requires a JDK, not just a JRE, because it compiles splitters at run time. So daikon.bashrc checks that $JAVA_HOME/bin/javac is executable, rather than merely that the directory exists. The error message says whether a user-set JAVA_HOME is not a JDK or no JDK could be found.

A failed detection does not modify JAVA_HOME in the user's shell. Finding javac uses type -P, so aliases such as alias javac='javac -g' are ignored.

@coderabbitai

coderabbitai Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

  • Run on-demand review

This review includes 1 billable file and costs up to $0.25.

Or wait 3 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: codespecs/daikon/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 1dba1f96-65dd-40b9-a597-9337fd1a3510

📥 Commits

Reviewing files that changed from the base of the PR and between 779e30d and cf2d9dc.


📒 Files selected for processing (1)
  • scripts/daikon.bashrc

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@mernst

mernst commented Oct 12, 2026

Copy link
Copy Markdown
Member Author

Closing as unnecessary: #904 removes the JAVA_HOME inference from daikon.bashrc. The Makefiles compute JAVA_HOME themselves (and, with #897, java/java-home.mk does so in one place).

@mernst mernst closed this Oct 12, 2026
@mernst
mernst deleted the daikon-bashrc-java-home branch October 12, 2026 00:00
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.

1 participant