Commit Graph

2714 Commits

Author SHA1 Message Date
Arya Irani
d0db373952 delete test-git.bash (and its Github API fns) in favor of haskell test 2019-11-20 11:21:15 -05:00
Arya Irani
20f148e379 remove redundant fetch & flesh out scripts/test-git.bash 2019-11-19 11:41:29 -05:00
Arya Irani
63333db985 push no longer requires git repo to contain a codebase...
- minimalCodebaseStructure has been further minimized to just `paths/_head`
- `Command.LoadRemoteRootBranch`, `FileCodebase.getRootBranch`, and `Git.pullGitBranch` take a BranchLoadMode argument which dictates whether to fail or silently succeed if the source repo doesn't contain a codebase
- documented an unhelpful crash in createDir
- no-op instead of crash when `copyFromGit` `from` arg doesn't exist
- renamted `writeAllTermsAndTypes` to `syncToDirectory` for readability
- we noticed that relative local git repos aren't resolved correctly (they are resolved relative to the git/codebase staging dir where git commands are executed)
- pushing to bare repos is untested
- added `scripts/test-git.bash` to start collecting git-related tests, but haven't wired it into `.travis.yml`.  It could probably also be a regular EasyTest, since it's no longer calling Github APIs.
2019-11-18 17:31:11 -05:00
Arya Irani
bf631d2fcd support remote Unison paths in push/pull (#935)
* wip git url parser & some Git module cleanup

* modern-uri

* trailing whitespace

* dice up the git uri parser for more easily testable implementation

* ipv6 address reference

* add an ipv4 test for `UriParser.parseProtocol`

* remove duplicate test and typo

* add some autocompletion shortcuts for git urls

* clean up gitUrlArg

* partially update `push` and `pull` InputPatterns & docs

* it compiles!

* sometimes even comments can break the build

* missed a couple of `gitIn`s, so command executed in wrong working dir

* delete UriParser.webRepoParser in favor of autocompletes

* bikeshedding the ConfiguredGitUrlIncludesShortBranchHash error message

* cleanup

* simplify push/pull help

* pretty-print reflog entry for `pull` using RemoteRepo.printNamespace
2019-11-12 16:52:48 -05:00
Runar Bjarnason
a75f9a2573 Restrict transitive closure to current branch 2019-11-12 14:03:43 -05:00
Runar Bjarnason
e62a1809fe Propagate always succeeds 2019-11-11 21:31:49 -05:00
Rúnar
bd81a46e83
Quality-of-life improvements for type refactoring (#952)
* Transcript :error blocks now.just.expect an error for _any_ of commands, rather than _all_ of them

* Removed confusing and uninformative error message

* io mode transcript

* Deleted transcript
2019-11-11 17:14:08 -05:00
Paul Chiusano
07eff527d3 Address PR comments 2019-11-08 18:01:34 -05:00
Paul Chiusano
374c1df2b4 Merge remote-tracking branch 'origin/master' into topic/docs 2019-11-08 17:43:19 -05:00
Paul Chiusano
47164b0620
Merge pull request #951 from unisonweb/topic/reflog-output-tweaks
Get rid of (2/2) note to represent patch propagation
2019-11-08 16:20:10 -05:00
Paul Chiusano
0743c405a8 git rid of (2/2) in favor of (patch propagation) in reflog output 2019-11-08 16:03:11 -05:00
Paul Chiusano
41eb41c9af Transcript :error blocks now.just.expect an error for _any_ of commands, rather than _all_ of them 2019-11-08 15:48:06 -05:00
Paul Chiusano
68ecf4d97c Merge remote-tracking branch 'origin/master' into fix/947 2019-11-08 14:35:23 -05:00
Paul Chiusano
b62c6fec31 fix #947 and add test case 2019-11-08 14:31:55 -05:00
Paul Chiusano
93ad88a4ac sync master 2019-11-08 08:39:04 -05:00
Paul Chiusano
87ee95bf3e
Merge pull request #944 from unisonweb/topic/edit.all
View/edit multiple definitions
2019-11-07 21:16:14 -05:00
Arya Irani
10aebd6211 fix #942; have propagate write new terms and types as it goes 2019-11-07 17:52:20 -05:00
Runar Bjarnason
edf28247c3 Added a transcript for numeric arguments 2019-11-07 16:53:24 -05:00
Runar Bjarnason
4876e7cab2 Allow ranges in edit/view
and whatever else takes a numbered arg
2019-11-07 16:29:28 -05:00
Paul Chiusano
37c5542390 Merge remote-tracking branch 'origin/master' into topic/docs 2019-11-07 15:14:47 -05:00
Runar Bjarnason
6ac9651792 Numbered results from todo 2019-11-06 17:59:59 -05:00
Paul Chiusano
4d0a131999 flush intermediate transcript output 2019-11-06 14:04:48 -05:00
Paul Chiusano
0b0e3887a7 now adding builtin code (but not names) on every ucm startup 2019-11-06 11:03:07 -05:00
Paul Chiusano
08488c613d fix message 2019-11-05 20:43:17 -05:00
Paul Chiusano
b7f178ebf3
Merge pull request #932 from TomasMikula/subtype-bug
Fix a bug in isSubtype
2019-11-05 16:17:44 -05:00
Paul Chiusano
d296266602 simplify paragraphyText, it's now much better behaved 2019-11-04 21:15:13 -05:00
Ian Grant Jeffries
3c5fd86d81 Remove unused function 2019-11-04 20:13:08 -05:00
Paul Chiusano
bf312d314f don't do rewrapping of text 2019-11-04 19:00:38 -05:00
Paul Chiusano
a209806123 fix escaping of @ 2019-11-04 18:48:09 -05:00
Paul Chiusano
cb3e22903b output tweaks - don't emit a fold 2019-11-04 18:39:57 -05:00
Paul Chiusano
d3ab6ae190 Added a documentation transcript 2019-11-04 18:00:25 -05:00
Paul Chiusano
e8996e0463 Merge remote-tracking branch 'origin/master' into topic/docs 2019-11-04 17:15:53 -05:00
Paul Chiusano
a7d1fd2d12 handy docs command - gets Doc metadata linked to a definition in one step 2019-11-04 17:15:33 -05:00
Tomas Mikula
5efdfeca6b "Reserve" variables before adding them to the typechecking context.
Fixes a bug in subtype checking.
2019-11-04 21:59:19 +01:00
Tomas Mikula
baff23d8d7 Make typechecking fail fast on adding non-reserved var to the context.
That is when a variable to the context for which there is no guarantee
that `freshenVar` won't return it as a fresh variable, which would be wrong.

In order to make the check more efficient, namely to check only the newly
added variables instead of the whole context, replace uses of the more
general `modifyContext` by more specialized `extendContext` and
`replaceContext`. The latter two know which elements are being added
and check only those.
2019-11-04 21:39:57 +01:00
Paul Chiusano
276d7dcca2 Backticks by default around links 2019-11-04 14:04:27 -05:00
Paul Chiusano
83c80dd0a6 Merge branch 'topic/docs' of https://github.com/unisonweb/unison into topic/docs 2019-11-04 13:59:44 -05:00
Tomas Mikula
d8da51851c Make isSubtype fail on illegal context extension:
- Don't let `Context.succeeds` swallow compiler bugs.
 - Fix the checks in `Context.extend'`.
2019-11-04 19:49:26 +01:00
Paul Chiusano
7c3eda4414 tweak to paragraphyText to properly preserve trailing whitespace 2019-11-04 10:47:06 -05:00
Paul Chiusano
b9ca65828b added underlined prettyprinted text, used for term/type links by display command 2019-11-04 10:33:49 -05:00
Paul Chiusano
76e2cb48a0 drop leading and trailing whitespace from doc blocks 2019-11-04 10:20:12 -05:00
Tomas Mikula
05a09c7c0d Add a pending test of Typechecker.isSubtype 2019-11-03 23:24:43 +01:00
Tomas Mikula
75c4739911 Remove variable type RefNamed.
It is no longer necessary: an ordinary variable whose name is derived
from a reference is sufficient.
2019-11-02 18:50:25 +01:00
Tomas Mikula
f577a20824 Merge branch 'makeSelfContained' into rm-RefNamed 2019-11-02 18:49:59 +01:00
Tomas Mikula
08d56a6167 In makeSelfContained', don't simply assume RefNamed vars to be fresh.
Freshen them appropriately.

Add a test would have failed previously.
2019-11-02 18:46:34 +01:00
Tomas Mikula
0a971c3539 Don't assume RefNamed vars not to occur in input to DataDeclaration.unhashComponent.
DataDeclaration.unhashComponent used to make up some RefNamed variables
and simply assumed that they did not appear in the input component.
Such assumption is not captured by the type signature of `unhashComponent`.

To drop the assumption, freshen the made up RefNamed variables appropriately.

Add a test that previously would have failed.
2019-11-02 15:55:41 +01:00
Tomas Mikula
ec4d3056ce Make DataDeclaration.unhashComponent responsible for inventing the new fresh vars.
The caller of DataDeclaration.unhashComponent used to invent some variables
which DataDeclaration.unhashComponent then used and assumed to be appropriately fresh.

Instead, let DataDeclaration.unhashComponent invent the variables itself and don't
leave the responsibility to the caller. This makes the caller and the callee
less entangled.
2019-11-02 15:55:41 +01:00
Tomas Mikula
88bde5827d Don't assume RefNamed vars not to occur in input to Term.unhashComponent.
Term.unhashComponent used to make up some RefNamed variables and simply
assumed that they did not appear in the terms of the input component.
Such assumption is not captured by the type signature of `unhashComponent`.

To drop the assumption, freshen the made up RefNamed variables appropriately.

Add a test that previously would have failed.
2019-11-02 15:55:40 +01:00
Tomas Mikula
51ab605c87 Make Term.unhashComponent responsible for inventing the new fresh vars.
The caller of Term.unhashComponent used to invent some variables
which Term.unhashComponent then used and assumed to be appropriately fresh.

Instead, let Term.unhashComponent invent the variables itself and don't
leave the responsibility to the caller. This makes the caller and the callee
less entangled.
2019-11-02 15:46:30 +01:00
Tomas Mikula
774a510afb Add DataDeclaration.allVars. 2019-11-02 15:46:29 +01:00