-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add OS-dependent path conversion under a well-documented library function: loc parseFilePath(str path, OS forOS=currentOS())
#1941
Comments
Agreed, let's also add the inverse, as if you have to call exec, you have to write messy code, for this exact reason. |
Exec is already fixed by using LOC instead of str as path to the binary.
That way we don't have to fix this twice.
Jurgen Vinju
http://jurgen.vinju.org
CWI SWAT
TU Eindhoven
Swat.engineering BV
…On Thu, 9 May 2024 at 16:50, Davy Landman ***@***.***> wrote:
Agreed, let's also add the inverse, as if you have to call exec, you have
to write messy code, for this exact reason.
—
Reply to this email directly, view it on GitHub
<#1941 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAPF5F4GSO7MJT4NWXTHJ73ZBOELBAVCNFSM6AAAAABHO4JDRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBSHAYTKNRVGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Also LOC parameters are automatically transformed by exec.
Jurgen Vinju
http://jurgen.vinju.org
CWI SWAT
TU Eindhoven
Swat.engineering BV
…On Thu, 9 May 2024 at 18:47, Jurgen Vinju ***@***.***> wrote:
Exec is already fixed by using LOC instead of str as path to the binary.
That way we don't have to fix this twice.
Jurgen Vinju
http://jurgen.vinju.org
CWI SWAT
TU Eindhoven
Swat.engineering BV
On Thu, 9 May 2024 at 16:50, Davy Landman ***@***.***>
wrote:
> Agreed, let's also add the inverse, as if you have to call exec, you have
> to write messy code, for this exact reason.
>
> —
> Reply to this email directly, view it on GitHub
> <#1941 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAPF5F4GSO7MJT4NWXTHJ73ZBOELBAVCNFSM6AAAAABHO4JDRCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBSHAYTKNRVGU>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
I'll try wip up an example, but there are enough cases where you need to have 'correct' paths in places that aren't possible with generic argument replacement of loc. Especially if you need them like inside of a config file, or some kind of composed argument. (For example In general I agree some cases you don't have to worry (especially as windows handles |
@jurgenvinju this is done right? in #1942? |
This would help when we source file paths as strings and need to convert them to locations. Since file path parsing is OS specific, we need an OS specific solution and not a generic one (also not an automatic one builtin to the ISourceLocation factories!)
The text was updated successfully, but these errors were encountered: