Commit Graph

5841 Commits

Author SHA1 Message Date
Runar Bjarnason
f77e116579 Handle misses better 2020-03-19 13:04:25 -04:00
Runar Bjarnason
68021e80ff Transcripts changed 2020-03-18 22:51:49 -04:00
Runar Bjarnason
608d753fd7 Progress 2020-03-18 22:51:26 -04:00
Paul Chiusano
5ef65ffd75 cleanup: UnlinkI and LinkI argument order matches input pattern now 2020-03-18 22:25:29 -04:00
Paul Chiusano
083ed75f3e Metadata display in BranchDiff now uses HashQualified rather than HashQualified'. 2020-03-18 21:56:02 -04:00
Paul Chiusano
ec1a60b83c Transcript refresh 2020-03-18 14:39:24 -04:00
Paul Chiusano
e7c89749b9 Fixed issue with Metadata.delete, transcript now passes!
Issue was that it was unilaterally deleting the D2 dimension for whatever type was being unlinked (this is the dimension that supports efficient lookup by metadata type - "find me all the docs"). Correct behavior is to only delete from this dimension when there are no more metadata values for a metadata type - for instance, if you delete the last `Doc`, you can delete the index that lets you find all the docs.
2020-03-18 14:23:38 -04:00
Paul Chiusano
060dc59cc2 Mostly fixed, but unlink seems to be deleting all the definitions, not just the selected one.
- Revamped LinkI and UnlinkI - the md value is a HashQualified, so you can unlink by hash only now
- Support unnamed metadata in the diff display
- Remove HQ'.unsafeFromHQ, which was used in one place and was causing a crash
- Better output messages for various link/unlink failures
2020-03-18 12:27:50 -04:00
Paul Chiusano
4dca3c2808 fix compile error 2020-03-18 12:23:09 -04:00
Runar Bjarnason
57756ba33b accidental htags 2020-03-14 00:05:31 -04:00
Runar Bjarnason
4601e293a7 Added transcript 2020-03-13 22:54:31 -04:00
Runar Bjarnason
355a2620c6 Allow deleting type and term replacements 2020-03-13 22:12:07 -04:00
Paul Chiusano
57e14ee3f7 Removed all but one calls to fromJust and added failing transcript 2020-03-13 17:05:48 -04:00
Rúnar
872c8e9ddf
Merge pull request #1353 from unisonweb/update-pr-template
Add title guidelines to PR template
2020-03-12 16:04:02 -04:00
Rúnar
1ac8b6a793
Merge pull request #1352 from unisonweb/bug/660
Ignore ctor/term collisions for dupes
2020-03-12 15:50:48 -04:00
Arya Irani
33e619d946
Update pull_request_template.md 2020-03-12 15:22:42 -04:00
Runar Bjarnason
59297203df Ignore ctor/term collisions for dupes 2020-03-12 15:16:38 -04:00
Paul Chiusano
c91a9a7d7f
Merge pull request #1334 from unisonweb/topic/alias-hashonly
supporting hashes in `alias`; and names and builtins in `replace`
2020-03-12 09:38:56 -04:00
Arya Irani
6b5d60cb20 misc todos for #1334:
- simplify resolveHHQS'Referents
- add missing logic to TermReferentsByShortHash
- don't pass Codebase just to get deserializers
- improve transcript prose
2020-03-11 21:56:33 -04:00
Arya Irani
5d5f96bcaa add transcript 2020-03-11 16:44:09 -04:00
Arya Irani
cc9f390849
Merge pull request #1341 from unisonweb/cleanup/stepManyAt0
Some nice cleanup of `stepManyAt0` and friends
2020-03-11 11:46:30 -04:00
Paul Chiusano
e920ffa126
Merge pull request #1331 from unisonweb/fix/1329-incorrect-case-body-annotation
correct annotation of match cases to always include the case body
2020-03-11 11:23:33 -04:00
Paul Chiusano
de5261a81c Some nice cleanup of stepManyAt0 and friends. Thanks to @aryairani for suggestions! 2020-03-11 11:13:45 -04:00
mergify[bot]
9b2df231a3
Merge pull request #1333 from unisonweb/fix/1225
Fix #1225
2020-03-11 14:19:59 +00:00
Paul Chiusano
e66828a2c3 Switch to using Lens.:< pattern and kill Path.Cons pattern which is redundant 2020-03-11 10:13:00 -04:00
mergify[bot]
cb3edcc568
Merge pull request #1337 from unisonweb/fix/update-children
Fix Branch.updateChildren to not elide empty branches with history
2020-03-11 14:06:18 +00:00
Paul Chiusano
68e0783fb8 fix Branch.updateChildren to not elide empty branches with history 2020-03-10 21:56:48 -04:00
Paul Chiusano
cf6c51595e i like suggestion from @aryairani to switch from [NameSegment] to Path 2020-03-10 21:47:03 -04:00
Aaron Novstrup
3de0db9133 correct annotation of match case body
- give _all_ Abs nodes in the resulting lambda chain the annotation of the case body (not just the outer node)
2020-03-10 14:55:26 -07:00
Arya Irani
9a362f7101 supporting hashes in alias; and names and builtins in replace
Exploded Codebase.referencesByPrefix into three functions:

