Skip to content
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

Notification errors after re-configuration. #587

Closed
sialiuk opened this issue Nov 22, 2018 · 17 comments · Fixed by #1169
Closed

Notification errors after re-configuration. #587

sialiuk opened this issue Nov 22, 2018 · 17 comments · Fixed by #1169
Labels
bug a bug in the product Feature: Project Outline View fixed (release pending) fixed in pre-release and is pending official release
Milestone

Comments

@sialiuk
Copy link

sialiuk commented Nov 22, 2018

  • Extension Name: cmake-tools
  • Extension Version: 1.1.2
  • OS Version: Windows_NT x64 10.0.17134
  • VSCode version: 1.29.1

Every time when I re-configure my project, I get the next error notifications from VS Code:

"Element with id ::.::Target1 is already registered"
"Element with id ::.::Target2 is already registered"

and other, when Target1 and Target2 are names of targets from Cmake.

@vector-of-bool
Copy link
Contributor

This looks to be an issue with the project outline tree view. Do you have a sample project I can look at?

@vector-of-bool vector-of-bool added bug a bug in the product more info needed More info is needed from the community for us to properly triage and investigate. labels Nov 23, 2018
@vector-of-bool vector-of-bool added this to the Backlog milestone Nov 23, 2018
@liflovs
Copy link

liflovs commented Nov 26, 2018

Have same issue

@sialiuk
Copy link
Author

sialiuk commented Nov 29, 2018

This looks to be an issue with the project outline tree view.
Yes, after I had disabled the project outline tree view, error notifications haven't shown.

Do you have a sample project I can look at?
Sorry, but I can't provide it.

@vector-of-bool
Copy link
Contributor

@lflserg Do you have a minimal project that can reproduce the issue? I know the line and error that is being hit, but I can't mentally model how it executes. I'll need to debug into it.

@liflovs
Copy link

liflovs commented Dec 3, 2018

@vector-of-bool project I am trying it on is huge closed source so i cant share it, sorry

@rtbo
Copy link
Contributor

rtbo commented Mar 2, 2019

Have the same issue with a project (declaring project() in CMakeLists.txt) used as submodule in another project with add_subdirectory(... EXCLUDE_FROM_ALL)

@rtbo
Copy link
Contributor

rtbo commented Mar 3, 2019

bug can be triggered with this repo:
https://github.com/rtbo/vscode-cmake-tools587

(don't forget to git submodule update --init)

@wridhdhi
Copy link

wridhdhi commented Jul 4, 2019

Even I face the same issue with a big project,
I hit configure -> it configures part of the targets , shows them in the right pane and shows this error.
but it shows configuring done , and build files have been written also,

also, configuring it manually on bash by cmake .. does configure it properly, so the issue is with parsing the targets by the extension I guess.
issue_cmake

@MBetters
Copy link

MBetters commented Jul 8, 2019

I'm getting the same issue :/

@bobbrow bobbrow added Feature: Project Outline View and removed more info needed More info is needed from the community for us to properly triage and investigate. labels Jul 22, 2019
@ph03
Copy link

ph03 commented Aug 12, 2019

Same error here - I think this is related to similar named subfolders added via cmakes add_directory(subdirname) if subdirname is repeated for different but same named subdirectories in different places of the project tree. Perhaps these internal elements can be prefixed with their "full" project tree path inside the extension to make them unique again?

@escherstair
Copy link

escherstair commented Mar 31, 2020

same issue here;
it depends on multiple folders with same name in the cmake tree

@SchweizS
Copy link
Contributor

I was able to fix duplicate directory structure and duplicate project names. (#1169)

There is still one issue, which causes this bug:

project->dir->target->dir
if a target is defined in a subdirectory of a project and has sources in directories, the view breaks.

Example

  • root
    • CMakeLists.txt (1)
      • sub
        • CMakeLists.txt (2)
          • src/src.cpp

CMakeLists.txt (1):

cmake_minimum_required (VERSION 3.0)
project ("base")
add_subdirectory(sub)

CMakeLists.txt (2):


add_library(test src/src.cpp)

@bobbrow bobbrow added the fixed (release pending) fixed in pre-release and is pending official release label Apr 16, 2020
@bobbrow bobbrow modified the milestones: On Deck, 1.4.0 Apr 16, 2020
@bobbrow bobbrow reopened this Apr 17, 2020
@bobbrow
Copy link
Member

bobbrow commented Apr 17, 2020

Leaving this issue open until we release the fix.

@andreeis
Copy link
Contributor

CMake Tools 1.4.0 Beta is available on GitHub.
https://github.com/microsoft/vscode-cmake-tools/releases/tag/1.4.0-beta

Please try it out and let us know if you encounter any issues
.

@andreeis
Copy link
Contributor

andreeis commented May 20, 2020

This fix is available in CMake Tools 1.4.0 which has been released.

@hotman-x
Copy link

This fix is available in CMake Tools #1.4.0 which has been released.

But I get this error with CMake Tools 1.4.1.

@bobbrow
Copy link
Member

bobbrow commented Aug 28, 2020

@hotman-x can you please open a new issue with details about the problem you are having?

@github-actions github-actions bot locked and limited conversation to collaborators Jan 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug a bug in the product Feature: Project Outline View fixed (release pending) fixed in pre-release and is pending official release
Projects
None yet
Development

Successfully merging a pull request may close this issue.