In a lean package with just a single file, there is no need for the boilerplate overhead of init.q. At least, init.q should be optional, not mandatory.
$ ls $QPATH/my-1.0.0
my.q
$ cat $QPATH/my-1.0.0/my.q
\d .my
This conditional statement:
|
file: $[not 11h ~ type key pkgInfo[`file];pkgInfo[`file];` sv pkgInfo[`file],`init.q]; |
will resolve to false even for single-file directory:
q) key pkgInfo`file
,my.q
q) not 11h ~ type key pkgInfo`file
0b
Was it intended?
I propose changing the line to:
file:` sv f,$[f~k:key f:pkgInfo`file;();1=count k;first k;`init.q];
That will nicely cover all scenarios:
q).utl.require"my/my.q" / file loading scenario
q).utl.require"my" / dir loading scenario; supports single-file dir with or without init.q
In a lean package with just a single file, there is no need for the boilerplate overhead of
init.q. At least,init.qshould be optional, not mandatory.This conditional statement:
qutil/lib/bootstrap.q
Line 17 in 2bce9de
will resolve to false even for single-file directory:
Was it intended?
I propose changing the line to:
That will nicely cover all scenarios: