<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="text-align:left; direction:ltr;">
<div>On Mon, 2019-03-11 at 02:13 +0000, Nathan Ridge via clangd-dev wrote:</div>
<blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">
<pre><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"></blockquote></pre>
<pre><blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"></blockquote></pre>
<pre>Out of curiosity, though - if a client wanted to send all the CDBs upfront, to avoid the </pre>
<pre>requirement that you have to open a file from each project, would that be a reasonable </pre>
<pre>capability to add?</pre>
<pre></pre>
<pre>That seems doable. The way this currently works is:</pre>
<pre> - A CDB is "discovered" the first time we try to get the command for a file under its directory</pre>
<pre> - once a CDB is "discovered", the auto-index loads any index shards that exist for the CDB, </pre>
<pre>and starts indexing files that don't have an up-to-date shard</pre>
<pre>So we could add a custom command or a startup option to make clangd discover particular </pre>
<pre>CDBs (e.g. by looking for a compile command for dir/dummy.txt, and then throwing it away).</pre>
<pre></pre>
<pre><br></pre>
<pre>It has since come to my attention that the LSP has recently gained a new workspace/workspaceFolders request [1], which is a mechanism for the server to learn about multiple root folders in the workspace, for editors that support such things. This request is not currently implemented in clangd.</pre>
<pre><br></pre>
<pre>Do you think this would be a good fit for telling the server about multiple CDBs as well? We could implement this request, and as an extension, support an additional field in the WorkspaceFolder struct to specify the CDB path.</pre>
</blockquote>
<div><br>
</div>
<div>Hey Nate, just wondering how this would work in VS Code. I assume it already would send this message. I'm not sure we can override it to send the additional field. Would adding a separate request be more flexible?</div>
<div><br>
</div>
<blockquote type="cite" style="margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex">
<pre><br></pre>
<pre>Thanks,</pre>
<pre>Nate</pre>
<pre><br></pre>
<pre>[1] <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__microsoft.github.io_language-2Dserver-2Dprotocol_specification-23workspace-5FworkspaceFolders&d=DwIGaQ&c=yzoHOc_ZK-sxl-kfGNSEvlJYanssXN3q-lhj0sp26wE&r=NrrbvTHWa2Nbp_kAN0Hl1o3lM1WAwSes64uBjxjNhMc&m=3UUNsFK6ghiKTGux3Z82wzvtaN9kYaR6wH0VEXZR9IE&s=1tNBKXqGFUvcojx6wHOTOiDmJVswMHM9mDkgQ0N75mE&e=">https://urldefense.proofpoint.com/v2/url?u=https-3A__microsoft.github.io_language-2Dserver-2Dprotocol_specification-23workspace-5FworkspaceFolders&d=DwIGaQ&c=yzoHOc_ZK-sxl-kfGNSEvlJYanssXN3q-lhj0sp26wE&r=NrrbvTHWa2Nbp_kAN0Hl1o3lM1WAwSes64uBjxjNhMc&m=3UUNsFK6ghiKTGux3Z82wzvtaN9kYaR6wH0VEXZR9IE&s=1tNBKXqGFUvcojx6wHOTOiDmJVswMHM9mDkgQ0N75mE&e=</a></pre>
<pre>_______________________________________________</pre>
<pre>clangd-dev mailing list</pre>
<pre><a href="mailto:clangd-dev@lists.llvm.org">clangd-dev@lists.llvm.org</a></pre>
<pre><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_clangd-2Ddev&d=DwIGaQ&c=yzoHOc_ZK-sxl-kfGNSEvlJYanssXN3q-lhj0sp26wE&r=NrrbvTHWa2Nbp_kAN0Hl1o3lM1WAwSes64uBjxjNhMc&m=3UUNsFK6ghiKTGux3Z82wzvtaN9kYaR6wH0VEXZR9IE&s=B09jAJpVj5zXbw1qTsc1epKbC_60W6aAmXg3I6bF0y8&e=">https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_clangd-2Ddev&d=DwIGaQ&c=yzoHOc_ZK-sxl-kfGNSEvlJYanssXN3q-lhj0sp26wE&r=NrrbvTHWa2Nbp_kAN0Hl1o3lM1WAwSes64uBjxjNhMc&m=3UUNsFK6ghiKTGux3Z82wzvtaN9kYaR6wH0VEXZR9IE&s=B09jAJpVj5zXbw1qTsc1epKbC_60W6aAmXg3I6bF0y8&e=</a></pre>
<pre><br></pre>
</blockquote>
</body>
</html>