spago icon indicating copy to clipboard operation
spago copied to clipboard

Handle absolute config paths

Open elliotdavies opened this issue 5 years ago • 6 comments

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 😊

elliotdavies avatar Nov 18 '19 18:11 elliotdavies

Update: it looks something is up with the Windows tests

f-f avatar Nov 18 '19 19:11 f-f

@f-f Oh of course, because of the absolute paths on Windows... 🙈 I guess we'll have to do without for now?

elliotdavies avatar Nov 18 '19 20:11 elliotdavies

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 avatar Nov 19 '19 10:11 elliotdavies

@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

f-f avatar Nov 19 '19 12:11 f-f

(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.)

elliotdavies avatar Nov 28 '19 17:11 elliotdavies

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.

toastal avatar Aug 20 '21 13:08 toastal