Commit Graph

14 Commits

Author SHA1 Message Date
Chris Penner
e683c914b7 Silence stdout from actual transcript test runs 2023-07-05 10:08:27 -06:00
Chris Penner
a188ccc569 Remove all transcript output noise 2023-07-05 09:46:30 -06:00
Mitchell Rosen
b5702b9f88 ormolu the world 2023-05-25 15:02:20 -04:00
Chris Penner
4b19b3c63b Add Bifunctor and methods to Unison.Prelude 2023-05-18 11:27:52 -06:00
Travis Staton
fafc3280c9 Prevent opening two ucm processes against the same codebase
optionally obtain file lock on sqlite when opening a codebase
2022-11-18 16:32:06 -05:00
Chris Penner
aa69d40f60 Assert that transcripts in /errors/ should fail. 2022-03-30 16:29:13 -06:00
Chris Penner
4a0c5367a7 Correctly print errors which occur during transcripts
Also set exit code 1 when transcripts fail.
2022-03-30 16:17:57 -06:00
Chris Penner
0ceddd5000 Use Haskell API to run transcripts
Trunk currently runs all of the transcripts by shelling out to the unison cli, this causes two problems:

* It's slow to boot up a fresh ucm for every transcript
* On Windows, we're likely to encounter [this bug](https://github.com/commercialhaskell/stack/issues/5038) which comes up when using `readProcess`, I'm noticing when I run transcripts on windows it inserts a ton of `++stty: 'standard input': Inappropriate ioctl for device` into output files.

As far as speedup goes, a quick benchmark on non-optimized builds shaves off ~90 seconds!

```
New version
/usr/bin/time stack exec transcripts
      103.79 real       153.25 user        89.79 sys

/usr/bin/time stack exec transcripts
      193.79 real       183.08 user         6.97 sys
```

Implementation notes

* Define `withTranscriptRunner`, which does a single initialization and then provides a transcript runner to the provided action. The caller can run any number of transcripts without re-initializing the runtime.
* Rather than crash the with an `exit 1` on failure and then detect that exit code, we return an Either which can be handled as a test failure.
2022-02-24 14:51:57 -06:00
Arya Irani
2657b05884
Merge pull request #2936 from unisonweb/topic/no-stack-exec 2022-02-22 15:36:12 -07:00
Arya Irani
4d514e81f1 codepage 65001 for anything with emojis / unicode 2022-02-18 23:18:22 -07:00
Arya Irani
36b2414bc6 remove stack exec 2022-02-18 21:41:37 -07:00
Chris Penner
0f18bf4ca1 Don't filter out prelude files by our prefix selection. 2021-12-07 10:02:54 -06:00
Chris Penner
54d6fbf1bd Add ORMOLU_DISABLE to every file.
This allows all developers to add ormolu autoformat on save in their
editors without worrying about creating huge diffs on files that haven't
been formatted yet.

If you format a file, remove the DISABLE comment to ensure it stays
formatted in the future.
2021-11-23 12:10:58 -06:00
iamevn
28d1840899 move package cli -> unison-cli
the haskell language server was giving me some errors about not being able to find a local cli package, renaming it to unison-cli fixed that and seems to be consistent with other naming conventions.
2021-10-22 23:17:40 -07:00