Skip to content
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

Path library design #200718

Closed
wants to merge 4 commits into from
Closed

Path library design #200718

wants to merge 4 commits into from

Commits on Nov 11, 2022

  1. Configuration menu
    Copy the full SHA
    ca1a7bf View commit details
    Browse the repository at this point in the history

Commits on Nov 30, 2022

  1. Configuration menu
    Copy the full SHA
    1efb995 View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2022

  1. Clearer types

    - Changes the agreed-upon design slightly to make types of functions
      clearer:
      - Previously `path.join` worked on a list of paths, but required all but
        the first component to relative. This is now split into two functions:
        - `path.append <path> <string>` takes care of appending a relative
          path to an absolute path.
        - `path.relative.join [ <string> ]` takes care of joining relative
          paths together
      - `path.normalise` -> `path.relative.normalise`, because we don't need
        normalisation on absolute paths, Nix already takes care of that, and
        we use the `path.relative` namespace for anything only relating to
        relative paths
    
    - Some more bikeshedding for the `relativeTo` name. I think `relativeTo`
      is pretty good, but @fricklerhandwerk likes other suggestions more
    - Adds some suggestions for partial ordering checks on paths
    - Adds a `difference` function, which can take care of common prefix and
      subpath calculations between any number of paths.
    infinisil committed Dec 2, 2022
    Configuration menu
    Copy the full SHA
    49cb1ec View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2022

  1. Update code to match the design document

    Also lays down the assumptions we're making about paths, assumptions
    which notably also make the library work with the lazy trees Nix PR
    (without relying or interfering with any of its bugs)
    infinisil committed Dec 6, 2022
    Configuration menu
    Copy the full SHA
    2981d87 View commit details
    Browse the repository at this point in the history