Repository navigation
Read the build commit and source at run time when not compiled in - #402
Merged
Merged
Conversation
…nsus #153) source_repo() and source_commit() fall back to MORCA_SOURCE and MORCA_COMMIT in the environment when the -D defines are empty; a define still wins and the commit must still be hex. The project Dockerfiles (deploy/project.Dockerfile, morca aws's copy, deploy/Dockerfile) set them with ENV in the final stage instead of -D, so a new commit no longer changes every program and Mojo's compile cache can serve a rebuild. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017TycszSbyw92Efu4ZeCYL6
winding-lines
enabled auto-merge
November 12, 2026 13:39
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017TycszSbyw92Efu4ZeCYL6
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.
For census #153 (cheap fix 2): today every image build passes
-D MORCA_COMMIT=<sha>, so each commit changes every program and Mojo's compile cache can never hit. Measured: an unchanged program rebuilds in 7 s against 48 s cold.morca.source:source_repo()andsource_commit()fall back toMORCA_SOURCEandMORCA_COMMITin the environment when the define is empty. A define still wins, and the commit must still be hex. config.mojo already reads the commit the same way formorca register.deploy/project.Dockerfile,morca aws's embedded copy anddeploy/Dockerfile: no more-Dfor the two. They're set withARG+ENVin the final stage, declared last, so a new commit reruns only that layer.MORCA_DIRTYstays a define. The census drops its own-Dflags once this is in a morca release (0.25.1).🤖 Generated with Claude Code
https://claude.ai/code/session_017TycszSbyw92Efu4ZeCYL6