[PATCH] D54077: [clangd] Implemented DraftFileSystem

2018-11-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In https://reviews.llvm.org/D54077#1288455, @LutsenkoDanil wrote: > I already made a patch which introduces such behavior (not uploaded here > yet), and looks like it works well with draft fs: diagnostics updates for > depended files in 'real-time' on typing for opene

[PATCH] D54077: [clangd] Implemented DraftFileSystem

2018-11-06 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D54077#1287289, @klimek wrote: > don't most IDEs show whether a file is saved or just modified? They do, but whenever you run the build from them, they will save all modified files before actually running it. In https://reviews.llvm.o

[PATCH] D54077: [clangd] Implemented DraftFileSystem

2018-11-06 Thread Lutsenko Danil via Phabricator via cfe-commits
LutsenkoDanil added a comment. @sammccall Thank you for detailed explanation! In https://reviews.llvm.org/D54077#1288387, @sammccall wrote: > Someone mentioned to me that the interaction-between-features argument wasn't > clear here: > > - we **don't** currently update diagnostics for `A.cc` wh

[PATCH] D54077: [clangd] Implemented DraftFileSystem

2018-11-06 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. In https://reviews.llvm.org/D54077#1288413, @nik wrote: > If it helps (and the LSP allows it): In case A.h is edited, we flag it dirty. > If the user makes some file depending on it visible (or the current file), we > trigger a reparse for that. Not sure whether the LSP has

[PATCH] D54077: [clangd] Implemented DraftFileSystem

2018-11-06 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. In https://reviews.llvm.org/D54077#1288404, @ioeric wrote: > I would be very happy if `A.cc` can see the unsaved `A.h` when I am editing > `A.cc`. We have that in Qt Creator (with libclang) and that's quite handy as it can save you some build cycles. > Not sure if I want

[PATCH] D54077: [clangd] Implemented DraftFileSystem

2018-11-06 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D54077#1288404, @ioeric wrote: > In https://reviews.llvm.org/D54077#1288387, @sammccall wrote: > > > Someone mentioned to me that the interaction-between-features argument > > wasn't clear here: > > > > - we **don't** currently update diagnosti

[PATCH] D54077: [clangd] Implemented DraftFileSystem

2018-11-06 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. In https://reviews.llvm.org/D54077#1288387, @sammccall wrote: > Someone mentioned to me that the interaction-between-features argument wasn't > clear here: > > - we **don't** currently update diagnostics for `A.cc` when `A.h` is edited > - we should, this seems more obvio

[PATCH] D54077: [clangd] Implemented DraftFileSystem

2018-11-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Someone mentioned to me that the interaction-between-features argument wasn't clear here: - we **don't** currently update diagnostics for `A.cc` when `A.h` is edited - we should, this seems more obvious & important than what we do with drafts - this interacts badly wit

[PATCH] D54077: [clangd] Implemented DraftFileSystem

2018-11-06 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. I don't think either point 1 or 2 above have been addressed, and so I'm not comfortable moving forward with this change. > I think it would be reasonable to say that a large portion of C++ users are > used to the behavior that this patch introduces. I agree, the new

[PATCH] D54077: [clangd] Implemented DraftFileSystem

2018-11-05 Thread Simon Marchi via Phabricator via cfe-commits
simark added a comment. In https://reviews.llvm.org/D54077#1287153, @klimek wrote: > I'm in yet another camp: I carefully save when I have something that is > correct enough syntax, so I only want errors from with changes from the exact > file I'm editing and the rest of the files in saved stat

[PATCH] D54077: [clangd] Implemented DraftFileSystem

2018-11-05 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D54077#1287282, @LutsenkoDanil wrote: > @klimek If behavior will be configurable, is it ok for you? I have the same concerns as Sam for making this an option. > @sammccall Current behavior may confuse new users, since, other IDEs mostly > (a

[PATCH] D54077: [clangd] Implemented DraftFileSystem

2018-11-05 Thread Lutsenko Danil via Phabricator via cfe-commits
LutsenkoDanil planned changes to this revision. LutsenkoDanil added a comment. @ilya-biryukov, For example, VSCode saves all changed files by default when you press Ctrl+Shift+B (if build task configured for project). @klimek If behavior will be configurable, is it ok for you? @sammccall Curren

Re: [PATCH] D54077: [clangd] Implemented DraftFileSystem

2018-11-05 Thread Sam McCall via cfe-commits
On Mon, Nov 5, 2018, 13:58 Ilya Biryukov via Phabricator < revi...@reviews.llvm.org wrote: > ilya-biryukov added a comment. > > > There's the usual concern that the current behavior is reasonable and > people like it. > > I think it would be reasonable to say that a large portion of C++ users > ar

[PATCH] D54077: [clangd] Implemented DraftFileSystem

2018-11-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. > There's the usual concern that the current behavior is reasonable and people > like it. I think it would be reasonable to say that a large portion of C++ users are used to the behavior that this patch introduces. Specifically, all IDEs (Clion, Eclipse, Visual St

Re: [PATCH] D54077: [clangd] Implemented DraftFileSystem

2018-11-05 Thread Sam McCall via cfe-commits
Disclaimer: I'm on a train with family today, and haven't actually read the patch... So I have concerns :-) 1. There's the usual concern that the current behavior is reasonable and people like it, so adding a second reasonable behavior provides a small amount of value to the userbase as a whole (

[PATCH] D54077: [clangd] Implemented DraftFileSystem

2018-11-05 Thread Sam McCall via Phabricator via cfe-commits
sammccall added subscribers: ilya-biryukov, LutsenkoDanil. sammccall added a comment. Disclaimer: I'm on a train with family today, and haven't actually read the patch... So I have concerns :-) 1. There's the usual concern that the current behavior is reasonable and people like it, so adding a

[PATCH] D54077: [clangd] Implemented DraftFileSystem

2018-11-05 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added a comment. In https://reviews.llvm.org/D54077#1287040, @ilya-biryukov wrote: > Thanks for the patch! I believe many people I talked to want this behavior > (myself included). > Some people like what we do now more. It feels like it depends on the > workflow: for people who auto-sa

[PATCH] D54077: [clangd] Implemented DraftFileSystem

2018-11-05 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added subscribers: simark, klimek. ilya-biryukov added a comment. Thanks for the patch! I believe many people I talked to want this behavior (myself included). Some people like what we do now more. It feels like it depends on the workflow: for people who auto-save *all* files befo

[PATCH] D54077: [clangd] Implemented DraftFileSystem

2018-11-03 Thread Lutsenko Danil via Phabricator via cfe-commits
LutsenkoDanil created this revision. LutsenkoDanil added reviewers: sammccall, ilya-biryukov. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ioeric. Patch changes behavior of preamble building. If headers was changed in editor, preamble will be built with draft vers