- referencesByPrefix :: Text -> m (Set Reference.Id)
+ termReferencesByPrefix :: ShortHash -> m (Set Reference.Id)
+ typeReferencesByPrefix :: ShortHash -> m (Set Reference.Id)
+ termReferentsByPrefix :: ShortHash -> m (Set (Referent' Reference.Id))

for top-level terms, top-level types, and for Ref/Con mix.
They only return "derived" references, the thinking is that builtins will
come from a higher level api.

Exploded Command.ReferencesByShortHash into three functions
- ReferencesByShortHash :: ShortHash -> Command m i v (Set Reference.Id)
+ TypeReferencesByShortHash :: ShortHash -> Command m i v (Set Reference)
+ TermReferencesByShortHash :: ShortHash -> Command m i v (Set Reference)
+ TermReferentsByShortHash :: ShortHash -> Command m i v (Set Referent)

I actually don't remember why it was ok that it was Reference.Id before
but isn't now.  Maybe we hadn't wanted to auto-complete Builtin names?
I don't remember.

controversial?
* Added a type arg `r` to `Referent`; type alias and patterns for compat.
* Deleted BranchUtil.getTermByShortHash because I'm guessing we no longer
  want to limit such searches to the branch?  Uncertain.
* Reference.fromShortHash rejects inputs with ctorIds in them; seemed
  better than ignoring them, but I could imagine there being a case for
  each.
2020-03-10 13:00:00 -04:00
Paul Chiusano
d02e5bd794 added some comments to hopefully make implementation easier to follow 2020-03-09 23:02:58 -04:00
Paul Chiusano
4afb1deab1 elide empty children when building up new branch 2020-03-09 22:56:52 -04:00
Paul Chiusano
59e55f0337 Fix #1225
Uses a post-order traversal of the branch, rebuilding from the bottom up and visiting each node exactly once.
2020-03-09 22:27:01 -04:00
Aaron Novstrup
b5c85b2a2d correct annotation of match cases to always include the case body 2020-03-09 13:53:44 -07:00
Arya Irani
7b8a6aa7af
Merge pull request #1325 from pete-ts/fix/1320
Fix/1320
2020-03-09 16:11:57 -04:00
pete-ts
79d0b60ee1 uses canonicalizePath for all paths 2020-03-09 07:24:42 +00:00
Paul Chiusano
9b30c712a1
Merge pull request #1307 from unisonweb/topic/1305-doc-eval
Remove term names from evaluation in docs
2020-03-08 22:51:40 -04:00
mergify[bot]
5574357e1b
Merge pull request #1328 from unisonweb/topic/pull-requestt
Unabbreviate pr.{create,load}
2020-03-09 02:41:00 +00:00
Paul Chiusano
916b1c36a7
Merge pull request #1326 from unisonweb/aryairani-patch-1
Update pull_request_template.md
2020-03-08 22:18:25 -04:00
Paul Chiusano
af4d269138 Unabbreviate pr.{create,load} 2020-03-08 22:04:51 -04:00
pete-ts
c60a82780a uses canonicalizePath instead of makeAbsolute + takeDirectory 2020-03-08 16:36:21 +00:00
Arya Irani
c3bd499aad
Update pull_request_template.md 2020-03-08 08:27:14 -04:00
pete-ts
83e500a925 removes period and warnCallout, does not indent errors, and translates dot and dot dot 2020-03-08 09:12:20 +00:00
pete-ts
dcbf736e81 removes Pretty.endSentence, no longer used 2020-03-08 09:10:29 +00:00
pete-ts
4f2cedb389 removes indentation from error messages for codebase and codebase init 2020-03-08 09:10:01 +00:00
mergify[bot]
b85f54e886
Merge pull request #1323 from Dandandan/pull_doc
Fix #1238 pull typo in doc
2020-03-07 22:14:52 +00:00
Daniël Heres
49bd462b69
Adding myself to CONTRIBUTORS.markdown 2020-03-07 23:07:50 +01:00
Dandandan
b3c6450db9 Fix #1238 pull typo in doc 2020-03-07 14:28:42 +01:00
Paul Chiusano
4e0bc920a0
Merge pull request #1315 from unisonweb/topic/add-docs-to-vim-syntax
Add doc blocks to vim syntax
2020-03-06 15:57:58 -05:00
Runar Bjarnason
c6497fb2eb Add doc blocks to vim syntax 2020-03-06 15:06:33 -05:00