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
Ran into a big similar to the one I've outlined in #19414. However this time in a slightly different form. When cross-compiling from Linux to Windows I do path handling with / in a macro and then run a program with those paths. Since I had specified --os:windows Nim went ahead and used \ instead of / which meant the paths where no longer valid for the OS which was doing the compiling and the whole thing broke. Nim should really split the compiling OS from the target OS and then checks in macros should be done against the compiling OS and checks in normal procedures should be done against the target OS.
and then checks in macros should be done against the compiling OS and checks in normal procedures should be done against the target OS.
that wouldnt solve anything. just because you compose paths at compiletime doesnt mean you access them at compiletime too. there just needs a separate / like operator for compiletime.
Of course macros would need access to both the compiling OS and the running OS so it could choose which one to use. As it stands now however switching the --os switch means that macros run as the target OS which causes a host of issues, not only with path handling.
Ran into a big similar to the one I've outlined in #19414. However this time in a slightly different form. When cross-compiling from Linux to Windows I do path handling with
/
in a macro and then run a program with those paths. Since I had specified--os:windows
Nim went ahead and used\
instead of/
which meant the paths where no longer valid for the OS which was doing the compiling and the whole thing broke. Nim should really split the compiling OS from the target OS and then checks in macros should be done against the compiling OS and checks in normal procedures should be done against the target OS.Example
Compiled with
--os:windows
on a Linux machine, or vice-versa.Current Output
(Caused by
\m
not escaping to anything but a normal m)Expected Output
Possible Solution
Additional Information
See: #19414
The text was updated successfully, but these errors were encountered: