spago
spago copied to clipboard
Handle absolute config paths
Description of the change
Replaces #485 as a fix for #472, and tidies up a few things.
Fix #472
Checklist:
- [x] Added the change to the "Unreleased" section of the changelog
- [ ] ~Added some example of the new feature to the
README
~ - [x] Added a test for the contribution (if applicable)
P.S.: the above checks are not compulsory to get a change merged, so you may skip them. However, taking care of them will result in less work for the maintainers and will be much appreciated 😊
Update: it looks something is up with the Windows tests
@f-f Oh of course, because of the absolute paths on Windows... 🙈 I guess we'll have to do without for now?
The tests are continuing to fail on Windows because I switched to using Dhall.Import.localToPath
which returns an OS-specific path, but our test fixtures hard-code the Unix versions. @f-f do you know if it would be difficult to use a different text fixture on Windows, or something similar?
@elliotdavies yes, we can case
on the OS, as we do already e.g. here:
https://github.com/spacchetti/spago/blob/a4679880402ead320f8be2f091b25d30e27b62df/src/Spago/Bower.hs#L142-L146
(I'm kind of blocked on this without a Windows machine of my own to test on. The fixtures certainly need updating but some of the other tests are failing too and I'm not certain why.)
Any updates on this? I want to use process substitution to create files on the fly, but I can't because of the .//tmp/absolute/directiory/spago.dhall
issue.