Skip to content

ClangdCProjectDescriptionListener doesn't respond to build configuration changes of CMake projects #435

Open
@jonahgraham

Description

@jonahgraham

In eclipse-cdt/cdt#1084 a fix was introduced to stop using "default" as the build folder, which was basically used when CDT couldn't figure out what the user actually asked for.

This change works fine, but it exposed that ClangdConfigurationFileManager is not updating .clangds CompilationDatabase path when the Core Build (CMake) active config changes. AFAICT This is because the ClangdCProjectDescriptionListener is not listening to sufficient events to see the change.

To reproduce (without eclipse-cdt/cdt#1084 applied)

  • Create CMake project
  • Immediately change (before first build) launch mode in launchbar from Run to Debug Image

Notice how .clangd continues to have CompilationDatabase: build/default and that some indexing isn't working

@betamaxbandit identified this, so he may be able to provide a more complete description

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions