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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools.vpm: fix windows install of already existing module #19761

Merged
merged 2 commits into from Nov 4, 2023

Conversation

ttytm
Copy link
Member

@ttytm ttytm commented Nov 4, 2023

The permission issue with rmdir is actually a real problem on Windows. Currently, using v install for an already existent module can run into the permission issue not just during testing.

The issue causes that most contents of the directory of the module that should have been installed will be removed. In my tests, all except the .git directory - With this discovery it looks like the permission issue with rmdir_all on Windows might be related to hidden files. After this error it becomes impossible to install the module without manually removing it from the .vmodules directory, because vpm recognizes a .git directory and tries to unsuccessfully update it, which is also something that should be improved separately.

I think until the rmdir issue is fixed, this is an important workaround to make VPM work on Windows. That said, the rmdir issue should be addressed asap, because executing the system command for removal increases the likelihood of the V executable triggering Windows defender.

馃 Generated by Copilot at bccf63e

This pull request fixes a bug that prevented vpm from installing modules on Windows, and enables a previously skipped test for vpm install. The bug is fixed by using a different command to remove existing modules, and the test is updated to run on all platforms.

馃 Generated by Copilot at bccf63e

  • Fix bug where existing modules cannot be removed on Windows (link)
  • Enable test for module removal on Windows (link)

@spytheman spytheman merged commit c2a3eef into vlang:master Nov 4, 2023
42 of 43 checks passed
@ttytm ttytm deleted the vpm/fix-windows-install-existent branch November 13, 2023 14:45
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

Successfully merging this pull request may close these issues.

None yet

2 participants