22 Oct 2025
ugexe github.com/rakudo/rakudo/blob/e1b3...#L337-L347 22:26
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
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
23 Oct 2025
oh yeah, I want to $?FILE.IO one. $*PROGRAM.parent produces paths with .. in them, and $?FILE.IO.parent produces real absolute paths 00:26
s/to/the
27 Oct 2025
well, I just got the "Cannot unbox a type object (Str) to a str." compilation error on an install attempt, installing Test::Coverage, in compiling Iterables-0.0.4/t/01-basic.rakutest:1 21:37
HOWEVER
when I ran `RAKUDO_OPT="--ll-exception" zef install Test::Coverage --debug` (which I did immediately), Test::Coverage (and ForwardIterables) installed cleanly without complaint 21:38
so yeah, it's still proving difficult to reproduce. If it never happens when I have debug mode on, though, I won't be too upset :D 21:39
ugexe do you happen to have any other rakudo environment variables set, particularly those like RAKULIB, RAKUDOLIB, etc? 22:00
arkiuat This is embarrassing, but yes, RAKULIB was still set to . 22:18
I don't know how, that isn't in any of my dotfiles anymore and hasn't been for days now
anyway, I'll keep an eye out for that. It isn't set anymore now
the only other Raku environment variable that I have is RAKUDO_LINE_EDITOR, which I hope is innocuous 22:19
Thank you! I just installed two more modules without experiencing the problem 22:22
(after making sure RAKULIB was not set)
ugexe the issue was almost certainly to due rakulib being set to .
arkiuat Right 22:23
ugexe there is obviously some weird issue in rakudo related to precomp and module loading, but now you know how to avoid it 22:27
thats why it happens the first time you do something and not the follow up times: after the first time it has presumably precompiled some stuff in . (i.e. RAKULIB)
arkiuat which would leave random .precomp dirs scattered about. I probably want to delete the ones that aren't where they belong 22:30