Skip to content

Conversation

@openroad-ci
Copy link
Collaborator

uplevel is needed as otherwise the variables set the script are in the scope of log_cmd's proc and not the callers. This problem was hidden by sta's overriding of source but now that it is removed the problem manifests.

uplevel is needed as otherwise the variables set the script are
in the scope of log_cmd's proc and not the callers.  This problem
was hidden by sta's overriding of source but now that it is removed
the problem manifests.

Signed-off-by: Matt Liberty <[email protected]>
Copy link
Member

@maliberty maliberty left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@oharboe FYI

puts $log_cmd
set start [clock seconds]
$cmd {*}$args
uplevel 1 [list $cmd {*}$args]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I had to read line 6 twice before I realized it was a concatenation, but either is idiomatic tcl:

uplevel 1 [concat [list $cmd] $args]

@maliberty maliberty merged commit 4f1f6d7 into The-OpenROAD-Project:master Apr 16, 2025
5 of 7 checks passed
@maliberty maliberty deleted the log-cmd-scope branch April 16, 2025 13:44
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.

3 participants