-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation database support - clang, gcc, mingw #32848
Compilation database support - clang, gcc, mingw #32848
Conversation
229db45
to
628f8c2
Compare
Python 2.7 justification for upgrade:
Scons would not build without this update with the compilation db on windows, due to a bug they have not fixed. Simplifies osx path code. Updated platform install to use sudo to install scons to prevent us having to modify path. Since the VM image is thrown away this doesn't matter. |
I have tested it on macOS (10.14.6) with CLion (2019.2.4). While testing I found one issue, Objective-C files found in /platform/osx are not recorded to the compilation database. I was able to fix it (quick and dirty) by adding P.S. Thank you @RevoluPowered and @fire for making this PR. I am incredibly grateful, happy, and overall ecstatic to have this. |
I have tested it on macOS (10.14.6) with VSCode. VSCode detected the However, same Objective-C issues as explained in #32848 (comment). Side Note: I do not know if the generated |
Hello, I will update the PR tomorrow as we are all returning from GodotCon Thanks everyone for testing I will merge the objective c support too :) |
887b8ab
to
90a1b61
Compare
not got access to apple hw, will delay this until tomorrow |
1c10fe9
to
f0ea6c7
Compare
@IAmActuallyCthulhu updated the suffixes properly so should be platform agnostic now Adding the method to the cxxsuffix as requested would have broken it on windows, so I have made it retrieve this directly from scons, on osx it will make it available and linux, but on windows it will not as this made appveyor break. |
251b4e4
to
6225d69
Compare
Doesn't seem to work on Windows, VS2017, Python 3.6.4, Scons v3.0.5.
It simply produces an empty array in
Same thing with |
This will only work with scons 3.1.1 the stable release |
vscode currently requires us to reload this compilation_db file manually, I think I can update the behaviour so that vscode just sees this as a file modification rather than the file being unreadable during write. temp solution is that you can just do Ctrl + Shift + P then run 'Reload window' after a build. This happens instantly on my computer so it's not a huge priority IMO. CLion has no issues with this which I can see. |
Hi RevoluPowered! I also wanted to suggest adding "compile_commands.json" to the .gitignore file for the project as well. That wouldn't cause any unwanted side effects, would it? |
Good suggestion I will test this and see what happens |
I have the same issue as Xrayez. I am using Windows 10 and I have scons version 3.1.1 installed. The compilation database just contains an empty array. |
Thanks for all your work :) I plan on running MinGW periodically to update my compilation database in the meantime. |
Ach, can only take a minor part of credit, was team effort between @fire and I :) also, acmarrow from mongodb :) and mongodb themselves |
e737ace
to
11ccf96
Compare
This tool is originally from mongodb. - Updated CPPSUFFIXES to use scons suffixes - objective-c files will also be loaded into the compilation database where the compiler / tooling is available to compile the files. Known limitations: - This will not work with msvc as your compiler.
11ccf96
to
5a6f275
Compare
Force pushed an amend that fixes Python style issues (we now use |
Thanks! |
Thanks for your help merging I had little time to pull away from FBX. That's great I am so happy, I use this regularly! <3 |
Getting the following error after this merge:
Tested with both pip version:
and distro version:
|
@Faless The backtrace is from your distro version ( |
We should likely increase |
@akien-mga right, my bash alias tricked me -.- . It works with the pip version, so yeah, |
There's a builtin `toolpath` option we can use for that, so no need to hack around a custom `scons_site` path. The script requires SCons 3.1.1 or later, so we enable it conditionally. Follow-up to godotengine#32848.
Cherry-picked for 3.2.2. (Together with #38830 to fix build on older SCons versions.) |
There's a builtin `toolpath` option we can use for that, so no need to hack around a custom `scons_site` path. The script requires SCons 3.1.1 or later, so we enable it conditionally. Follow-up to godotengine#32848. (cherry picked from commit 22c718a)
There's a builtin `toolpath` option we can use for that, so no need to hack around a custom `scons_site` path. The script requires SCons 3.1.1 or later, so we enable it conditionally. Follow-up to godotengine#32848. (cherry picked from commit 22c718a)
This file is from mongodb and the tooling Automatically generates the compilation database across all platforms.
Thanks to acmarrow for a simple solution
SCons/scons#3355
For the uninitiated this supports IDE symbol lookup, refactoring tools, documentation tools:
This means we can support intelisense style technologies with reliable type lookup.
For example:
Known issue:
Co-authored-by: K. S. Ernest (iFire) Lee [email protected]