Commit Graph

118 Commits

Author SHA1 Message Date
Erik Arvidsson e2f261b142 Go: Compute commit type based on value and parents
We now compute the commit type based on the type of the value and
the type of the parents.

For the first commit we get:

```
struct Commit {
  parents: Set<Ref<Cycle<0>>>,
  value: T,
}
```

As long as we continue to commit values with type T that type stays
the same.

When we later commits a value of type U we get:

```
struct Commit {
  parents: Set<Ref<struct Commit {
    parents: Set<Ref<Cycle<0>>>,
    value: T | U
  }>>,
  value: U,
}
```

The new type gets combined as a union type for the value of the inner
commit struct.

Fixes #1495
2016-07-18 14:28:56 -07:00
Erik Arvidsson 6ffe591329 Go: Change NewCommit API to take value and parents
This is in preparation for computing the commit type when it is
created and to do that we need to have the value and the parents.
2016-07-18 14:17:34 -07:00
Rafael Weinstein 2474a658a2 Better debug info (#2087) 2016-07-18 11:20:48 -07:00
Ben Kalman 534faa6b6d exit noms as soon as less quits, not when stdout closes (#2068) 2016-07-15 10:10:57 -07:00
Rafael Weinstein df6bcf8111 remove codec-perf-rig binary (#2063) 2016-07-14 15:14:06 -07:00
Erik Arvidsson 455ed05251 Update hash.go (#2061) 2016-07-14 14:12:34 -07:00
Aaron Boodman e46e93c663 Limit amount of blob read to service noms log (#2056)
Fixes #2052
2016-07-14 00:51:43 -07:00
Rafael Weinstein 7854e7cb6f Ensure all bytes comsumed on decode (#2048) 2016-07-13 15:30:30 -07:00
Rafael Weinstein 890433e864 Reland js type cache (#2032)
Reland js type cache (#2032)
2016-07-13 15:23:23 -07:00
Erik Arvidsson a92d8ffb21 GoDoc for Hash (#2038)
The comment should go with the package to get picked up by godoc
2016-07-13 11:49:23 -07:00
Mike Gray 4dd9415a1a orderedSequenceDiff more like indexedSequenceDiff - parallel (#1961)
orderedSequenceDiff more like indexedSequenceDiff - parallel and working top-down rather than sequential
2016-07-12 17:57:26 -07:00
Dan Willhite d811fc1aac Merge pull request #1904 from willhite/work
Add CORS code to demo-server and noms-serve.
2016-07-12 16:42:07 -07:00
Rafael Weinstein ad556b0f0f Fix Cyclic Union Types (#2030)
Fix Cyclic Union Types
2016-07-12 16:36:58 -07:00
Dan Willhite ff5876349a Add CORS code to demo-server and noms-serve.
This is necessary to handle x-noms-vers header from browsers.
Adds x-noms-vers header to all responses from demo-server and 'noms serve'.
Fixes #1984. Fixes #1991.
2016-07-12 16:25:21 -07:00
Erik Arvidsson b830762f49 Fix some copyright headers (#2026) 2016-07-12 16:02:32 -07:00
Erik Arvidsson f2a83346ca JS: Change hash function to sha512
For browser support we use npm amscrypto.js-sha512. For node we use its
builtin crypto module.
2016-07-12 13:59:09 -07:00
Erik Arvidsson 1507b8dd8f Go: Change hash function to sha512 2016-07-12 13:59:08 -07:00
Erik Arvidsson c0bc00dee0 Go: Add base32 support library
Our base32 uses 0-9a-v with no padding. The length is hard coded to
20 bytes (and 32 characters)
2016-07-12 13:59:08 -07:00
Erik Arvidsson 777b598631 Integration tests: Print errors to stderr (#2023) 2016-07-12 12:13:34 -07:00
Rafael Weinstein 8a5f3853b7 Revert "Js type cache (#2011)"
This reverts commit 4e10ae63f4.
2016-07-11 18:36:17 -07:00
Rafael Weinstein 48ab930ed2 Revert "Ensure all bytes consumed on decode (#2019)"
This reverts commit cd45787a91.
2016-07-11 18:36:01 -07:00
Rafael Weinstein cd45787a91 Ensure all bytes consumed on decode (#2019)
Ensure all bytes consumed on decode
2016-07-11 18:08:51 -07:00
Rafael Weinstein dea37ba37b remove dead code (#2017) 2016-07-11 17:14:12 -07:00
Rafael Weinstein 4e10ae63f4 Js type cache (#2011)
Js type cache
2016-07-11 16:45:35 -07:00
Erik Arvidsson 5483383acc Make isSubtype work with unions with cycle (#2007)
This is #2001 with some more tests

Previously, we ended up i-looping because we were not correctly
checking for cycles as we descended into union types.

Related to #1495
2016-07-11 14:54:40 -07:00
Mike Gray b6f19dfea5 number encoding (#1845)
Moved to encoding Values of type Number as 2 varints.
2016-07-11 12:08:56 -07:00
Rafael Weinstein f752d1bfba Fix burnDown ordering issue (#1997) 2016-07-08 15:14:12 -07:00
Rafael Weinstein ee5c0f3a72 MakeStructType and NewStructWithType now takes slices rather than maps (#1945)
NewStructType and NewStructWithType now takes slices rather than maps
2016-07-07 16:36:48 -07:00
Rafael Weinstein c38c884810 Checking last codec perf numbers (#1986) 2016-07-07 15:18:28 -07:00
Erik Arvidsson fb4c8624a0 JS integration tests for samples/js/{counter,fs} (#1951)
This adds some a basic integration tests for sample/js/{counter,fs}.

It work pretty much like this:

- Run `npm install`
- Do setup (good place to initialize the database) (optional).
- Start a http store from go.
- Run `node . <args...>`. The IntegrationTestSuite has convenience
  methods to get the spec.
- Do teardown, which is a good time to check the output and the current state of the db (optional).

Towards #1888
2016-07-07 14:00:32 -07:00
Ben Kalman f57353ea89 Include MB and MB/s in sync progress (#1980) 2016-07-06 16:26:13 -07:00
Ben Kalman fa496f59ef Cache leveldb stores created from specs (#1975) 2016-07-06 15:42:21 -07:00
Ben Kalman 53b9ce3c1e Add pull chunk progress to noms sync (#1950) 2016-07-06 15:01:32 -07:00
Aaron Boodman 6243ac01ce Minor fixens to noms command UI (#1978) 2016-07-06 13:14:05 -07:00
Mike Gray a7f29a716d noms as one command line application, with version and help (#1874) 2016-07-06 15:38:25 -04:00
Aaron Boodman 1d752e3101 Update license: Noms will be copyright Attic Labs. (#1976) 2016-07-05 22:07:42 -07:00
Rafael Weinstein 02be382799 cleanup error output (#1965) 2016-07-05 14:03:56 -07:00
Ben Kalman 305f69f670 Only print status every 100ms (#1954) 2016-07-05 11:27:11 -07:00
Rafael Weinstein 05d0b09779 Add back some error output (#1958) 2016-07-02 06:20:54 -07:00
Aaron Boodman 2921ca343c Part 2: Move things that are not samples out of samples/go (#1944) 2016-07-01 11:58:26 -07:00
Aaron Boodman 2386afc7fb Move stuff that is not samples out of samples directory (#1943)
* Move samples/go/*perf-reg to go/perf/

They aren't really samples.

* Move samples/go/util/check_error.go to go/d

* Remove samples/go/util/client_flags.go - unused

* remove httpcache.go - unused

* Remove samples/go/util/rungen.go - no generated code here anymore

* move NomsValueFromJSON to go/util/jsontonoms
2016-07-01 11:04:17 -07:00
Rafael Weinstein c47cc21d56 Remove more assertions which allocate in non-failure cases (#1942) 2016-07-01 10:09:59 -07:00
Rafael Weinstein 93e0eca51f Type cache (#1865)
Go TypeCache
2016-07-01 09:23:11 -07:00
Erik Arvidsson 94ce6b2c69 Print out the real port in noms serve (#1937)
If port 0 is used then the os assigns an available port. This
changes so that we print out that port instead.
2016-06-30 17:03:06 -07:00
Ben Kalman 62a15441da Support the @key annotation in paths (#1934) 2016-06-30 10:43:24 -07:00
Mike Gray 7a1817d287 channels for orderedSequenceDiff (#1926) 2016-06-29 16:56:46 -04:00
Ben Kalman 038192cfcc Make the spec package support types.Path (#1920) 2016-06-29 13:55:05 -07:00
Erik Arvidsson 0dc12c9e3d HRS: Show the size of containers (#1925)
Fixes #1837
2016-06-28 17:04:08 -07:00
Erik Arvidsson 69f4fde87a HRS: Write blobs as hex (#1924)
Instead of writing blobs using base64 we now write the values as
hex (16 per row)

Blob(00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f\n10)

Towards #1837
2016-06-28 16:17:07 -07:00
Erik Arvidsson ba88abfa9b Remove nomdl parser (#1923)
We are not using this any more...
2016-06-28 13:04:24 -07:00