Commit Graph

9676 Commits

Author SHA1 Message Date
Chris Penner
7843e48cdd
Merge pull request #2958 from unisonweb/cp/ormolu
Ormolu Everything.
2022-03-03 13:31:43 -06:00
Chris Penner
a29316fa08 Merge branch 'trunk' into cp/ormolu 2022-03-03 12:31:57 -06:00
mergify[bot]
09d245b67f
Merge pull request #2965 from ceedubs/compile-output-changes
Rename compile.output to compile
2022-03-03 17:57:03 +00:00
mergify[bot]
604199ba60
Merge pull request #2964 from unisonweb/cp/migrations-module
Re-arrange Migrations module to support multiple migrations.
2022-03-03 17:23:44 +00:00
Paul Chiusano
8642959396
Update unison-cli/src/Unison/CommandLine/InputPatterns.hs 2022-03-03 10:56:16 -06:00
Cody Allen
2a700378b5
Rename compile.output to compile
As
[suggested](https://github.com/unisonweb/unison/pull/2959#issuecomment-1057059547)
by @pchiusano.

There was another suggestion to filter to only terms that match subtypes
of `{Exception, IO} ()`. So far I haven't done that, because I'm not
very familiar with these types and am having trouble figuring out how to
get type information out of relations and referents.
2022-03-03 08:42:01 -08:00
Chris Penner
65ecd4561e Can't embed migration in a transaction because it does a VACUUM 2022-03-03 10:22:41 -06:00
Arya Irani
24c9eb815e
Merge pull request #2963 from unisonweb/let-mergify-wait-for-windows-build 2022-03-02 23:20:58 -05:00
Chris Penner
cca94086b1 Add savepoint to migration as a safeguard. 2022-03-02 17:32:46 -06:00
Chris Penner
b1f83f1e21 Re-arrange Migrations module to support multiple migrations. 2022-03-02 17:11:53 -06:00
Arya Irani
0b73027164
let mergify wait for windows build
Closes #2961, hopefully.

We could probably delete the macOS 10.15 build at some point since they are up to macOS 12 now and we don't build separate binaries anyway.
2022-03-02 17:32:38 -05:00
Chris Penner
ac370e125c Merge branch 'trunk' into cp/ormolu 2022-03-02 16:31:48 -06:00
Arya Irani
d86b9dc5d8 ORMOLU_DISABLE parts of Queries.hs 2022-03-02 16:10:02 -05:00
mergify[bot]
a2f9fbb65c
Merge pull request #2960 from unisonweb/topic/softhang-ftw
Use softhang if a delayed block is the last argument to a function
2022-03-02 18:59:41 +00:00
Paul Chiusano
e5b16cd764 softhang delayed computations when they're the last arg; add round trip test 2022-03-02 12:34:38 -06:00
Arya Irani
52823e2b66
Merge pull request #2959 from ceedubs/compile-output-completion 2022-03-02 09:31:57 -05:00
Cody Allen
b5986e3caa
Enable completion for compile.output 2022-03-01 16:06:44 -08:00
Arya Irani
6137f6d23e
support windows in ci (#2913)
* add `windows-2019` to ci build matrix

* Reconfigure ci scripts to work on windows as well as other platforms
2022-02-28 20:05:02 -06:00
Chris Penner
8e65b79f5e format with new ormolu 2022-02-28 15:52:25 -06:00
Chris Penner
fa7a20b92c Remove ORMOLU_DISABLE 2022-02-28 15:41:59 -06:00
Chris Penner
ef5d429621
Fix paging on windows - Less Is More! (#2953)
* Fallback to `more` if `less` is unavailable
* Use UNISON_PAGER instead of PAGER

Common options for PAGER don't work well with the way ucm expects the
pager to behave.
2022-02-28 13:39:54 -06:00
Chris Penner
abac49bb71
Merge pull request #2948 from unisonweb/cp/transcript-api
Run transcripts using Haskell API rather than shelling out
2022-02-28 13:35:21 -06:00
Chris Penner
0fa6052aac
Add short options for codebase and codebase-create (#2952) 2022-02-28 13:33:53 -06:00
mergify[bot]
18ae061385
Merge pull request #2954 from unisonweb/trace-cleanup
Doc: Remove leftover trace statements
2022-02-28 16:21:14 +00:00
Simon Højberg
96593e7b0b Doc: Remove leftover trace statements 2022-02-28 10:52:28 -05:00
Arya Irani
a4f0c12d59
Merge pull request #2837 from ceedubs/type-decl-err-msg 2022-02-25 23:06:43 -07:00
Cody Allen
b97a72550b
Fix delete.namespace.force msg spacing (#2681) 2022-02-26 01:03:59 -05:00
Cody Allen
132d82d3cd
Fix type declaration example
These days you need to specify `structural` or `unique` for type
declarations.
2022-02-25 14:55:32 -08:00
Chris Penner
3bb1c07e1c
Use v3 branch instead of v2 for less confusion (#2951) 2022-02-25 16:57:27 -05:00
mergify[bot]
b6e31b4351
Merge pull request #2949 from unisonweb/cp/doc-newlines
Handle more inconsistencies with newline conversion on Windows
2022-02-24 22:26:32 +00:00
Chris Penner
fadf800a98 Use text-mode reading and writing to actually use OS newline types. 2022-02-24 15:57:42 -06:00
Chris Penner
b818b3ff67 Try an alternative newline mode 2022-02-24 15:48:49 -06:00
Chris Penner
02ac5a32da Replace writeFile with writeUtf8 2022-02-24 15:23:05 -06:00
Chris Penner
ee8066f921 Replace more readFiles with readUtf8 2022-02-24 15:15:56 -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
Simon Højberg
09f0157431
Merge pull request #2946 from unisonweb/video-doc
Doc Embed: Add Video and FrontMatter
2022-02-24 13:14:47 -05:00
Simon Højberg
88f3c3a2f0 Doc Embed: Add Video and FrontMatter
Expand the Doc Embed variant to support embedding videos and
frontmatter. The latter will be rendered at the top of the output of the
html file rendered via the `docs.to-html` command.
2022-02-24 12:27:40 -05:00
Chris Penner
4edabef143
Add newline conversion to utf8 file helpers (#2943) 2022-02-23 13:43:31 -06:00
Chris Penner
9e9ec0f5fc
Fix transcripts/io.md to work on windows builds. (#2942)
* Use PATH so this test works on windows systems

* Update transcript output
2022-02-23 13:43:17 -06:00
Chris Penner
9978a50d64
Avoid redundant clone (and migration) when pushing. (#2912) 2022-02-23 12:35:40 -07:00
Arya Irani
2657b05884
Merge pull request #2936 from unisonweb/topic/no-stack-exec 2022-02-22 15:36:12 -07:00
Chris Penner
e9010fefb8
Merge pull request #2938 from unisonweb/topic/cp65001
codepage 65001 for parser-typechecker tests too
2022-02-22 14:45:43 -06:00
Chris Penner
bff432f92e
Merge pull request #2937 from unisonweb/topic/remove-path-forcibly
replace `removeDirectoryRecursive` with `removePathForcibly`
2022-02-22 14:41:50 -06:00
Arya Irani
c1d2882932 code page 65001 for benchmarks also 2022-02-19 00:27:11 -07:00
Arya Irani
4d514e81f1 codepage 65001 for anything with emojis / unicode 2022-02-18 23:18:22 -07:00
Arya Irani
908e4578c6
Merge pull request #2934 from unisonweb/22-02-18-windows-release 2022-02-18 22:09:20 -07:00
Arya Irani
f77ec97cb2 replace removeDirectoryRecursive with removePathForcibly
in case that helps #2924

also replaces `"rm" $|` with the same.
2022-02-18 22:08:33 -07:00
Arya Irani
36b2414bc6 remove stack exec 2022-02-18 21:41:37 -07:00
Arya Irani
3386102d00 codepage 65001 for parser-typechecker tests too 2022-02-18 20:33:34 -07:00
Arya Irani
f7e69a7dc3 add windows release (1st attempt) 2022-02-18 13:10:25 -07:00