vs-sourcetrail
vs-sourcetrail copied to clipboard
freeze during generation
I'm working on a relatively large project and I want to generate a compile_commands.json for it. At some point I was able to (at least I have a compile_commands.json that starts and ends with a [ ] pair) and the generate file is about 68 MiB. It did take several attempts, but eventually I got it.
Now I'm trying to refresh that file and the plugin seems to just freeze. Sometimes I won't get any status bar advancement (I left it overnight and it didn't move, output is 2 bytes), some other times it moves up to a point but then stops there. I've been trying for several days now, leaving it running overnight and throughout the da, it's just not working. Can someone help with this please?
Hello, can I get some support on this please?
I have this as well.
Hey, what does the plugin's log say? You can enable it by clicking Tools -> Options -> Sourcetrail and set "File Logging" to "True". With that you can choose "Sourcetrail Log" in your "Output" window.
@mlangkabel, a perfectly fair question.
My log never has anything in it. The plugin spins, doesn't produce anything, and never writes anything to the log.
I tried letting it run overnight, and till got nothing.
I tried applying it to a very small part of the same solution (only one project). In that case, it did produce something but, as I recall (I didn't take careful notes in this case), it was still wedged and the stuff I got wasn't usable.
Based on these observations, I think this is a problem of scale -- that is, the plugin can't handle very large solutions in a practical way.
Perhaps if the plug-in offered some more-detailed logging, we could send back interesting information.
The log should already state, what projects are processed by the extension when generating the compilation database, or if projects are skipped. It also logs for each source file that it finds in your projects whether or not ir generated a compile command for it. I think that should be a good start. If you don't want to or cannot share any more details here, you can always checkout the repo and change/build the extension on your own. It should be quite simple to build and run in VS.
This lockup appears to be caused by the presence of solution folders. Try making an alternate solution file with the same projects that does not use any solution folders.
Fair enough - it's good to have a clear cause.
The solution we're using at my company is large and constructed automatically. This plugin will remain unhelpful for me until it's improved to comprehend solution folders.
Oh, that's interesting. Can you post the steps to create a minimal solution with those solution folders that would cause such a freeze?
If it helps I found that this works for me:
- start the plugin and wait for it to freeze
- close the progress bar window but don't quit visual - you can keep using it tho
- don't try to start the plugin again!
- keep doing
ls -hl
on the output compile_commands file, its size should now be growing - when the compile_commands stops growing the process is likely completed successfully
- you can now close visual if you want
@KingDuckZ Thanks! That works for me!
P.S.: We have a dozen of projects, in some solution folders.
FYI https://clangpowertools.com offers a Visual Studio extension that can create a compilation database. This is the only thing I've found that is a reasonable alternative.
I'm on windows 10 using visual studio 2019 and have the same problem. Closing the "Creating Compilation Data Base" window did help me and seem to unfreeze the creation. When the file is fully created, the window showing that the creation is finished shows as if nothing bad happened. Thanks @KingDuckZ (: