-
Notifications
You must be signed in to change notification settings - Fork 272
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
SourceKit-LSP seems to ignore CXXSettings.unsafeFlags
#609
Comments
rdar://98370922 |
It appears that we aren’t passing compiler arguments that are provided in |
I came across this issue and I'm wondering if it's also the cause for my issue. I'm trying to use a C library with Swift on Windows. Since the headers aren't installed in a global location, and The target now builds fine, but in the editor, I cannot click through to the definition of an imported C function, and the return types always show On macOS and Linux, this works fine, I'm assuming because it can find the headers through Is this the same issue, or should I open a new one? |
What version of swift are you using? Anything older the latest main snapshot would be too old for Windows at least. But, if it is the right version, then it should be the same issue. |
Ah sorry, I'm using the 5.7 release. |
Hi @mikolasstuchlik, sorry for only getting back to this now. I just tried reproducing the issue and was unable to. Here’s what I tried.
Are you still seeing the issue? If yes, could you attach a project that reproduces the issue for you? |
Hello @ahoppen. Unfortunately, I have forgot why I've run into this issue. I will look through my archive and let you know if I find something. |
I have read the original thread on the Forums. The issue was manifesting when I've attempted to manually include header files of locally built library I will need to build PCL again and I will let you know once I have results. |
Sorry for the delay on my side. This would have been a lot easier if I had gotten back to you earlier. I really appreciate that you’re giving it another try. |
I would like to let you know, that I've been on vacation last week. I will look at the issue next week. |
TL;DR I can confirm, that the issue no longer manifests on
I have cloned pcl 1.13.1. I have tried to clone, configure and edit https://github.com/mikolasstuchlik/RunPCL which is the same project, where I've observed the issue. The I consider this ticket solved. |
Great. Thanks for verifying. |
I have set up a simple project using hand-built C++ library.
I have added custom C++ header search paths outside of the Package directory using CXXSettings.unsafeFlags as follows:
but SourceKit-LSP ignores those include search paths. I have also tried to add those paths to the Swift Plugin for VSCode provided by SSWG, but this didn't work either.
@ahoppen asked me to try it out on the most recent DEVELOPMENT snapshot of the Swift Toolchain, but it didn't work either. On top of that, the
clangd
started to consume more and more cpu% and I was forced to kill it.This issue was discussed on https://forums.swift.org/t/sourcekit-lsp-seems-to-ignore-cxxsettings-unsafeflags/59503
The text was updated successfully, but these errors were encountered: