Skip to content

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

Merged
spytheman merged 2 commits into
vlang:masterfrom
ttytm:vpm/fix-windows-install-existent
Nov 4, 2023
Merged

spytheman merged 2 commits into
vlang:masterfrom
ttytm:vpm/fix-windows-install-existent

Conversation

@ttytm

@ttytm ttytm commented Nov 4, 2023 •

Copy link
Copy Markdown
Member

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

2 participants