From 16838726a232b0b572b4a2c71e2c2b7954b359bb Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 26 Oct 2022 16:38:45 +0200 Subject: [PATCH] Use __nix_virtual__ instead of __virtual__ As suggested by @Ma27. --- src/libexpr/eval.hh | 6 +++--- src/libexpr/paths.cc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh index 2fb6a74c9..34ad3d1cb 100644 --- a/src/libexpr/eval.hh +++ b/src/libexpr/eval.hh @@ -227,15 +227,15 @@ public: void registerAccessor(ref accessor); /* Convert a path to a string representation of the format - `/__virtual__//`. */ + `/__nix_virtual__//`. */ std::string encodePath(const SourcePath & path); /* Decode a path encoded by `encodePath()`. */ SourcePath decodePath(std::string_view s, PosIdx pos = noPos); /* Decode all virtual paths in a string, i.e. all - /__virtual__/... substrings are replaced by the corresponding - input accessor. */ + /__nix_virtual__/... substrings are replaced by the + corresponding input accessor. */ std::string decodePaths(std::string_view s); /* Allow access to a path. */ diff --git a/src/libexpr/paths.cc b/src/libexpr/paths.cc index 87aee2af0..235f8a933 100644 --- a/src/libexpr/paths.cc +++ b/src/libexpr/paths.cc @@ -14,14 +14,14 @@ void EvalState::registerAccessor(ref accessor) inputAccessors.emplace(accessor->number, accessor); } -static constexpr std::string_view marker = "/__virtual__/"; +static constexpr std::string_view marker = "/__nix_virtual__/"; std::string EvalState::encodePath(const SourcePath & path) { /* For backward compatibility, return paths in the root FS normally. Encoding any other path is not very reproducible (due - to /__virtual__/) and we should depreceate it eventually. So - print a warning about use of an encoded path in + to /__nix_virtual__/) and we should depreceate it + eventually. So print a warning about use of an encoded path in decodePath(). */ return path.accessor == rootFS ? path.path.abs()