chainweb-node
chainweb-node copied to clipboard
(list-modules) and (describe-module) ignores the namespace of module.
(list-modules) and (describe-module) functions do not take modules in following format: "{namespace}.{module}" and instead takes the format"{module}"
For example, (list-modules) currently returns
["guards","hello-world","fungible-v1","hello","fungible-v2","gas-payer-v1","ns","coin"]
and
(describe-module "hello") returns description of "util.hello" module while
(describe-module "util.hello") returns module not found
This causes a problem in that the module with the identical name in different namespaces appear as one module in (list-modules), and only one can be fetched when calling (describe-module) .
An example of expected behavior is below:
(namespace 'ns1)
(module m GOV
(defcap GOV ()
true)
)
(namespace 'ns2)
(module m GOV
(defcap GOV ()
true)
)
(expect "All modules are listed" ["ns1.m", "ns2.m"] (list-modules))
(expect "module is described" "ns1.m" (at 'name (describe-module "ns1.m")))