clangd broke because it can't look through symlinks. compile_commands manipulation does not fix it, clangd configuration does not fix it, a vfs overlay does not fix it, and while a combination of those can fix it with a bind mount in place that's just too cursed to even consider clangd bug: https://github.com/llvm/llvm-project/issues/116877 Change-Id: I8e3e8489548eb3a7aa65ac9d12a5ec8abf814aec
38 lines
805 B
C++
38 lines
805 B
C++
#pragma once
|
|
///@file
|
|
|
|
|
|
#include <map>
|
|
#include <optional>
|
|
#include <string>
|
|
|
|
namespace nix {
|
|
|
|
struct InputAccessor
|
|
{
|
|
enum Type {
|
|
tRegular, tSymlink, tDirectory,
|
|
/**
|
|
Any other node types that may be encountered on the file system, such as device nodes, sockets, named pipe, and possibly even more exotic things.
|
|
|
|
Responsible for `"unknown"` from `builtins.readFileType "/dev/null"`.
|
|
|
|
Unlike `DT_UNKNOWN`, this must not be used for deferring the lookup of types.
|
|
*/
|
|
tMisc
|
|
};
|
|
|
|
struct Stat
|
|
{
|
|
Type type = tMisc;
|
|
//uint64_t fileSize = 0; // regular files only
|
|
bool isExecutable = false; // regular files only
|
|
};
|
|
|
|
typedef std::optional<Type> DirEntry;
|
|
|
|
typedef std::map<std::string, DirEntry> DirEntries;
|
|
};
|
|
|
|
}
|