You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace the hardcoded SDK version list in ansible with a ~/.sdkmanrc managed by the projects role, using non-exact ("latest" / major-pin) version specs — once SDKMAN actually supports them. Upstream is actively working on this in sdkman/sdkman-cli#1154.
roles/projects/tasks/sdk.yml loops these through sdk install {{item.name}} {{item.version}} (executed via /opt/homebrew/bin/bash since SDKMAN requires Bash 4+; see 3bd9cc1). The pins go stale — kotlin 1.5.31 is years old — and each bump is a manual edit.
Why this is blocked today (verified 2026-07-10)
.sdkmanrc only accepts exact version identifiers:
Empirical: fresh isolated SDKMAN (script 5.20.0, self-installed same day) with .sdkmanrc containing ant=latest → sdk env install fails with ant has not been released yet / Stop! ant latest is not installed — latest is parsed as a literal version ID.
Add a .sdkmanrc to the projects role (e.g. roles/projects/files/.sdkmanrc) with the six candidates at latest (or major pins where preferable, e.g. java=21 if the shipped syntax supports it), symlinked to ~/.sdkmanrc alongside the role's other config.
Replace the Install SDKMAN sdk's loop in roles/projects/tasks/sdk.yml with a single sdk env install run in $HOME (keep executable: /opt/homebrew/bin/bash).
Drop the sdks var from roles/projects/defaults/main.yml — the .sdkmanrc becomes the single source of truth.
Keep re-run idempotency: today's guards key on is already installed / Done installing! output; re-derive equivalents from sdk env install output.
sdkman_auto_env=true is already set by sdk.yml, so a ~/.sdkmanrc will be evaluated by every shell that lands in $HOME. Confirm a non-exact spec doesn't add a remote lookup (slow prompt) to shell startup on the shipped implementation.
Note the semantics change: auto-env with a home-dir .sdkmanrc makes it the active-version authority in new shells, not just an install manifest.
Considered and deferred
Interim option (works today, not adopted): drop the version field and run bare sdk install <candidate>, which installs each candidate's current default (latest stable). Rejected for now in favor of waiting for the .sdkmanrc-native approach so the manifest lives in a file SDKMAN understands rather than in ansible vars.
Trigger
Watch sdkman/sdkman-cli#1154 (and SDKMAN release notes) — implement when the non-exact version syntax is released.
Goal
Replace the hardcoded SDK version list in ansible with a
~/.sdkmanrcmanaged by the projects role, using non-exact ("latest" / major-pin) version specs — once SDKMAN actually supports them. Upstream is actively working on this in sdkman/sdkman-cli#1154.Current state (what to refactor)
roles/projects/defaults/main.yml:roles/projects/tasks/sdk.ymlloops these throughsdk install {{item.name}} {{item.version}}(executed via/opt/homebrew/bin/bashsince SDKMAN requires Bash 4+; see 3bd9cc1). The pins go stale — kotlin 1.5.31 is years old — and each bump is a manual edit.Why this is blocked today (verified 2026-07-10)
.sdkmanrconly accepts exact version identifiers:.sdkmanrccontainingant=latest→sdk env installfails withant has not been released yet/Stop! ant latest is not installed—latestis parsed as a literal version ID.When #1154 ships, the refactor is
.sdkmanrcto the projects role (e.g.roles/projects/files/.sdkmanrc) with the six candidates atlatest(or major pins where preferable, e.g.java=21if the shipped syntax supports it), symlinked to~/.sdkmanrcalongside the role's other config.Install SDKMAN sdk'sloop inroles/projects/tasks/sdk.ymlwith a singlesdk env installrun in$HOME(keepexecutable: /opt/homebrew/bin/bash).sdksvar fromroles/projects/defaults/main.yml— the.sdkmanrcbecomes the single source of truth.is already installed/Done installing!output; re-derive equivalents fromsdk env installoutput.Caveats to re-check at implementation time
sdk env installshould not update global default sdkman/sdkman-cli#1457 —sdk env installcurrently mutates the global default candidate versions as a side effect. Confirm it's fixed (or acceptable) before switching provisioning toenv install.sdkman_auto_env=trueis already set bysdk.yml, so a~/.sdkmanrcwill be evaluated by every shell that lands in$HOME. Confirm a non-exact spec doesn't add a remote lookup (slow prompt) to shell startup on the shipped implementation..sdkmanrcmakes it the active-version authority in new shells, not just an install manifest.Considered and deferred
Interim option (works today, not adopted): drop the
versionfield and run baresdk install <candidate>, which installs each candidate's current default (latest stable). Rejected for now in favor of waiting for the.sdkmanrc-native approach so the manifest lives in a file SDKMAN understands rather than in ansible vars.Trigger
Watch sdkman/sdkman-cli#1154 (and SDKMAN release notes) — implement when the non-exact version syntax is released.