yonaskolb / Mint

A package manager that installs and runs executable Swift packages
MIT License
2.25k stars 121 forks source link

Symlink Resource Artifacts #265

Open jagreenwood opened 1 year ago

jagreenwood commented 1 year ago

The PR seeks to address the issue outlined in #261. The issue being that resource artifacts such as bundles are not found, causing termination.

I've implemented a naive solution which is to create symlinks for resource artifacts when a package is installed, as noted as a workaround in SwiftGen/SwiftGen#905. I'm also deleting the symlinks when packages are uninstalled.

I acknowledge there could be concern about namespace collisions, however I see this as an extreme edge case and the same collisions would exist with the executable target, unless I'm missing something.

Please let me know if any improvements could be made to help get this merged.

yaroslavyaroslav commented 9 months ago

@yonaskolb any update about this being merged?

jagreenwood commented 9 months ago

btw I found an issue with the implementation where the symlink is not updated when a package is upgraded. I'll get a fix for that soon.

yaroslavyaroslav commented 9 months ago

@jagreenwood that would awesome, at least some of us could use it as one used Carthage util while it were broken on the main repo for an about a year.

jagreenwood commented 9 months ago

@yaroslavyaroslav ok the upgrade bug should be fixed.

Also since this hasn't been merged, I've been using the changes on this branch with.

mint install jagreenwood/Mint@bugfix/artifact-symlink

Give it a try in the meantime if you'd like.

yaroslavyaroslav commented 9 months ago

@jagreenwood Thanks a lot! It works well on my side, just required to do some uninstall/install hassle with corrupted packages and mint itself to make it work with your branch, but after that — everything gone smoothly.

alexfanatics commented 4 months ago

Is there a plan to merge this? We're seeing the same issue.