Skip to content

[codex] Use DPM and validate Java#2

Draft
cgdusek wants to merge 1 commit into
Jatinp26:mainfrom
cgdusek:codex/dpm-java-check
Draft

[codex] Use DPM and validate Java#2
cgdusek wants to merge 1 commit into
Jatinp26:mainfrom
cgdusek:codex/dpm-java-check

Conversation

@cgdusek
Copy link
Copy Markdown

@cgdusek cgdusek commented Apr 3, 2026

Summary

  • switch the CLI compile and test subcommands from the deprecated daml executable to dpm
  • validate Java by running java -version instead of trusting any java binary on PATH
  • document DPM and JDK 17+ as explicit requirements

Why

Issue #1 reproduces in a current DPM-based environment:

  • create-canton-app compile and create-canton-app test fail because they still hard-require daml
  • the create flow prints Java Runtime found on macOS even when only the /usr/bin/java launcher stub is present

Impact

  • current Canton/DPM users can run the shipped subcommands without installing the legacy Daml CLI
  • macOS users get an actionable warning when Java is not actually usable for dpm test

Validation

  • env PATH="$HOME/.dpm/bin:$HOME/n/bin:/usr/bin:/bin:/usr/sbin:/sbin" node /Users/charlesdusek/Code/create-canton-app/bin/create-canton-app.js stub-check --template Multiparty
  • env PATH="$HOME/.dpm/bin:$HOME/n/bin:/usr/bin:/bin:/usr/sbin:/sbin" node /Users/charlesdusek/Code/create-canton-app/bin/create-canton-app.js compile
  • env PATH="$HOME/.dpm/bin:$HOME/n/bin:/usr/bin:/bin:/usr/sbin:/sbin" node /Users/charlesdusek/Code/create-canton-app/bin/create-canton-app.js test
  • env PATH="$HOME/.dpm/bin:/opt/homebrew/opt/openjdk@17/bin:$HOME/n/bin:/usr/bin:/bin:/usr/sbin:/sbin" JAVA_HOME="/opt/homebrew/opt/openjdk@17/libexec/openjdk.jdk/Contents/Home" node /Users/charlesdusek/Code/create-canton-app/bin/create-canton-app.js test

Closes #1.

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.

Use DPM in CLI subcommands and validate usable Java

1 participant