07:50 lizmat left 11:06 patrickb left 11:49 lizmat joined 11:56 lizmat left 12:19 patrickb joined 12:27 lizmat joined 12:28 lizmat left, lizmat_ joined 12:29 lizmat_ left 13:14 lizmat joined 13:16 lizmat_ joined, lizmat left 13:19 lizmat_ left 22:08 arkiuat joined
arkiuat ever since moving to v2025.10, zef has been giving me this annoying warning every time I invoke it, namely 22:08
.pm file extension in raku library path seen at:\n file#$*CWD, line 0 22:09
it prints whatever my current dir is at the time, not literally $*CWD
so there's no actual file pointed at, so I have no idea what it thinks it's seeing, and no idea how to make the warning go away (there are always several more lines). Seems like a bug. 22:10
I don't have any .pm files lying around, certainly not in any directories I was cd'ed into while using zef
ugexe file# doesn't mean its a file 22:23
the $*CWD is a directory
regardless, this behavior has been in rakudo (nothing to do with zef) for years now 22:24
not sure why you'd start seeing it now
unless you just added a .pm file to $*CWD
(or a subdirectory of $*CWD) 22:25
github.com/rakudo/rakudo/blob/e1b3...#L337-L347 22:26
22:36 arkiuat left 22:40 lizmat joined, lizmat left 22:49 arkiuat joined 22:53 arkiuat left 23:14 arkiuat joined
arkiuat thanks for the link, ugexe. At least now I can look for whatever is getting into %provides 23:18
I have no idea why I'm just seeing this now either
the follow-on warnings are: 23:22
Please use the .rakumod extension for raku modules, or include a META6.json file that explicitly declares each raku module file instead.
and
Please contact the author to have these occurrences of deprecated code adapted, so that this message will disappear! 23:23
yeah, I just happened to be in a directory above a lib with a META6.json in it whenever I've run zef before, and just today was running it from the top level (my userdir). And that's why 23:26
well, at least now I know how to prevent the useless warnings. Thanks again. 23:27
ugexe why would $*CWD be in your library path
arkiuat because $*ENV<RAKULIB> is '.'
ugexe yeah that is not a good thing to do
arkiuat now I know
ugexe for one it is a security issue, for another it is going to cause all sorts of extra precompilation to occur and thus slow things down 23:28
arkiuat it was for when I was working on my own modules, which has been all the time lately
is there some documentation on best practice in this, some url somewhere? 23:29
ugexe no idea. generally these things would apply regardless of what language you are using
arkiuat right, okay
I'm using rakubrew on MacOS, so I'd like to think that rakubrew has some advice about how $*ENV<RAKULIB> should be set 23:30
ugexe i never use rakulib 23:31
i only ever use -I
arkiuat okay, that's good to know. At least I know not to use "use lib" for this 23:33
ugexe it is fine to `use lib` in code you aren't distributing (i.e. putting in an ecosystem for others to download). If you do you should use an absolute path though, something like `use lib $?FILE.IO.parent.absolute` 23:36
or use lib $*PROGRAM.parent 23:37
if you are distributing this code then you should use -I. while working with it and rely on users having it installed (and thus not need to set anything) 23:38
arkiuat got it. Thank you! 23:39
ugexe if you must set rakulib then you should be using an absolute path
23:41 lizmat joined 23:44 lizmat left
arkiuat for executables in a bin directory, would use lib "$*PROGRAM.parent/../lib" be okay? 23:47
no, that doesn't even work. 23:49
use lib $?FILE.IO.parent(3).absolute; 23:52
ugexe are you distributing that bin file? 23:54
if not, yeah that is fine
arkiuat no, and I'm putting a "not for distribution" comment on the use lib line
I now understand that I got the idea that "use lib" is bad from folks reminding one another not to leave it in distributed code, and now I understand the reasons thanks to your explanations 23:55
so that, or $*PROGRAM.parent(2).absolute: both of those will work 23:57