Closed RickBarretto closed 1 year ago
I'm seeing how to solve it! 😉
Alright, running on my local build:
But, I got a question. Is this error at the end a bug? It's because I called from do
again or what?
Also, this behavior of h1 function is quite strange. LOOL
I just saw the issue you opened.
Just one notice: since module
was supposed to work in a way that is really not valid anymore (the whole module/package system has not been used at all and is to be re-designed), I wouldn't really bother with module
per se.
What I definitely would fix is how split.path
works on Windows 😉
Hummmmmm, got it!
So, for windows, we add \\
and /
support. I think it should be a good approach.
Any way, I'll push because it's just one little change to fix it.
Initially we are think that were an error from [Collections/split], as related on #872
More detailed what is happening here. (The problem isn't on this library itself), look:
I created a file called
paths.art
with this code:Look what happens when I run it:
So, look at lines 1750 and 1797. Arturo is using the function
item.split(DirSep))
,split
is a nim's standard function fromstrutils.nim
module, none problem here, andDirSep
that also is a nim's standard function comes fromosseps.nim
module, none problem here too.But, let's see what
DirSep
returns for windows systems:Yes, it'll split using a
\
. As Arturo'smodule
function is returning with bot separators, it won't work. It'll separate just until user's path, and then a big string.It's a issue related with
module
function.Originally posted by @RickBarretto in https://github.com/arturo-lang/arturo/issues/872#issuecomment-1353092615