Skip to content

WIP: Replace path translation map with logical path handling

This is WIP to demonstrate removal of the KWSys path translation map. There are several TODO comments in the commit messages, and likely more work after that.

Also, the final version of this change will need to be split up to put the Source/kwsys changes in upstream KWSys first.

The KWSys path "translation map" is used to preserve symbolic links in paths by mapping occurrences of their "realpath" back to the logical path. This approach causes several problems outlined in #16228 and other issues.

This merge request is a proof-of-concept demonstration that replaces the translation map with preservation of the original logical paths:

  • Track a "logical working directory" that is the same directory as getcwd, but expressed with symbolic links preserved.

  • Honor symbolic links when collapsing /.. components out of absolute paths, but express their (arbitrary) destination with as much of the original logical path as possible preserved.

Issue: #16228

Edited by Brad King

Merge request reports