Commit Graph

280 Commits

Author SHA1 Message Date
Mitchell Rosen
06811c9829 fill out most of project.create implementation 2023-01-23 14:21:00 -05:00
Mitchell Rosen
f353e087f9 stub out project.switch 2023-01-23 13:40:45 -05:00
Mitchell Rosen
e661093bde stub out project.create handler 2023-01-23 13:03:48 -05:00
Mitchell Rosen
8c681904fb add project.create input pattern 2023-01-23 12:54:14 -05:00
Chris Penner
e5d9662c6c
Add Clear command (#3705) 2023-01-03 14:17:46 -06:00
Mitchell Rosen
6e99914c77 ⅄ trunk → 22-12-14-tidy-up-hashing-package 2022-12-15 12:46:57 -05:00
Mitchell Rosen
ee9309ee15 ⅄ trunk → 22-12-09-break-up-unison-util 2022-12-15 11:41:36 -05:00
Mitchell Rosen
4be5ff5346 ⅄ trunk → 22-12-14-tidy-up-hashing-package 2022-12-14 21:15:35 -05:00
Mitchell Rosen
bbc17e01a6 move Unison.Hash and friends to new unison-hash package 2022-12-14 19:03:52 -05:00
Chris Penner
547f796693 Merge branch 'trunk' into lsp/auto-fmt 2022-12-14 16:30:31 -06:00
Mitchell Rosen
afe2c26192 move U.Codebase.HashTags from unison-codebase to unison-core 2022-12-12 15:16:14 -05:00
Mitchell Rosen
7eee9e01bb remove vestigial unison-util package 2022-12-09 14:37:52 -05:00
Mitchell Rosen
cbcf7302e1
Merge pull request #3527 from unisonweb/22-10-19-syntax-name
Extract stringy Name parsing/printing printing functions to Unison.Syntax.Name module
2022-12-05 11:12:01 -05:00
Chris Penner
b45b07ae93
Include LHS of binary exprs in annotation (#3640)
* Include LHS of binary exprs in annotation

* Add combinators from Hover branch for testing

* Finish adding LSP annotation tests

* Fix custom op lhs annotations
2022-12-05 09:56:57 -06:00
Mitchell Rosen
8e6dbc1351 ⅄ trunk → 22-10-19-syntax-name 2022-11-29 16:07:49 -05:00
Travis Staton
048d70a025 Create option for unison that will write RTS stats to a file
fixes #3597
2022-11-28 11:31:22 -05:00
Mitchell Rosen
a6108f9a3c ⅄ trunk → 22-10-19-syntax-name 2022-11-23 16:21:39 -05:00
Arya Irani
54636f5e63
Merge pull request #3620 from unisonweb/travis/3614
Make ucm use multiple capabilities by default
2022-11-21 18:19:28 -05:00
Mitchell Rosen
01eaa83909 ⅄ trunk → 22-10-19-syntax-name 2022-11-20 13:29:52 -05:00
Travis Staton
8902fb6dd5 Make ucm use multiple capabilities by default
fixes #3614
2022-11-17 17:20:55 -05:00
Dan Doel
4e49cc9116 Merge branch 'trunk' into work/compiler 2022-11-16 14:09:49 -05:00
Chris Penner
e8743e529c Disable 'watching files' message when necessary 2022-11-10 12:35:20 -06:00
Dan Doel
7591b90211 More work on scheme related commands
- Added dedicated commands for fetching the compiler and generating boot
  libraries. The dedicated commands will force the operation, for
  updates, while the main commands will only run them if the resources
  do not already exist.
- Factored part of the command into one that handles building the .scm
  file, which can then be consumed by running it or compiling it to a
  dedicated binary.
- Added a run-via-scheme command, because that is actually easier to
  accomplish via a shell call. The compile command is stubbed out until
  I can figure out the right sequence of commands to successfully build
  a standalone file.
2022-11-09 16:20:18 -05:00
Mitchell Rosen
56c80904ff ⅄ trunk → 22-10-18-unison-syntax 2022-10-28 11:24:17 +05:30
Dan Doel
03926bd34e Add a new input handling module for resolving terms 2022-10-27 13:10:13 -04:00
Mitchell Rosen
534475a29d ⅄ trunk → 22-10-19-syntax-name 2022-10-20 11:12:58 -04:00
Mitchell Rosen
ed77121949 Move name parsing/printing functions from Unison.Name to Unison.Syntax.Name 2022-10-19 22:17:07 -04:00
Chris Penner
b7be8ded03
LSP Auto-completion (#3488)
Add auto-completion to LSP
2022-10-19 15:48:02 -06:00
Mitchell Rosen
1674b22e69 move Unison.Syntax.Lexer into new unison-syntax package 2022-10-18 16:02:46 -04:00
Mitchell Rosen
b6ad66f27c add a test demonstrating that label works 2022-10-14 14:12:06 -04:00
Chris Penner
c20569012f Re-build cabal files 2022-09-30 10:59:36 -06:00
Chris Penner
b8672666ed Rebuild with stack 2.9.1 2022-09-27 13:52:43 -06:00
Chris Penner
53bef39b23 Fix settings configuration 2022-09-27 11:59:27 -06:00
Chris Penner
ea6494accc Term auto-format sketch 2022-09-25 11:50:01 -06:00
Mitchell Rosen
fc93cf86e9 ⅄ trunk → 22-09-08-update-cycle-element 2022-09-21 15:32:47 -04:00
Mitchell Rosen
80b09cec32 ⅄ trunk → 22-09-13-break-up-handleinput 2022-09-19 18:19:01 -04:00
Mitchell Rosen
1f8ee36ddc more cycle update work 2022-09-16 15:30:09 -04:00
Mitchell Rosen
2958d7ee39 Continue breaking up Unison.Codebase.Editor.HandleInput into smaller modules 2022-09-13 13:44:19 -04:00
Chris Penner
d1f232f765 Merge branch 'cp/lsp' into cp/lsp-II 2022-09-12 10:11:46 -06:00
Chris Penner
195ecf2cc9 Add note re: LSP on windows 2022-09-12 10:11:26 -06:00
Chris Penner
ddf263abcf Merge branch 'cp/lsp' into cp/lsp-II 2022-09-12 10:04:19 -06:00
Chris Penner
3aa659ddfa Merge branch 'trunk' into cp/lsp 2022-09-12 10:03:53 -06:00
Chris Penner
d224a9c757 Remove unused codelens module 2022-09-12 10:02:39 -06:00
Chris Penner
a68ef9ba08 Add handler middleware and cancellation handler 2022-09-02 15:10:31 -06:00
Chris Penner
7a7d721961 Merge branch 'cp/lsp' into cp/lsp-II 2022-08-29 16:34:14 -06:00
Chris Penner
f033635277 Merge branch 'trunk' into cp/lsp 2022-08-29 16:20:55 -06:00
Chris Penner
f239b581f0 Add human formatting 2022-08-25 12:54:50 -06:00
Chris Penner
920c6509f1 Change move.namespace to move entire history. 2022-08-22 14:41:18 -06:00
Chris Penner
8696fef129
Tab completion speedup (#3312)
* 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
2022-08-16 15:01:46 -06:00
Mitchell Rosen
f8fe6edfec finish clearing out Unison.Codebase.Editor.Command 2022-08-01 10:20:10 -04:00
Mitchell Rosen
afe63447c4 move some code around 2022-07-28 19:11:31 -04:00
Mitchell Rosen
80d5671fbe work on Unison.Monad.Cli docs a bit 2022-07-28 14:28:12 -04:00
Mitchell Rosen
b913709780 delete Action monad 2022-07-27 16:56:52 -04:00
Mitchell Rosen
035fb4e66c move ResetRootI to the Cli monad 2022-07-25 13:24:07 -04:00
Mitchell Rosen
a60c7babbb convert auth.login to Cli monad 2022-07-23 23:50:14 -04:00
Mitchell Rosen
fc2fcf6037 move some code around 2022-07-22 11:41:59 -04:00
Chris Penner
484771e4b8 Merge branch 'cp/lsp' into cp/lsp-II 2022-07-21 15:24:45 -06:00
Chris Penner
262e2b8746 Merge branch 'trunk' into cp/lsp 2022-07-21 15:12:50 -06:00
Travis Staton
3d5855dd92 Misc cli cleanup
- remove LoopState
- incorporate maybe, reader, and state layers into a single
- monad, don't run them in stages
- implement abort
- remove ViewRemoteGitBranch
2022-07-19 17:23:43 -04:00
Mitchell Rosen
aca371e523 delete LoadWatches command 2022-07-19 12:20:36 -04:00
Chris Penner
aa562b703d Add link to share 2022-07-13 09:04:40 -06:00
Arya Irani
0ac436f671 update the examples for push and pulls to show new share / git() syntax 2022-07-12 12:24:15 -04:00
Chris Penner
9c983cc9cc FoldingRanges 2022-07-11 09:26:06 -06:00
Chris Penner
eb5f6e64cb Wire up code actions 2022-07-09 14:17:05 -06:00
Chris Penner
c116b455e2 Refactor/reorganize 2022-07-08 10:15:33 -06:00
Chris Penner
74b058ce69 Working _simple_ type errors 2022-07-07 22:49:51 -06:00
Chris Penner
73a4046efb Diagnostics 2022-07-07 17:42:03 -06:00
Chris Penner
f2f40b4ecb Type-checking in a loop 2022-07-07 16:34:57 -06:00
Chris Penner
82787bf3e8 WIP 2022-07-07 15:56:50 -06:00
Chris Penner
e3f7f6eed9 Wire up more parsing 2022-07-07 13:50:10 -06:00
Chris Penner
276e2cb98e Codelens skeleton 2022-07-02 17:37:29 -06:00
Chris Penner
89d1f55875 Working completion, hover, etc. 2022-07-02 16:33:09 -06:00
Chris Penner
79f99e1d0f Naively receiving completion requests 2022-07-02 13:27:01 -06:00
Chris Penner
cda23d0025 Wire in VFS 2022-07-02 12:28:01 -06:00
Chris Penner
e17414aa9a Bootstrap LSP 2022-07-02 11:02:51 -06:00
Mitchell Rosen
7baebea928 begin implementing concurrent pull 2022-06-23 10:25:01 -04:00
Arya Irani
3b31b95308
Merge pull request #3125 from unisonweb/travis/update-indices
Update type and term indices after push and pull
2022-06-17 13:44:18 -04:00
Arya Irani
1d0ab1d4f3 Merge remote-tracking branch 'origin/trunk' into arya/ooo-sync
# Conflicts:
#	hie.yaml
#	parser-typechecker/package.yaml
#	unison-hashing-v2/package.yaml
#	unison-hashing-v2/unison-hashing-v2.cabal
2022-06-16 15:06:42 -04:00
Travis Staton
535eaf98a9 Add unison-codebase-sqlite-hashing-v2 package
unison-codebase-sqlite is now parameterized by the hashing functions
2022-06-16 14:29:11 -04:00
Arya Irani
0437ca0c74 remove haskeline fork
resolves https://github.com/unisonweb/unison/pull/1836
closes https://github.com/judah/haskeline/pull/115
2022-06-15 11:54:25 -04:00
Chris Penner
1d970904a3
Use Output for credential failures (#3106) 2022-06-10 16:30:53 -06:00
Mitchell Rosen
45c135cc89 ⅄ trunk → arya/ooo-sync 2022-06-10 18:30:29 -04:00
Travis Staton
86defb3774
Merge pull request #3093 from unisonweb/travis/bump-megaparsec
Bump megaparsec dependency
2022-06-07 13:18:14 -04:00
Travis Staton
8e5e2ca5de megaparsec bounds 2022-06-07 09:43:25 -04:00
Mitchell Rosen
0ad12af401 begin implementing push/pull progress reporting 2022-06-03 21:06:51 -04:00
Chris Penner
18266a13a8
Update input patterns and unisonConfig for Share paths. (#3080)
* 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
2022-06-03 15:31:43 -06:00
Arya Irani
da18e47b2e Add package.yaml workaround to stack rebuild issue 2022-06-03 13:07:33 -04:00
Arya Irani
df33c1e257 add when/Paths_ stuff to every package.yaml target
didn't put it into another PR, I'm sorry. But we can cherry-pick this out in a separate PR
2022-06-02 17:10:59 -04:00
Arya Irani
865f0ba6f0 Merge remote-tracking branch 'origin/trunk' into arya/ooo-sync 2022-05-31 12:20:46 -04:00
Chris Penner
f61a4dd208
Add more flexibility in our ability to specify codeservers (#3081)
* Add explicit types for share host and uri

* Ensure we identify servers correctly

* Remove ability to pass args to auth.login

and remove logic for CodeServers config

* PR feedback: special structure for coderserver URI

* Add port to CodeserverId
2022-05-31 09:56:29 -06:00
Chris Penner
36b8ac2155
Add "debug.doctor" command for assessing codebase integrity (#3078)
* Collect and pretty-print errors

* Add debug.doctor command

* Improved formatting
2022-05-27 10:51:01 -06:00
Arya Irani
c6b2895c17 Merge branch 'ooo-sync-read-repo-sum-type' into arya/ooo-sync 2022-05-15 17:10:54 -04:00
Arya Irani
f510365290 filled in a lot of things? 2022-05-12 18:03:00 -04:00
Mitchell Rosen
24e4f4bc6a inline Unison.Sync.HTTP into Unison.Share.Sync 2022-05-10 21:38:35 -04:00
Mitchell Rosen
28425c6d2e ⅄ trunk → arya/ooo-sync 2022-05-05 15:06:36 -04:00
Chris Penner
c073117871
Allow testing Share API in transcripts (#3062)
* Support API calls in transcripts
2022-05-02 09:55:15 -06:00
Mitchell Rosen
3b8bd60531 ⅄ trunk → arya/ooo-sync 2022-04-19 22:29:24 -04:00
Mitchell Rosen
dc26b0bb56 begin implementing entityToTempEntity 2022-04-12 16:22:04 -04:00
Mitchell Rosen
a06e6352d0 extract unison-util-base32hex package 2022-04-12 15:51:03 -04:00
Arya Irani
e698acf0e8 Sync.{makeTempEntity,tempEntityType} 2022-04-12 07:40:42 -05:00
Mitchell Rosen
53beb4ab3b ⅄ trunk → 21-12-04-use-unison-sqlite 2022-04-11 14:50:09 -04:00
Mitchell Rosen
3abdda60e3 ⅄ trunk → arya/ooo-sync 2022-04-11 10:12:11 -04:00
Mitchell Rosen
49d4f295a9
Merge pull request #3032 from unisonweb/cp/syncm-concrete
Sync HTTP client
2022-04-08 15:50:30 -04:00
Chris Penner
e3168ee30b
Use stack test suites (#2656)
* Give tests independent names and use stack test suites

* Update parser-typechecker tests in ci

* Update testing instructions and check.sh
2022-04-07 10:16:13 -06:00
Chris Penner
3aca147a82 Implement sync http client 2022-04-06 15:48:59 -06:00
Mitchell Rosen
3f66cf9a6f do some work on ooo-sync 2022-04-04 18:10:38 -04:00
Mitchell Rosen
4adc35016c ⅄ trunk → 21-12-04-use-unison-sqlite 2022-03-31 16:40:07 -04:00
Mitchell Rosen
48e1653b3e improve query logging and top-level exception printing 2022-03-31 13:20:33 -04: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
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
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
4e436bdf87 Rearrange modules according to PR feedback 2021-11-16 10:01:39 -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