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

[Bug] Sometimes some libraries cannot be removed from the Package Manager #234

Open
Jeanmilost opened this issue Jun 14, 2024 · 4 comments

Comments

@Jeanmilost
Copy link

I'm facing a strange issue with the Package Manager in VS2022. Sometimes some libraries cannot be removed, e.g. the cryptopp one, as you can see in the below video:

Conan.Package.Manager.bug.mp4

Worst, a such library, once "removed", can be downgraded and added twice (i.e. with 2 different versions).

Can you fix that please?

@memsharded
Copy link
Member

Thanks for your report @Jeanmilost

I am trying to reproduce this, but I haven't been able so far, it seems to work fine.
Maybe you have modified the conandata.yml file on disk, and removed the # This file is managed by the Conan Visual Studio Extension, contents will be overwritten. first comment? Can you please check it?

In any case, I have detected some misbehaviors when removing that comment, it seems the processing of the comment is not correct:

  • The file is being overwritten even if I change the comments
  • The file might lose requirements if I add a new requirement while having modified the contents
  • I miss a windows message reporting that the requirement cannot be added/removed

I'll try to sync with the team and see if this can be improved.

@Jeanmilost
Copy link
Author

Jeanmilost commented Jun 14, 2024

Hello @memsharded

I am trying to reproduce this, but I haven't been able so far, it seems to work fine.

=> This happens only with some libraries on my computer, not with all. For example cryptopp has this issue on my side, but the other libraries haven't. Had you tried with this specific library?

Maybe you have modified the conandata.yml file on disk, and removed the # This file is managed by the Conan Visual Studio Extension, contents will be overwritten. first comment? Can you please check it?

=> No I haven't modified this file manually. The comments are still there.

For the specific bugs related to the conandata.yml file, I not tested them so I cannot confirm

@memsharded
Copy link
Member

=> This happens only with some libraries on my computer, not with all. For example cryptopp has this issue on my side, but the other libraries haven't. Had you tried with this specific library?

Yes, I have tried this one, but it worked. The thing is that the plugin only manages the addition of the library to the local conandata.yml, but nothing more. So all dependencies should be exactly the same, I cannot see a reason why some specific one wouldn't be removed from the file. A review of the file management might help, I think it might have some bugs, it could be connected.

@Jeanmilost
Copy link
Author

@memsharded This may be a random bug. Anyway it is possible to remove the incorrect item manually from the conandata.yml when this happens, so not critical. Perhaps fixing the other bugs may also resolve it by the way.

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