* WIP: fix up anns for bindings, blocks, etc.
* Working annotations for lets
* Add nesting tests
* Fix nesting tests
* Fix annotations on let-rec blocks
* Fix bad test src
* Skip destructuring binds test for now.
* Remove debugging
* Better fallbacks for finding ref nodes
* Transcript updates
* Fix bad 'contains'
* Rewrite letrec and let combinators to avoid requiring semigroup
* Don't include block openers in the block itself.
We don't want things like '=' or '->' to be part of a block
* Re-run transcripts
* Remove redundant constraint
* Include LHS of binary exprs in annotation
* Add combinators from Hover branch for testing
* Finish adding LSP annotation tests
* Fix custom op lhs annotations
* Working and fast prefix-based tab complete
* Re-arrange completion modules
* Hash completion for conflicted terms
* Sort Completions
* Remove fuzzy matcher for now
* Remove 'Branch' from suggestion signature
* Add ability to test completions in transcripts
* Use explicit lax-path query parser
* Don't auto-login on pulling public routes.
* Update base version parser
* Fix version parser tests
* Don't print error on unauthenticated requests,
need to wait to see if the server 401's first.
* Update unison-cli/src/Unison/Codebase/Editor/HandleInput.hs
Co-authored-by: Mitchell Rosen <mitchellwrosen@gmail.com>
* out of date comment
Co-authored-by: Mitchell Rosen <mitchellwrosen@gmail.com>
* Clean up docs and parsers for read/write remote namespaces for share
* Revive deprecated git parser so old unisonConfig's still work
* Don't hide git errors
* Fix CodeserverURI -> URI conversion
* Reflect the provided port in CodeserverURI
* Focus messaging around primary action
* Rename Branch.Hash -> Branch.CausalHash for clarity.
* WIP simplifying types for Causals and hashes
* Single type for causal hashes.
* Remove vestigial function
* Clean up some rogue hashes
* Formatting
* Fix tests
* Add namespace hash migration
* Cleanup
* Finish writing migration for bad branches, add some sanity checks too.
* Keep hash_object mappings up to date.
* Working migration
* More checks
* Dependency-order migration WIP
* Finish first draft of crawled migration strategy
* Improve speed and reliability of migration.
* Better migration logging
* Perform integrity checks once after all migrations are done.
* Considerably speed up migration by only re-hashing branches which have
the same causal hash as value hash.
* Clarify migration docs
* Move 'differing causal value hash' check to integrity checks
* Bump schema version for new codebases
* PR cleanup
* Remove commented out migration
* PR feedback cleanup
* Add integrity check for hash_objects.
* Correctly set 'changes' key
* Don't check hash object integrity in migrations
Some codebases (like mine) are borked in this area and we'll need to fix
them later on.
* Correct final migration number
* Check namespace hash even if branch has no children
* Rehash every branch regardless
* Use v4 of base.
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.
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?
* Use 'v2' branch of base to avoid needing to migrate base on every pull.
This also allows us to keep v1 and v2 versions of base around during the
transition period.
* Fix version parsing tests.
Co-authored-by: Arya Irani <538571+aryairani@users.noreply.github.com>
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.