Fix tclapp::install junit failure in appinit sandbox pass - #846
Open
mumallaeng wants to merge 1 commit into
Open
Fix tclapp::install junit failure in appinit sandbox pass#846mumallaeng wants to merge 1 commit into
mumallaeng wants to merge 1 commit into
Conversation
appinit's app-probe interpreter stubs out "package require" while sourcing an app's files to collect exported procs. JUnitAssertionMgr.tcl calls clock format at module load time, which needs msgcat and fails there with "unknown namespace in import pattern "::msgcat::mcload"", aborting tclapp::install. That probe interpreter is discarded right after, so guard the call with catch and fall back to an empty timestamp; the real load path is unstubbed and unaffected. Verified against Vivado 2026.1: reproduces before this change, succeeds after.
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 #823
Problem
tclapp::install junitfails with:Root cause
appinit::load_appprobes an app for its exported procs by sourcing its files in a throwaway interpreter wherepackage requireis stubbed to a no-op.JUnitAssertionMgr.tcl'sinitproc runs at module load time and callsclock format, which lazily sources Tcl'sclock.tcland needsmsgcat. Sincepackage requireis stubbed in that interpreter,msgcatnever actually loads there, sonamespace import ::msgcat::mcloadfails.That probe interpreter is discarded right after collecting the exported proc names, so nothing computed in
initduring that pass is actually used.Fix
Guard the
clock formatcall withcatch, falling back to an empty timestamp on failure. Harmless during the probe pass (result is discarded); the real load path (viajunit.tcl's package mechanism, unstubbed) is unaffected.Testing
tclapp::install junit)