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

Wally should not outright nuke the Packages folder if it already exists #161

Open
nakoyasha opened this issue Jun 17, 2023 · 3 comments
Open

Comments

@nakoyasha
Copy link

... or it should at least give a warning with a confirm prompt before doing so.

This causes issues if you were using the folder for submodules. They enter a state where they cannot be neither re-added or removed (unless you use the --force flag)

@LastTalon
Copy link
Contributor

If your submodules are set up correctly you should just have to re-initialize them.

This is something easier said than done to add. Modifying the Packages folder is expected during normal operation of wally install. This means that if you have no packages in your manifest (or lockfile) it's expected to be removing them; that's how it's meant to work. Think about it like this: If you had previously been using wally and installed some packages, but now you remove them from your manifest's dependencies, you'd expect wally to get rid of them. And that's exactly what it did to your submodules.

The warning issue a similar one. It would be incredibly inconvenient to use if it warned you about changing the installed packages every time you add or remove packages. That's what you were trying to do and now it's warning you during normal operation.

@LastTalon
Copy link
Contributor

Perhaps as a sort of compromise the wally init command could scan for the dependency folders and warn if they appear to be in use?

@magnalite
Copy link
Member

Yeah I like the idea of wally init warning if it sees any package folders already in use, it's an easy QoL win. Unfortunately wally does need control over the package folders in their entirety. Nothing other than wally should ever be touching them and we don't intend to support that. If use cases need to reach in and change things then we need to support those use cases via wally doing it so it is aware of them.

We can instead support this use case by allowing you to tell wally to name the packages folders differently but I'm not sure if this is a strong enough use case to push us to enable that yet. Moving submodules to another folder is easy, although I can appreciate it may be annoying.

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

3 participants