Closed rogerluan closed 3 years ago
I gave in and incorporated your solution @maxchuquimia because I realized I'll have to edit this struct to implement the support for Local Swift Packages. I just made a few aesthetic (Swifty) improvements to your solution, and fixed some functional issues with it 😊
Thanks! I had a look - seems it is very much cc1ae06 (thanks for [path]
, that makes things a lot nicer!).
Happy to merge, just one thing I'm not sure about - moving PackageDescription
to it's own file means it's sitting in the ShellTasks
directory (every other file relates to a command), so maybe we can pop it into a Models/
directory within there?
Once this is merged I'll rebase cc1ae06 and merge the contextual error handling and the .gitignore changes.
I was just manually testing your other PR on my work machine and I noticed that actually cc1ae06 and therefore this PR don't work there for some reason.. it seems the path-prefixing isn't needed on it! (but it is needed on my personal computer.. not sure what the difference is)
Notice the error context shows the absolute path repeated twice as a single path. I'll have to look into this further (will most likely be over the weekend), unless you have any ideas why SPM would behave differently?
Edit: My work machine has Swift 5.3.2 and my personal machine has Swift 5.4... will need to update the work machine carefully later
🤯 that's wild. I happen to run Swift 5.4 as well (Xcode 12.5.0). Perhaps that's why? 🤔
I attempted a fix but I couldn't test it. Could you check on your work's computer when you have the chance @maxchuquimia ? 🙏
🎉 Works on both machines, nice one!!
🤩 Awesome @maxchuquimia ! Thanks for checking! 😊
Description
This PR aims to solve the error
[main] The folder “checkouts” doesn’t exist.
without the need to allowing customization of the checkouts directory.Relates to #3
It's a simpler implementation alternative over https://github.com/maxchuquimia/xcgrapher/commit/cc1ae0651c3986cae24c12857640bf5210931583. Not sure which solution is better, or if they're really equivalent. Mine's a bit uglier, bug significantly simpler 😇The other is certainly more elegant and fixes the root source (i.e. in the struct's initializer, instead of at the only call site that uses the referred struct). I'm open to discuss which solution goes in.
I really like the the extra debugging (error tracing) capabilities that https://github.com/maxchuquimia/xcgrapher/commit/cc1ae0651c3986cae24c12857640bf5210931583 adds, though! It was quite painful to debug this issue without something like that. Looking forward to having those changes merged in soon! 😃
Cheers.