1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 16:51:15 +02:00

Get rid of CanonPath::fromCwd

As discussed in the last Nix team meeting (2024-02-95), this method
doesn't belong because `CanonPath` is a virtual/ideal absolute path
format, not used in file systems beyond the native OS format for which a
"current working directory" is defined.

Progress towards #9205
This commit is contained in:
John Ericson 2024-02-06 16:23:58 -05:00
parent f2f54cf087
commit 4687beecef
30 changed files with 152 additions and 135 deletions

View file

@ -1,5 +1,7 @@
#pragma once
#include <filesystem>
#include "canon-path.hh"
#include "hash.hh"
@ -119,7 +121,7 @@ struct SourceAccessor
* possible. This is only possible for filesystems that are
* materialized in the root filesystem.
*/
virtual std::optional<CanonPath> getPhysicalPath(const CanonPath & path)
virtual std::optional<std::filesystem::path> getPhysicalPath(const CanonPath & path)
{ return std::nullopt; }
bool operator == (const SourceAccessor & x) const