Page MenuHomePhabricator
Feed Advanced Search

May 18 2022

Kale added a reviewer for D125859: [clang][deps] stop reusing FileManager in DependencyScanningAction: dexonsmith.
May 18 2022, 1:22 AM · Restricted Project, Restricted Project
Kale requested review of D125859: [clang][deps] stop reusing FileManager in DependencyScanningAction.
May 18 2022, 1:20 AM · Restricted Project, Restricted Project
Kale updated the diff for D124816: [LibTooling] use ToolFileManager to store file managers for each CWD.
  1. Use BaseFS as the condition to judge whether to invalidate previous file managers
  2. Use WorkingDir as a parameter for getOrCreateFileManager
May 18 2022, 1:18 AM · Restricted Project, Restricted Project, Restricted Project

May 14 2022

Kale added inline comments to D124816: [LibTooling] use ToolFileManager to store file managers for each CWD.
May 14 2022, 1:51 AM · Restricted Project, Restricted Project, Restricted Project

May 7 2022

Kale updated the diff for D124816: [LibTooling] use ToolFileManager to store file managers for each CWD.

Fix tests & runInvocation in clang-tools-extra.

May 7 2022, 12:25 AM · Restricted Project, Restricted Project, Restricted Project

May 6 2022

Kale retitled D124816: [LibTooling] use ToolFileManager to store file managers for each CWD from [Tooling] use different FileManager for each CWD to [LibTooling] use ToolFileManager to store file managers for each CWD.
May 6 2022, 11:51 PM · Restricted Project, Restricted Project, Restricted Project
Kale updated the diff for D124816: [LibTooling] use ToolFileManager to store file managers for each CWD.

Reimplement ToolFileManager as a container of filemanagers which ToolInvocation takes by parameter. Also invalidate all file managers when using FileManager::setVirtualFileSystem().

May 6 2022, 11:40 PM · Restricted Project, Restricted Project, Restricted Project
Kale added a comment to D124816: [LibTooling] use ToolFileManager to store file managers for each CWD.

Two high-level comments:

  • Making these functions virtual makes it harder to reason about possible implementations, but I don't think that's necessary for what you're doing here. Why not expose ToolFileManager as a container of filemanagers which ToolInvocation takes by parameter, then calls getOrCreateFileManager() on at time of need passing relevant arguments (e.g., CWD)?
    • This could also create/manage the relevant VFS instance, to which the FileManager is fundamentally tied. See also below.
  • I don't think this goes far enough. The FileManager keeps state for any accessed file, which can be wrong any time the VFS changes at all, not just if the CWD is different. E.g., different -ivfsoverlay options are passed, or someone is reading from an InMemoryFileSystem vs. from disk.
    • AFAICT, every call to FileManager::setVirtualFileSystem() is fundamentally unsound unless the new FS is equivalent to the old one or the filemanager hasn't been used yet.
May 6 2022, 12:01 AM · Restricted Project, Restricted Project, Restricted Project

May 5 2022

Kale updated the diff for D124816: [LibTooling] use ToolFileManager to store file managers for each CWD.

Format all overriding functions

May 5 2022, 7:32 AM · Restricted Project, Restricted Project, Restricted Project
Kale updated the diff for D124816: [LibTooling] use ToolFileManager to store file managers for each CWD.

Fix path in compile_commands.json for windows.

May 5 2022, 7:18 AM · Restricted Project, Restricted Project, Restricted Project

May 3 2022

Kale changed the visibility for D124816: [LibTooling] use ToolFileManager to store file managers for each CWD.
May 3 2022, 8:01 AM · Restricted Project, Restricted Project, Restricted Project
Kale retitled D124816: [LibTooling] use ToolFileManager to store file managers for each CWD from [Tooling] add ToolingFileManager to force using abs path to [Tooling] use different FileManager for each CWD.
May 3 2022, 7:57 AM · Restricted Project, Restricted Project, Restricted Project
Kale updated the diff for D124816: [LibTooling] use ToolFileManager to store file managers for each CWD.

Use different FileManager for each CWD instead. Also add a unit test.

May 3 2022, 7:56 AM · Restricted Project, Restricted Project, Restricted Project
Kale changed the visibility for D124816: [LibTooling] use ToolFileManager to store file managers for each CWD.
May 3 2022, 4:21 AM · Restricted Project, Restricted Project, Restricted Project

May 2 2022

Kale added reviewers for D124816: [LibTooling] use ToolFileManager to store file managers for each CWD: dexonsmith, klimek.
May 2 2022, 7:48 PM · Restricted Project, Restricted Project, Restricted Project
Kale requested review of D124816: [LibTooling] use ToolFileManager to store file managers for each CWD.
May 2 2022, 7:31 PM · Restricted Project, Restricted Project, Restricted Project
Kale updated Kale.
May 2 2022, 6:16 PM
Herald added a project to D92160: [clang] Fix wrong FDs are used for files with same name in Tooling: Restricted Project.

But it's possible we don't need this. If it's safe for us to update the tests and make FileManager::getFileRef always canonicalize to an absolute path, that would definitely be cleaner. FileManager::makeAbsolute can use whatever the FS's CWD is at the time of query... nice and clean.

May 2 2022, 4:51 AM · Restricted Project, Restricted Project