Skip to content
This repository has been archived by the owner on Dec 14, 2021. It is now read-only.

Detect and report if the VS solution (project) isn't built #64

Open
PhilipOakley opened this issue Nov 27, 2019 · 2 comments
Open

Detect and report if the VS solution (project) isn't built #64

PhilipOakley opened this issue Nov 27, 2019 · 2 comments

Comments

@PhilipOakley
Copy link

In my first attempts at using Sourcetrail, I was creating the compilation database for the .sln version of git-for-windows direct from it's checkout. This succeeded, but I still had errors and unscanned entries when loading into Sourcetrail.

One of the recovery steps was to actually build the solution (sort of obvious, but not necessary for navigating the solution in VS..).

If possible, warn the user if the current solution isn't built. 😃

I'm expecting that the VS build actually generates extra information that is included in the compile_commands.json file, so it's worth warning folks who have forgotten or didn't realise...

@mlangkabel
Copy link
Contributor

Do you still have the old compile_commands.json that you generated before building lying around? If yes, are there any differences to the one that you generated after building?

@PhilipOakley
Copy link
Author

Do you still have the old compile_commands.json that you generated before building lying around? If yes, are there any differences to the one that you generated after building?

Unfortunately not. It got overwritten. It maybe that it was other factors that needed sorting that actually cured the problems. I guess you are expectating that if this was a cleanly loaded .sln file then the compilation (as far as the .json out put is concerned) is a no-op/no-change. Thus expecting that it's only if users edit the solution's properties that it would change...

However what I did notice in the VS solution and in the updated/rewritten compile_commands.json is the presence of the -D defines directives that needed to be manually processed and added to the Source group.

It does feel a little counter productive that these are not at least extracted in the 'one per line format' ready for the user to copy/paste (and edit) into the compiler directives dialog. It is a real big hassle to try and extract those directives (from the .json or .sln files, or preprocessor properties - all on one line!) and get them into shape (one per line) for pasting into the source group dialog.

I'll see if I can do a clean attempt, but its a bit fire fighting at the moment.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants