Commit Graph

121 Commits

Author SHA1 Message Date
Chris Penner
f1a7bc210c
Authenticate UCM with Codebase Servers. (#3000)
* The auth.login command is hidden until it's officially supported.
2022-03-30 13:19:48 -06:00
Chris Penner
0adda1a855 Separate pretty-printer test suite 2022-03-09 11:21:24 -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
Arya Irani
87e58af9c5 switch to Windows code page 65001 in exe:unison and exe:tests
I think it's only needed in these two spots, as the other
executables just shell out to `stack exec unison`.

I'm not actually clear on how this interacts with (or could be replaced by `hSetEncoding`, which we do have sprinkled around already, but not sufficiently to let Windows builds work.

If there's a cleaner solution, I'd like to use it. i.e. am I papering over a more correct multi-platform fix by using the Windows-only System.IO.Codepage?
2022-02-17 15:55:30 -07:00
Chris Penner
725acab049 Remove tracing 2022-01-21 10:38:07 -06:00
Chris Penner
7146712c80 Properly pipe constructors through everything 2022-01-20 16:53:19 -06:00
Chris Penner
bf82f3e957 Clean up 2022-01-20 15:39:16 -06:00
Chris Penner
6bbc6b3a07 Re-use old filterBySlurpResult 2022-01-17 11:15:21 -06:00
Chris Penner
e94448b5d6 WIP 2022-01-14 12:56:23 -06:00
Chris Penner
1e6c6590e8 WIP 2022-01-12 14:22:29 -06:00
Chris Penner
314ba37b44
Improve ctrl-c and sig INT catching in main UCM loop (#2734) 2021-12-13 12:35:05 -06:00
Chris Penner
9af105f191 WIP checkpoint 2021-11-18 15:20:58 -06:00
Chris Penner
f82944027e Reimplement dependency analysis to use Labelled dependency helpers 2021-11-12 16:29:58 -06:00
Chris Penner
de0f942970 Split off Action module from HandleInput 2021-11-10 11:03:59 -06:00
Mitchell Rosen
d46bdcbf3e move many ucm-related modules into unison-cli library component 2021-11-05 00:40:50 -04:00
satotake
f1cf547b00 use getCurrentTime 2021-11-03 16:59:44 +00:00
satotake
f80106b96e Merge branch 'trunk' into add-integration-tests 2021-10-26 11:39:21 +00: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