Commit Graph

301 Commits

Author SHA1 Message Date
cmasone-attic dc07bca3d4 Merge pull request #1555 from cmasone-attic/dbcleanup
JS: make sure we call close() on Database most of the time
2016-05-20 08:18:53 -07:00
Mike Gray ade84de2da implementing map/set/orderedSequence diff (#1521)
resolving a portion of issue #1075
2016-05-20 09:20:01 -04:00
Chris Masone 917a4d8564 JS: make sure we call close() on Database most of the time
Other than DatasetSpec::value(), this should close all Database
instances that we create. I'm not sure how to deal with that one
case, though.
2016-05-19 16:49:54 -07:00
Rafael Weinstein 0e87d9f409 goPath (#1546)
Implement Go Path
2016-05-19 13:56:18 -07:00
Erik Arvidsson cd64ee5047 Update clients to 32.2 (#1545)
This updates the clients to use Foo instead of NomsFoo
2016-05-19 11:38:00 -07:00
Rafael Weinstein 4389605e47 Struct diff (#1548)
StructDiff
2016-05-19 11:09:26 -07:00
Erik Arvidsson f653a20511 Make Splore Great Again! (#1541) 2016-05-18 17:57:57 -07:00
Ben Kalman 7f56776a8b Add dist back to .flowconfig (#1544) 2016-05-18 17:51:56 -07:00
Ben Kalman 65f4ae358c Make sequence chunker function return (meta tuple, collection) pair (#1540)
Both Go and JS. Currently they return (any, value), but it's useful to
have the more specific return type.
2016-05-18 16:01:13 -07:00
Erik Arvidsson 778acf8454 Make OrderedPutCache throw in browsers (#1539)
This is a stop gap to ensure that the browser version does not depend
on nodejs modules.

Fixes #1531
2016-05-18 15:28:09 -07:00
Erik Arvidsson d67d1fb924 Make Map use Array<[K, V]> instead of Array<K | V> (#1538) 2016-05-18 15:16:08 -07:00
Rafael Weinstein 4d47b9cf18 jsPath (#1527) 2016-05-18 14:35:26 -07:00
Erik Arvidsson 643c12172b Noms data structure names (#1525)
* Change to default exports

* Rename NomsX to X in (Blob, List, Map, Set)

* Increment version
2016-05-18 09:26:36 -07:00
Erik Arvidsson 17a78061c0 Struct subtype (#1524)
* Subtype checking for structs

Towards #1491
2016-05-18 09:06:53 -07:00
Erik Arvidsson df1c91843d JS: No need to compute the union type in decode (#1523)
* JS: No need to compute the union type in decode

Instead trust that the serialization is correct

Towards #1491
2016-05-17 15:39:18 -07:00
Erik Arvidsson 653aa41776 Go: Dynamic types for Data structure API (#1516) 2016-05-17 15:02:53 -07:00
Chris Masone 41d5ff8063 JS: add http idle timeout
Node's http.ClientRequest supports setting an idle-timeout, so
just go ahead and do that. Setting to 2 minutes to match Go.

Fixes #1414
2016-05-17 14:11:34 -07:00
Erik Arvidsson d125446955 Clear dist before publish (#1480)
This is so that we do not keep old files around.

Fixes #1380
2016-05-16 19:13:44 -07:00
cmasone-attic e0eb7bc297 JS: back BatchStore's put-cache with tingodb (#1479)
* JS: back BatchStore's put-cache with tingodb

tingodb is a pure-JS, file-backed mongodb-api-compatible database.
Before this patch, BatchStore was caching all pending chunks in memory,
which seems unlikely to scale. Putting them in a tingodb spills them to
disk as needed, though we can still iterate them in put-order when it's
time to send them.

Fixes #1349
2016-05-16 14:38:25 -07:00
Erik Arvidsson 5db7fe8285 JS: Update the collection/struct API to compute the type. (#1502)
When you create or modify a data structure we now compute the type
based on the type of the values in the data structure.

Towards #1491
2016-05-16 10:58:50 -07:00
Ben Kalman 5caad77f81 js/walk: allow callback to return boolean in addition to Promise (#1511) 2016-05-16 10:52:31 -07:00
Erik Arvidsson 2883609860 Update makeUnionType type to flatten and remove duplicates (#1492)
makeUnionType now flattens and removes duplicate types. With this
change makeUnionType might no longer actually create a union
type in the case there is only one type in the union.

Towards #1491
2016-05-13 09:21:03 -07:00
Erik Arvidsson 58464baef9 Total ordering of values (#1475)
This allows having a set/map of heterogenous elements/keys. To support
this we have to be able to have a total ordering for all noms values.

The ordering is false < true < -999 < 0 < 999 < "" < "a" < "z" < Hash
In other words, Bool < Number < String < * and for comparing non
primitives we compare the hash of the object.

Fixes #1104
Fixes #1312
2016-05-12 10:35:56 -07:00
Erik Arvidsson e832dbbdb1 Revert "Limit struct field names to ascii identifiers" (#1483) 2016-05-11 16:19:57 -07:00
Erik Arvidsson 5e09379d57 Limit struct field names to ascii identifiers (#1469)
[a-zA-Z][a-zA-Z0-9_]*

Towards #1402
2016-05-11 15:49:03 -07:00
Erik Arvidsson acec0ffa4e Micro optimize Buzhash (#1482)
- All bitwise operators already return int32 (or uint32) so we can remove the `| 0`
- Inline constants that are only used once

Towards #1465
2016-05-11 15:17:12 -07:00
Rafael Weinstein 9db78e9a66 Refactor Go prolly-trees (#1474) 2016-05-11 14:27:39 -07:00
Mike Gray 3f7561a7ac using collection tests for map/set (#1441)
also adding a cross platform/language test
2016-05-11 09:02:40 -04:00
Rafael Weinstein 1c90201f49 Make JS Sequence not be values (#1470) 2016-05-10 14:19:39 -07:00
Rafael Weinstein 256d29708d Minor change to js meta sequence constructor (#1463) 2016-05-09 15:39:16 -07:00
Aaron Boodman 14c377fc7b Export BuzHash from js/noms. (#1462)
This is kind of non-ideal, but I need it in order to easily make a
hash performance test rig.
2016-05-09 14:33:01 -07:00
Rafael Weinstein 1c08476934 Fix searching for inlined non-primitives in js (#1458) 2016-05-09 10:57:33 -07:00
Erik Arvidsson 014e330315 Rename DataStore to Database (#1448) 2016-05-06 17:37:19 -07:00
Erik Arvidsson c8ce81d6ba Serialize meta tuple with ref value (#1443)
When we serialize a meta tuple we should serialize it with the Ref value (which includes the type). This is because in the future the sub tree might be of a different type than the current tree.

Towards #1312
2016-05-06 13:25:23 -07:00
Ben Kalman 2e7eafed25 Update noms npm version to 24.0.0 (#1436) 2016-05-05 17:12:41 -07:00
Erik Arvidsson bcd8d7e172 Add union types (#1417)
A union type is a compound type with 0 or more types.

Its noms serialization is UnionKind, <number-of-types>, T0, ..., TN

Its HRS is T0 | T1 | ... | TN

Towards #1311
2016-05-05 15:43:11 -07:00
Rafael Weinstein 057f4e0423 Temporarily raise the test timeout 50% (#1432) 2016-05-05 15:26:00 -07:00
Ben Kalman e7219f3603 Add height to every RefValue (#1415)
This is to support efficient chunk diff. Most of the churn in this patch
comes from updating test expectations, and updating every Ref construction
to include a height and every MetaTuple to include a Ref.
2016-05-05 10:11:05 -07:00
Aaron Boodman d159d25583 Introduce walk.js (#1419)
* Introduce walk.js

* review comments
2016-05-05 09:25:43 -07:00
Rafael Weinstein 5da29dc1f1 Remove test dependencies of private list api (#1416) 2016-05-04 15:00:18 -07:00
Erik Arvidsson c9d176cb28 Cleanup serialization of types (#1410)
We used to serialize types in two different ways, depending on whether
the type was used as a tag or as a value. Now we serialize it the same
way.

Also, remove makeCompoundType completely.

And remove some dead code.
2016-05-04 11:35:33 -07:00
Erik Arvidsson 963fbdaad6 Write type with value (#1406)
Write type for all values

Fixes #1308
2016-05-03 16:52:22 -07:00
Rafael Weinstein e69b163c6d Abstract JS list tests (#1398) 2016-05-03 14:28:28 -07:00
Chris Masone aa0b0fd658 JS: Maintain validation cache on DataStore across Commit
While this causes the cache to potentially grow infinitely, having a
DataStore keep track of every value it's read or written makes it
simpler to program with. Once RefValues can only come to be by being
read out of a DataStore, we can do away with this altogether.

The big changes here are that DataStore now has a ValueStore, instead
if extending ValueStore. The DataStore constructor now takes a
ValueStore, so that new instances re-use the same ValueStore can be
constructed on Commit. Since callers don't care about that detail,
this change exports NewDataStore(), which still takes a BatchStore.
2016-05-03 13:11:01 -07:00
Erik Arvidsson 3032c76a39 Use a map for the struct fields
Fixes #1368
2016-05-02 15:35:27 -07:00
Chris Masone 9626ad5b42 Fix JS chunk serialization to use network byte order
Fixes #1370
2016-05-02 12:32:59 -07:00
Chris Masone e45aa532a3 Manually update new version for JS SDK 2016-05-02 11:52:12 -07:00
Rafael Weinstein 4468625ce0 Update flow to 24.1 (#1385)
Update flow to 24.1
2016-05-02 11:45:49 -07:00
cmasone-attic 7ef62df1f4 Switch to network-byte-order in DataStore wire format (#1386)
* Switch to network-byte-order in DataStore wire format

Fixes #1370
2016-05-02 11:44:53 -07:00
Ben Kalman 8cc0c35829 Change MetaTuple to work with RefValue, not Ref (#1372)
Change MetaTuple to work with RefValue, not Ref
2016-05-02 11:17:18 -07:00