Skip to content

untangle std.fs.path.resolve from the current working directory #13613

@andrewrk

Description

@andrewrk

std.fs.path.resolve is trying to do too much at once, and it results in a leaky abstraction. It can be a nice substitute for realpath when trying to avoid this syscall, however, it suffers from not taking symlinks into account, as well as asking the OS for the cwd unnecessarily.

I propose to change it to be purely a string manipulation function and lose the ability to call cwd().

Any callsites that break from this change should be audited for potential pre-existing bugs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThis proposal is planned.breakingImplementing this issue could cause existing code to no longer compile or have different behavior.enhancementSolving this issue will likely involve adding new logic or components to the codebase.proposalThis issue suggests modifications. If it also has the "accepted" label then it is planned.standard libraryThis issue involves writing Zig code for the standard library.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions