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
So apparently because of the exporting, some additional processing of the nimNothing RCfun has happened. I haven't dug deeper but I will do so when I have time.
It's a bit surprising this hasn't come up before.
The text was updated successfully, but these errors were encountered:
So the issue here seems to be that in exprClasses_setSizes we invoke if (exists(code$name)) {. If nimNothing is exported it is found in the package namespace based on the nested enclosing environments. If it is not exported it is not found.
So if we have a private nimbleFunction in nimble then it can be found when inside the compilation process because we are in the package namespace and private members are available. If it is in another package, I don't see a way to get around exporting all the nfs.
As far as the inscrutable error, that seems to be a separate issue not related to scoping. I will file a separate issue about that. Once that is error trapped at least it will be more obvious that nimNothing is not being found.
Consider a package with these nimbleFunctions:
A user reported that if
nimNothing
is not exported, one gets this error when compilingnestedNim
:The issue arises in the call to
sizeReturn
, in particular the recursive callasserts <- recurseSetSizes(code, symTab, typeEnv)
.If
nimNothing
is exported, we see:if not exported, we see:
So apparently because of the exporting, some additional processing of the
nimNothing
RCfun has happened. I haven't dug deeper but I will do so when I have time.It's a bit surprising this hasn't come up before.
The text was updated successfully, but these errors were encountered: