conan-vs-extension icon indicating copy to clipboard operation
conan-vs-extension copied to clipboard

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

Open Jeanmilost opened this issue 1 year ago • 4 comments
trafficstars

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:

https://github.com/conan-io/conan-vs-extension/assets/22838173/e36db111-49fd-4ca2-a44e-7acc8db25dd9

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

Can you fix that please?

Jeanmilost avatar Jun 14 '24 14:06 Jeanmilost

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.

memsharded avatar Jun 14 '24 17:06 memsharded

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

Jeanmilost avatar Jun 14 '24 17:06 Jeanmilost

=> 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.

memsharded avatar Jun 14 '24 17:06 memsharded

@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.

Jeanmilost avatar Jun 14 '24 17:06 Jeanmilost

Hello, I faced this issue too. In addition, I have also faced another issue in which there are some instances that removing a library cause the whole Visual Studio to restart.

May I ask if it will be resolved in the next extension update?

zxuan99 avatar Nov 21 '24 00:11 zxuan99

Hello, I faced this issue too. In addition, I have also faced another issue in which there are some instances that removing a library cause the whole Visual Studio to restart.

May I ask if it will be resolved in the next extension update?

Hi @zxuan99,

Thanks a lot for reporting, is that restart reproducible in some way? Do you have some guidance on what we can do to reproduce the problem?

czoido avatar Nov 21 '24 05:11 czoido

Also @zxuan99, please make sure that you are using the latest version of the extension (2.0.8)

czoido avatar Nov 21 '24 06:11 czoido