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
Ben Kalman
7ebc0f2feb
Rename NewTypedRefFromValue to NewRef and old NewRef to constructRef ( #1427 )
...
This is because:
* All type.Ref are now typed, so Typed was a tautology.
* The only way to construct a type.Ref is with a Value, so FromValue was
a tautology (with a small amount of work to remove callers of NewRef).
2016-05-11 18:06:17 -07:00
Rafael Weinstein
a3b18b3f62
Clean up go collection mutation ( #1485 )
2016-05-11 17:46:17 -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
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
08d306a1dc
refactor go ordered sequence operations ( #1461 )
2016-05-09 15:31:35 -07:00
Rafael Weinstein
fea517be33
refactor go indexed sequence operations ( #1457 )
2016-05-09 13:48:19 -07:00
Rafael Weinstein
1c08476934
Fix searching for inlined non-primitives in js ( #1458 )
2016-05-09 10:57:33 -07:00
Erik Arvidsson
e2f7776614
noms show should stream to stdout ( #1456 )
2016-05-06 18:15:52 -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
Rafael Weinstein
d5495c64ef
Align go & js sequence cursor ( #1435 )
...
Align go & js sequence cursor
2016-05-05 19:17:09 -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
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
Mike Gray
cd22583bac
removing leaf references from map/set tests, using only map/set public api for tests ( #1421 )
2016-05-05 08:39:56 -04:00
Rafael Weinstein
043a2374da
Remove parallel collection functions ( #1420 )
2016-05-04 17:27:16 -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
Chris Masone
202596169f
Guard EncodedHumanReadable() call in checkChunksInCache
...
Turns out this can crash sometimes and is always
very expensive. Remove it.
2016-05-04 11:10:32 -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
Chris Masone
9684881b5f
Go: 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 types.Ref can only come to
be by being read out of a DataStore, we can do away with this
altogether.
2016-05-03 10:19:24 -07:00
Dan Willhite
c2c6ee037c
Merge pull request #1393 from willhite/work
...
Implement noms-show. Fixes #1148 .
2016-05-02 16:04:29 -07:00
Dan Willhite
ab3ebf52d3
Implement noms-show. Fixes #1148 .
2016-05-02 15:56:41 -07:00
Erik Arvidsson
3032c76a39
Use a map for the struct fields
...
Fixes #1368
2016-05-02 15:35:27 -07:00
Chris Masone
5eda7e8243
Align Go and JS implementations of ValueStore.WriteValue()
...
Fixes #1377
2016-05-02 11:54:23 -07:00
Rafael Weinstein
93f9941b9f
Abstract & unify blob tests
2016-05-02 10:34:41 -07:00
Chris Masone
8eba180782
Revert "renaming datastore to database ( #1374 ) - fixes bug #1290 "
...
This reverts commit d77902b323 .
2016-05-02 09:01:44 -07:00
Mike Gray
d77902b323
renaming datastore to database ( #1374 ) - fixes bug #1290
...
* datastore -> database
* fixing bug 1290, renaming datastore to database
2016-05-01 22:02:16 -04:00
Erik Arvidsson
6f972c9d7c
Make the order of struct fields insignificant ( #1367 )
...
The fields are now sorted upon creation
Fixes #814
2016-04-29 21:16:13 -07:00
Erik Arvidsson
d4d6de6a76
Rename Field t to type ( #1366 )
...
* Rename Field t to type
* Fix clients/csv too
2016-04-29 13:47:52 -07:00
Erik Arvidsson
0dec930bca
Remove ParentDesc ( #1364 )
...
The Parent type pointer is only internally used in encoding/decoding
2016-04-29 13:47:40 -07:00
Erik Arvidsson
6730227136
Rename BackRef to Parent ( #1357 )
...
Fixes #1340
2016-04-29 09:50:35 -07:00
Erik Arvidsson
cfc51e2e9d
Remove optional fields ( #1354 )
...
Remove optional fields
Fixes #1310
2016-04-28 17:12:15 -07:00
Erik Arvidsson
fa742aecb1
Remove unions from structs ( #1345 )
...
Fixes #1344
2016-04-28 11:13:59 -07:00
Erik Arvidsson
3ff6ee6add
Inline struct type declaration into chunk ( #1324 )
...
Struct type definition is now inlined into the chunk. To break
cycles we use back references.
- Removes unresolved type refs
- Removes packages
Fixes #1164
Fixes #1165
2016-04-27 20:39:51 -07:00
Erik Arvidsson
a5ebffe076
Fix failing js codegen tests ( #1332 )
...
* Fix failing js codegen tests
- Need to pick up version 13
- Fixes spurious import
* Remove left over Int64/Uint64 and fix ordering tests
2016-04-27 16:15:47 -07:00
Erik Arvidsson
6779a60a39
Merge branch 'floating' of https://github.com/mikegray/noms into mikegray-floating
2016-04-27 15:18:10 -07:00
Mike Gray
47794ca754
Removing [U]Int[8|16|32|64] and Float[32|64] in favor of Number
2016-04-27 16:24:13 -04:00
Mike Gray
6fdac73cb1
Merge pull request #1316 from mikegray/uniquely
...
verify unique keys during map construction, bug #1227 fixed
2016-04-27 09:42:37 -04:00
Mike Gray
e2f762bc60
verify unique keys during map construction
2016-04-27 09:40:27 -04:00
Rafael Weinstein
5a4819d7b8
Mark long tests in types
2016-04-26 17:26:04 -07:00
Rafael Weinstein
5dca070f17
Remove noop cache
2016-04-25 11:48:01 -07:00
Rafael Weinstein
24826ade3d
Remove common noms file & RefBase
2016-04-25 11:20:01 -07:00
Rafael Weinstein
aead78eeb9
Removed package_registry.go
2016-04-25 10:45:37 -07:00
Dan Willhite
32bb498339
Replace Commit type with types.Struct().
...
Remove last vestiges of codegen in datas. Fixes #1296 .
2016-04-25 10:24:09 -07:00
Erik Arvidsson
423d3a87ec
Make MakeCompoundType package private ( #1304 )
...
And same for MakePrimitiveType. This also makes sure that we return
the same primitive type every single time.
Fixes #1271
2016-04-22 17:49:27 -07:00
Erik Arvidsson
a2cf351cf8
Change "Json" to "JSON" in go code ( #1302 )
2016-04-22 16:25:28 -07:00
Erik Arvidsson
02c47661fd
Make all usages of Type in Go use pointers ( #1295 )
...
This is in preparation of allowing back references which requires
pointers to be able to compare that the structs are the same.
2016-04-22 15:19:42 -07:00