Commit Graph

3134 Commits

Author SHA1 Message Date
Arya Irani
766f2403db implement dependents <x>, dependencies <x>, and debug.file 2020-04-03 21:21:02 -04:00
Arya Irani
ebc811376e push transitive dependencies in all 3 sync algorithms; + lots of cleanup 2020-04-02 00:51:03 -04:00
Arya Irani
28dd5a4b15 Split out these three git syncing algorithms from FileCodebase;
Put most into FileCodebase.Common due to cyclic imports.
Would like to do a tighter cleanup, but too hard.

When we're under less pressure, we could do proper benchmarks of these
with Criterion or something, my hand-done results have been confusing.

For #1385 (missing dependencies on push), I think we should use an
approach like the new sync algorithms use, where we use State to collect
dependencies as we traverse the Branch.

I will add the fix to all three, and then I think we can merge this even
though we will still be using the old algorithm for now.
2020-04-01 09:28:17 -04:00
Arya Irani
a555c854eb added a 3rd FileCodebase sync algorithm;
split out the three algorithms into three files, because too big file.
could probably stand to factor out commonalities.
2020-03-31 09:42:42 -04:00
Arya Irani
6b57a1d12a Merge remote-tracking branch 'origin/topic/fix-local-git-repo' into topic/new-file-sync3+ 2020-03-29 13:44:31 -04:00
Arya Irani
49f65173f1 actually copy indices 2020-03-29 13:42:20 -04:00
Arya Irani
d0e457e3b3 remove trace statements and unused field 2020-03-29 13:41:54 -04:00
Arya Irani
8687e1d01d Add withStatus messages to Git.hs 2020-03-28 17:03:21 -04:00
Arya Irani
713a746294 update Shellmet, hide most git commands 2020-03-28 12:49:02 -04:00
Arya Irani
abe749dc14 drop unneeded flag to git rev-parse and do less stdout 2020-03-28 12:43:31 -04:00
Arya Irani
45d5ff3708 use --git-dir & --work-tree to avoid git changing dirs 2020-03-28 12:13:14 -04:00
Arya Irani
5c081a5253 fix Star3.replaceFact 2020-03-25 08:04:09 -04:00
Arya Irani
461038c369 Merge branch 'master' into topic/new-file-sync3 2020-03-23 11:36:45 -04:00
Arya Irani
bf59f60076
Merge pull request #1372 from pete-ts/fix/1339
Removes empty string at the end of Name.suffixes output and unittests
2020-03-22 17:32:58 -04:00
Arya Irani
2caf56a86c remove all trailing whitespace 2020-03-22 15:39:50 -04:00
mergify[bot]
a5efa94fa2
Merge pull request #1376 from pete-ts/remove-suppressed-warnings
Remove suppressed warnings and unused pragmas
2020-03-21 16:22:18 +00:00
Arya Irani
69b9476226
Merge pull request #1374 from pete-ts/fix/1324
Make the first argument of push required
2020-03-21 11:51:13 -04:00
Arya Irani
35fbe86fe9
Merge pull request #1378 from unisonweb/topic/reference.id
Let more places use Reference.Id
2020-03-21 08:05:10 -04:00
pete-ts
f2bd1228e5 removes warnings after rebase from master 2020-03-21 11:15:02 +00:00
pete-ts
39894882b8 removes two unused language pragmas 2020-03-21 11:13:16 +00:00
pete-ts
bc109fda4a removes commented out warning suppression 2020-03-21 11:13:16 +00:00
pete-ts
db60373833 removes warning suppression and unused LANGUAGE (Classes) 2020-03-21 11:13:16 +00:00
pete-ts
1b3c0685b7 removes warning suppression (UriParser) 2020-03-21 11:13:16 +00:00
pete-ts
dbf923a897 removes warning suppression (OutputMessages) 2020-03-21 11:13:16 +00:00
mergify[bot]
ac9b5dcd10
Merge pull request #1368 from unisonweb/fix/1356
Make `link`, `unlink`, and `diff.namespace` work with unnamed metadata (fix for #1356)
2020-03-20 22:53:01 +00:00
Arya Irani
3a16b33b7a Let more places use Reference.Id where appropriate
- Codebase functions are now parameterized by Reference.Id or Referent.Id
  (a Referent that doesn't refer to a built-in) where appropriate, to
  enforce at the type level that Codebases can't contain builtins, and
  to eliminate jank that was enforcing or assuming this at runtime.

  ditto CodeLookup

  ditto `UnisonFile` and `TypecheckedUnisonFile`; with some backwards-
  compatible functions and pattern synonyms to support the old types,
  and some new functions for the new types.

- Codebase.getRootBranch and .getBranchForHash return a sum type instead
  of a magic value (`Branch.empty`) on error. `BranchLoadMode` goes away.

  `getRootBranch`'s result distinguishes between "I don't know what the
  head is supposed to be" vs "I do know what it is supposed to be but
  couldn't find it".

- Not strictly related to Referent.Id (oops) but I moved the actual
  builtin Decls from `unison-core/Unison.DataDeclaration` to
  `unison-parser-typechecker/Unison.Builtin.Decls`.

  I left these qualified as `DD` to minimize diffs, although it may
  make it harder to know which module a `DD.` definition is coming from.
2020-03-20 18:47:30 -04:00
Paul Chiusano
6c0dc0d188 Merge remote-tracking branch 'origin/master' into fix/view-suffixified
# Conflicts:
#	parser-typechecker/src/Unison/Codebase/Editor/HandleInput.hs
#	parser-typechecker/src/Unison/CommandLine/InputPatterns.hs
2020-03-20 18:16:25 -04:00
pete-ts
3ee9e0c94f makes the first argument of push required 2020-03-20 21:03:58 +00:00
Runar Bjarnason
8f0da4d4a6 Improved types in Input per Arya 2020-03-19 17:56:20 -04:00
Paul Chiusano
cda53566b5 Delete exactDefiniitionQueryArg, call fuzzyDefinitionQueryArg from definitionQueryArg.
The diff on this shows all the commands affected.
2020-03-19 17:05:08 -04:00
pete-ts
52965d2ddf suffixes no longer adds "" at the end of the list 2020-03-19 20:05:14 +00:00
Paul Chiusano
171cfd0e82 switch to using unsuffixed names for display, but suffixed names for resolving argument to display 2020-03-19 14:59:26 -04:00
pete-ts
389d36ada9 adds unittests for core.Name.suffixes in the tests executable 2020-03-19 18:47:37 +00:00
Paul Chiusano
95b8517bb1 display gets same treatment 2020-03-19 14:30:30 -04:00
Paul Chiusano
781b2ad5d7 Fix #1241 2020-03-19 14:18:56 -04:00
Runar Bjarnason
f77e116579 Handle misses better 2020-03-19 13:04:25 -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
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
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
Arya Irani
cd1aac831c Merge branch 'master' into topic/new-file-sync3 2020-03-12 17:47:19 -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
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
cc9f390849
Merge pull request #1341 from unisonweb/cleanup/stepManyAt0
Some nice cleanup of `stepManyAt0` and friends
2020-03-11 11:46:30 -04:00