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 · 7 comments
Assignees
Labels
Milestone

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.

@zxuan99
Copy link

zxuan99 commented Nov 21, 2024

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?

@czoido
Copy link
Contributor

czoido commented Nov 21, 2024

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 czoido self-assigned this Nov 21, 2024
@czoido czoido added this to the 2.0.9 milestone Nov 21, 2024
@czoido
Copy link
Contributor

czoido commented Nov 21, 2024

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

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

No branches or pull requests

4 participants