Skip to content

Swift extension takes over C++ files in a CMake/C++ project #491

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

Closed
H-G-Hristov opened this issue Feb 11, 2023 · 6 comments
Closed

Swift extension takes over C++ files in a CMake/C++ project #491

H-G-Hristov opened this issue Feb 11, 2023 · 6 comments

Comments

@H-G-Hristov
Copy link

Type: Bug

I don't know if its this extensions fault but I am experiencing the issue as reported here:
microsoft/vscode-cpptools#10461 (comment)

With the Swift extension enabled it apperas that C++ files are getting Swift features.

Extension version: 1.0.0
VS Code version: Code 1.75.1 (Universal) (441438abd1ac652551dbe4d408dfcec8a499b8bf, 2023-02-08T21:34:59.000Z)
OS version: Darwin arm64 22.2.0
Modes:
Sandboxed: No

System Info
Item Value
CPUs Apple M1 Pro (8 x 24)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Load (avg) 2, 2, 2
Memory (System) 16.00GB (0.15GB free)
Process Argv --crash-reporter-id a7eaff19-94ae-4653-b917-d9aaab19da5d
Screen Reader no
VM 0%
A/B Experiments
vsliv368:30146709
vsreu685:30147344
python383cf:30185419
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vsclangdc:30486549
c4g48928:30535728
dsvsc012cf:30540253
azure-dev_surveyone:30548225
vsccc:30610678
pyindex848:30577860
nodejswelcome1cf:30587006
3biah626:30602489
pyind779cf:30657577
89544117:30613380
pythonsymbol12cf:30657549
a9j8j154:30646983
vsccsb:30659829

@adam-fowler
Copy link
Contributor

The vscode-swift lsp server SourceKit-LSP does provide functionality for both Swift, C and C++. Is this clashing with the C++ extension?

What is the difference between the rendered docs with the swift extension enabled and disabled?

@H-G-Hristov
Copy link
Author

H-G-Hristov commented Feb 14, 2023

The vscode-swift lsp server SourceKit-LSP does provide functionality for both Swift, C and C++. Is this clashing with the C++ extension?

What is the difference between the rendered docs with the swift extension enabled and disabled?

Yes, it appears to be the case. Please check my report here: microsoft/vscode-cpptools#10461
Particularly this comment: microsoft/vscode-cpptools#10461 (comment)

When I disabled the Swift extension everything went back to normal.

As I am using both C++ and Swift/Objective-C in the same project. I would really like that both extension behave and cooperated properly.
My current project is using CMake for C++ in the root folder, and then in subfolder there are Package.swift, Xcode project, etc. This structure cannot be changed.
At the moment some C++ code is built as a library for the Swift Xcode project (which contains also Package.swift) but in the future there may/will be also Swift/Objective-C code built as a library for the C++ executables.

@H-G-Hristov
Copy link
Author

Maybe with https://code.visualstudio.com/updates/v1_75#_profiles I can work around this issue.

@adam-fowler
Copy link
Contributor

#493 should resolve this for you

@H-G-Hristov
Copy link
Author

@adam-fowler Thank you for the quick reaction and your work!

@adam-fowler
Copy link
Contributor

In release 1.1

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

No branches or pull requests

2 participants