You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--- a/policy.tcl 2023-01-07 01:20:12.256624629 +0200+++ b/policy.tcl 2023-01-07 01:16:46.820239749 +0200@@ -10,7 +10,7 @@
## The saving and loading primitives are wrapped for proper
## integration of the exported commands within Tcl's VFS.
-namespace eval linenoise::history {}+namespace eval ::linenoise::history {}
if {[package vsatisfies [package present Tcl] 8.6]} {
# Tcl 8.6, and higher. We have "file tempfile".
@@ -178,7 +178,7 @@
return [::linenoise::history_getmax]
}
-namespace eval linenoise::history {+namespace eval ::linenoise::history {
namespace ensemble create -map {
add ::linenoise::history_add
clear ::linenoise::history_clear
@@ -377,7 +377,7 @@
# # ## ### ##### ######## ############# #####################
-namespace eval linenoise {+namespace eval ::linenoise {
# primitive commands:
# - columns
# - prompt (with completion) | wrapped
The fix is :: symbols in the name of the namespace string in the policy.tcl file.
Reason
This command at line 13:
namespace eval linenoise::history {}
create namespace with the implicit declared name[namespace current]::linenoise::history, where [namespace current] may have any other name, than the root namespace ::.
The next instruction at the line 18:
proc ::linenoise::history::TempFile {} {
use absolutely declared namespace name ::linenoise::history, not implicit declared namespace name [namespace current]::linenoise::history.
So, this two lines (13 and 18) use different namespaces.
I think, that name of declared namespace MUST be consistent with namespace in procedure names.
Please, fix the file.
The text was updated successfully, but these errors were encountered:
Bogdan107
changed the title
fix: policy.tcl
fix namescape in policy.tcl
Jan 6, 2023
I have an error when load linenoise package:
This fix in policy.tcl resolve an error:
The fix is
::
symbols in the name of the namespace string in thepolicy.tcl
file.Reason
This command at line 13:
create namespace with the implicit declared name
[namespace current]::linenoise::history
, where[namespace current]
may have any other name, than the root namespace::
.The next instruction at the line 18:
use absolutely declared namespace name
::linenoise::history
, not implicit declared namespace name[namespace current]::linenoise::history
.So, this two lines (13 and 18) use different namespaces.
I think, that name of declared namespace MUST be consistent with namespace in procedure names.
Please, fix the file.
The text was updated successfully, but these errors were encountered: