Skip to content

lib.path.subpath.{isValid,normalise}: init#205190

Merged
roberth merged 6 commits intomasterfrom
lib.path.relativeNormalise
Jan 3, 2023
Merged

lib.path.subpath.{isValid,normalise}: init#205190
roberth merged 6 commits intomasterfrom
lib.path.relativeNormalise

Conversation

@infinisil
Copy link
Copy Markdown
Member

@infinisil infinisil commented Dec 8, 2022

Description of changes

Creates a new lib.path library component, originally proposed in #200718. This commit adds two main parts of it:

  • The design document covering the main design decisions for this library
  • A lib.path.subpath.isValid function to check whether a value is a valid subpath according to the design document
  • A lib.path.subpath.normalise function implementing a safe normalisation of subpaths according to the design document.

In the future further library functions will be implemented upon these two functions, it's the working horse of this path library. The next functions from #200718 that can be implemented are subpath.join and append, see #210426 for progress.

This work is sponsored by Antithesis

Things done
  • Wrote documentation
  • Wrote code-covering tests
  • Wrote property tests

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: policy discussion Discuss policies to work in and around Nixpkgs 8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 1-10 This PR causes between 1 and 10 packages to rebuild on Darwin. 10.rebuild-darwin: 1 This PR causes 1 package to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants