Repository navigation
Route entrypoint commands without running project code - #304
Open
cap10morgan wants to merge 13 commits into
Open
cap10morgan wants to merge 13 commits into
cap10morgan wants to merge 13 commits into
Conversation
Leiningen 2.11.0 added the static-classpath task, which the built-in task list missed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The entrypoint hardcodes Leiningen's tasks and aliases. Lein images with the entrypoint now list the tasks shipped in the Leiningen jar, plus its aliases, and check the installed entrypoint passes each one to lein, so a Leiningen upgrade that adds a task fails the image build. lein help is not a usable source: it omits static-classpath. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Plugin tasks and project aliases such as `cljsbuild once` ran through lein before #301 was fixed, so keep routing them there instead of failing with "not found". Executables on PATH and explicit paths still run directly, so commands like `git log` never load project code. The fallback prints a warning pointing at explicit `lein` invocation. Tools-deps images no longer pass executable files named without a slash to clj. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Check routing with the image's PATH and fail on the fallback warning, so a stale built-in task list is caught whether the task collides with an executable or falls back. - Use the exact Leiningen jar path and keep the entrypoint off the loop's stdin. - Skip task namespaces that fail to load instead of aborting the listing. - Read the check script when building smoke test commands, not at namespace load. - Unit test smoke-test-cmds. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #301. Supersedes #302: this builds on @Quantisan's commits from there and adds the fallback discussed in #302 (comment).
The entrypoint no longer runs
<build tool> <cmd> --helpto decide where a command goes. That check could evaluate code from the mounted project before something likegit logran.lein images, in order
leintest,cp,repl, …) →lein, even if an executable has the same namegit,bash,./run.sh) → runs directly, with no JVM and no project codelein, with a warning on stderr suggestinglein <task>Step 4 keeps
docker run … clojure:lein cljsbuild onceand project aliases working as before. Those names only exist inside lein, so sending them there is what the user asked for.tools-deps images
A leading flag goes to
clj. So does a non-executable file that isn't on PATH, and it now runs once instead of twice. Everything else runs directly. An executable file named without./no longer goes toclj.Known tradeoffs
project.clj. The old--helpprobe did that too.lein <task>for those. The README covers this.Changes since #302
$LEIN_VERSION, stdin from/dev/null, tolerance for task namespaces that fail to load, and the script read lazilysmoke-test-cmdsand the fallback. Entrypoint tests now use the host PATH instead of/usr/bin:/binTesting
bb run testandbb fmt-checkpass.clojure:temurin-25-leinimage and checked:testanddepsfrom the list makes the check faillsruns directlyversionruns through lein🤖 Generated with Claude Code