Skip to content

Fix tclapp::install junit failure in appinit sandbox pass - #846

Open
mumallaeng wants to merge 1 commit into
Xilinx:2026.2-devfrom
mumallaeng:2026.2-dev
Open

Fix tclapp::install junit failure in appinit sandbox pass#846
mumallaeng wants to merge 1 commit into
Xilinx:2026.2-devfrom
mumallaeng:2026.2-dev

Conversation

@mumallaeng

Copy link
Copy Markdown

Fixes #823

Problem

tclapp::install junit fails with:

unknown namespace in import pattern "::msgcat::mcload"

Root cause

appinit::load_app probes an app for its exported procs by sourcing its files in a throwaway interpreter where package require is stubbed to a no-op. JUnitAssertionMgr.tcl's init proc runs at module load time and calls clock format, which lazily sources Tcl's clock.tcl and needs msgcat. Since package require is stubbed in that interpreter, msgcat never actually loads there, so namespace import ::msgcat::mcload fails.

That probe interpreter is discarded right after collecting the exported proc names, so nothing computed in init during that pass is actually used.

Fix

Guard the clock format call with catch, falling back to an empty timestamp on failure. Harmless during the probe pass (result is discarded); the real load path (via junit.tcl's package mechanism, unstubbed) is unaffected.

Testing

  • Reproduced the exact reported error on Vivado 2026.1 (tclapp::install junit)
  • Confirmed the fix resolves it on the same Vivado 2026.1 install
  • Root cause isolated and verified in a minimal standalone Tcl 8.6 reproduction of appinit's sandbox pattern

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.
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.

1 participant