<div dir="ltr">On Wed, Aug 14, 2013 at 2:10 AM, Kim Gräsman <span dir="ltr"><<a href="mailto:kim.grasman@gmail.com" target="_blank">kim.grasman@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Wed, Aug 14, 2013 at 11:00 AM, Chandler Carruth <<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>> wrote:<br>

><br>
> On Wed, Aug 14, 2013 at 1:57 AM, Kim Gräsman <<a href="mailto:kim.grasman@gmail.com">kim.grasman@gmail.com</a>> wrote:<br>
>><br>
</div><div class="im">>> I'd prefer to parse the VS project files and spit out a compilation<br>
>> database. They are plain XML and as of VS2010 (I think) supposed to be<br>
>> backward compatible, so it's a stable format.<br>
><br>
> My problem with this is that it adds an extra step every time the project<br>
> file changes. If you forget it, your tool begins to misbehave in potentially<br>
> surprising ways.<br>
><br>
> Maybe you could make the logic involve parsing and spitting out, but<br>
> embedding it into a plugin that gets notified when VS sees the project file<br>
> change? (I clearly have no idea how this stuff works...)<br>
<br>
</div>I see your concern. Yeah, it could probably be driven from a plug-in<br>
of some kind, I don't know the details either. It thought it was messy<br>
when I looked at it last a few years ago :-)<br>
<br>
Isn't it just a dependency problem, though? If the modified time of<br>
any vcxproj > the modified time of compile_commands.json it needs to<br>
be regenerated? That way it would pick up changes that happen outside<br>
of Visual Studio, e.g. a version control update, manual edit,<br>
generated projects.<br>
<br>
Actually, I started digging into Tooling yesterday, and maybe<br>
compile_commands.json doesn't even need to be saved out. What if there<br>
was code in Tooling to transform a Visual Studio solution into a<br>
CompilationDatabase implementation? It would take longer to parse,<br>
probably, but it should be a pretty direct translation.<br></blockquote><div><br></div><div>I think that'd be basically the same as some IPC solution (and probably better, as msbuild seems pretty well defined / stable these days). Patches for a CompilationDatabase implementation that just reads from msbuild would be super-welcome :D</div>
</div></div></div>