Commit Graph

2942 Commits

Author SHA1 Message Date
Erik Arvidsson
bc40db4fdb Make UTF-8 encode/decode write directly to a buffer (#2566)
We used to use a third party module that allocated new buffers all
the time. For Noms, we already have a buffer that we want to write
to.

For the rolling hash we use a scratch buffer that we reuse between
calls.

This also removes the DataView objects. Our usage is so basic that
having a DataView object wrapper is just overkill.

Fixes #2304
2016-09-20 11:09:31 -07:00
Eric Halpern
27cbfdd489 Fix noms-sync surprising quantity (#2531)
* Use sampling for a better bytes-written estimate for noms sync
* Confirmed that remaining overestimate of data written is consistent with leveldb stats and opened #2567 to track
2016-09-20 10:57:40 -07:00
Dan Willhite
1a7bfd0627 Cleanup Prefix and MaxLine writers (#2591)
These were previously intertwined into one writer that was
embedded in and only usable by the 'noms' command.
This commit separates them into to separate writers that
can be used independently or combined. I also moved them
into go/utils/writers so they can be used by other code.

The main impetus to do this was to fix Bug #2593.
2016-09-20 10:31:16 -07:00
Mike Gray
f00157a728 Add unit tests for commit metadata (#2595) 2016-09-19 16:50:06 -04:00
Erik Arvidsson
e3bea0f274 Tweak the display of the type of an empty Map (#2590)
Fixes #2247
Closes #2252
2016-09-16 17:48:47 -07:00
Erik Arvidsson
ee1db61bba Remove TypeDesc equals (#2584)
This method was not being used.

Major Version Change: equals was part of exposed public API of *Desc
2016-09-16 13:59:19 -07:00
Ben Kalman
08bb4597d7 Blackbg (#2586)
DashCast makes the background color black, which makes sense for
displaying on a TV screen anyway - easier on the eyes, less distracting,
probably less power usage. Looks fine black on a computer screen too.
2016-09-16 13:15:29 -07:00
Mike Gray
c4d67bb097 Make codecov Slack integration not emit 'template string' (#2585) 2016-09-16 11:22:17 -07:00
Ben Kalman
068eb0cb71 Go sequence interface/struct hierarchy refactor (#2583)
This makes a number of changes to simplify code:
1. metaSequence is now a struct, not an interface
2. orderedMetaSequence and indexedMetaSequence is gone
3. metaSequenceObject is gone
4. indexedSequence is gone
5. add leafSequence struct for leaf sequences to embed

Everything but change 5 was done by rafael@atticlabs.io.
2016-09-16 11:18:41 -07:00
Ben Kalman
e77dc74f32 Update run_perf_builder.py to run 'go test' commands sequentially (#2582)
This changes effectively:

> go test ./go/types/perf ./samples/csv/csv-import <etc>

to:

> go test ./go/types/perf <etc>
> go test ./samples/csv/csv-import <etc>

The perf results started going crazy when I started running a second
test package (./go/types/perf), this is one reason why it may have
happened. It's hard to say for sure what go test is doing.
2016-09-15 16:47:53 -07:00
cmasone-attic
96cc9ffb1c Add FindCommonAncestor for Commits (#2579)
Once we integrate noms-merge into the `noms commit` command, this
function will allow us to stop requiring users to pass in the common
ancestor to be used when merging. The code can just find it and merge
away.

Toward #2535
2016-09-15 16:00:52 -07:00
cmasone-attic
e498abb0c6 Improve Go merge package code coverage (#2581)
Add some additional tests to cover more failure cases.
2016-09-15 15:58:41 -07:00
Erik Arvidsson
d6991a0f7a Add code coverage to js/noms too (#2580) 2016-09-15 15:47:05 -07:00
Mike Gray
d3666b0b6f Run python unittests; configure codecov via YAML (#2578) 2016-09-15 15:08:52 -07:00
Mike Gray
7d9c373da9 Add codecov.io badge and submit coverage data from builds (#2577) 2016-09-15 12:14:00 -07:00
cmasone-attic
2660d47ca9 Add comment referencing potential infinite Commit loop (#2576)
This comment was meant to be part of a previous patch. It points
out the code to which bug #2565 applies.
2016-09-15 08:29:56 -07:00
Mike Gray
c311505e08 Add link to download Noms binaries (#2573) 2016-09-15 07:14:29 -07:00
Ben Kalman
c063b51ae7 Add go/types/perf to perf build tests (oops) (#2572) 2016-09-14 17:12:56 -07:00
Ben Kalman
c8e72b20c9 Support multiple perf datasets in the perf UI (#2571)
The 'ds' parameter can now have multiple comma separated datasets, and
every time the page refreshes (which now happens programmatically, not
via location.reload) it shows the next.
2016-09-14 17:05:41 -07:00
Ben Kalman
e156791329 Add go/types to perf builder tests (#2568) 2016-09-14 15:27:48 -07:00
Mike Gray
5c13e0ccec Build go binaries for multiple platforms (#2564) 2016-09-14 14:28:38 -07:00
Ben Kalman
da336c3aab Introduce List.Concat to the Go API (#2550)
It exploits the chunked structure of Lists to allow concatenating
arbitrarily large Lists.

I've added both functional and perf tests for Concat, and the perf tests
only made sense with tests for building and reading Lists, so now we
have those too.
2016-09-14 14:15:14 -07:00
cmasone-attic
55caa0f519 Allow changes to different Datasets to proceed concurrently (#2533)
Prior to this change, concurrent modification of two different
Datasets in a given Database would result in an
ErrOptimisticLockFailed for whichever process lost the race. As of
this patch, concurrent changes to the _same_ Dataset will result in an
ErrMergeNeeded for the loser, but concurrent changes to different
Datasets will succeed.

Fixes #2524
2016-09-14 13:56:30 -07:00
Erik Arvidsson
5edf89cf3d Replace d.Chk.True with d.PanicIfFalse (#2563)
And same for d.Chk.False
2016-09-14 13:11:28 -07:00
Erik Arvidsson
601db6bd89 Change type of callback for List/Set/Map forEach (#2562)
No need to restrict what type of promise the callback returns
2016-09-14 11:56:40 -07:00
Erik Arvidsson
8fbcb58ca7 Add jsdoc/godoc for List (#2554)
Towards #2297
2016-09-14 11:16:42 -07:00
Erik Arvidsson
68b3de35bf More jsdoc for value (#2555)
Towards #2297
2016-09-14 10:59:22 -07:00
Erik Arvidsson
679305dad3 Add jsdoc/godoc for Hash and Value (#2553)
Towards #2297
2016-09-13 17:55:19 -07:00
Erik Arvidsson
435b675c3f Update to a newer version of documentation.js (#2552)
To pick up a bug fix related to sorting
2016-09-12 16:51:56 -07:00
Dan Willhite
ce763cb704 Fix test so temp db is cleaned up (#2546) 2016-09-12 15:14:48 -07:00
Erik Arvidsson
4082fb14c4 Add a bare bones landing page to docs.noms.io (#2547)
Towards #2532
2016-09-12 14:08:45 -07:00
Erik Arvidsson
d9ebf6ac90 flickr/slurp: Treat fail as an error (#2544)
Reject the promise when we get a fail status.
2016-09-12 13:57:33 -07:00
Erik Arvidsson
0b2eb226bc Generate js docs in /js/ (#2543)
Also keep the hash when redirecting

Towards #2532
2016-09-12 13:11:57 -07:00
Adam Leventhal
df677ad0b4 noms diff should exit after the pager exits (#2526) 2016-09-09 21:46:00 -07:00
Erik Arvidsson
d3198b9ba3 Update to latest documentation.js (#2540)
This picks up my commits to discover all exported bindings as well as
sorting the docs alphabetically.

Towards #1471
2016-09-09 14:01:27 -07:00
Erik Arvidsson
c1ed55e009 Fix JSDoc (#2539) 2016-09-09 11:32:24 -07:00
Mike Gray
1996e0a3d8 Add Noms commit command (#2474)
* Add "noms commit" command
* Updated csv-import, json-import, xml-import and url-fetch to (optionally) not commit results
* Added helpers for creating commit meta-data struct through command line or function calls
2016-09-09 12:42:27 -04:00
Erik Arvidsson
e070500f20 Fix lint error (#2537)
The line length exceeded 100 cols
2016-09-09 09:05:42 -07:00
Erik Arvidsson
59b17762fe Update JSDoc 2016-09-08 18:45:38 -07:00
Erik Arvidsson
70004e1699 Let splore use versioned URLs too (#2530) 2016-09-07 18:05:14 -07:00
Erik Arvidsson
3d83e4e72f Allow stage.py to create the staging dir (#2528)
Previously, it was required to already exist
2016-09-07 14:24:16 -07:00
Erik Arvidsson
dbe0556c63 Rename files to their hashes when staging (#2515)
This add two keyword arguments to the GlobCopier:
- rename - if True, will rename the files to include their hash
- index_file - if present, then the paths in this file here will be
  updated to the renamed paths.
2016-09-07 13:34:14 -07:00
cmasone-attic
1c69c6b891 Update merge.ThreeWay() to allow very basic custom conflict resolution (#2505)
This patch modifies merge.ThreeWay() to take a callback that allows
for custom conflict resolution. The noms-merge command-line tool uses
this to inject a callback that accepts input from the console
dictating whether to accept the value from the 'left' or 'right' merge
candidates.

Toward #2445
2016-09-07 13:21:22 -07:00
zcstarr
ef817db179 Adds error for invalid skip records argument and exits csv importer (#2522) 2016-09-06 17:37:05 -07:00
zcstarr
b1c0aeb9c5 Adds checks for bad column-type and header csv-import flag values (#2525) 2016-09-06 17:12:21 -07:00
zcstarr
ef11062cab Fixes bug where delimiter applied to header arguments (#2523) 2016-09-06 16:50:05 -07:00
zcstarr
65131432c7 Fix cmdline help message color argument (#2520) 2016-09-06 14:59:01 -07:00
cmasone-attic
652613d09e Go: Add List.IteratorAt() and use in list merging (#2512)
When merge.ThreeWay() merges list splices, it frequently needs to
extract a slice of a List or check whether a given range of values is
exactly equal in two different Lists. Repeatedly Getting elements from
a List is expensive, because it creates a new cursor internally every
time. Adding IteratorAt(idx uint64) allows code to iterate over a
range of a List while only creating a cursor once. This allows a slice
of Values to be extracted or used in comparisons efficiently.

Toward #2445
2016-09-06 13:50:08 -07:00
Erik Arvidsson
061f7694ad JS: Fix subtype issue with unions as elem types (#2518)
For compound types (List, Set, Map, Ref) the concrete type may be a
union. If that is the case all the types in the union must be a
subtype of the concrete type's element type.

`C<T | V>` is a subtype of `C<S>` iff T is a subtype of S and V is a
subtype of S.
2016-09-06 13:38:51 -07:00
Mike Gray
47565f39d1 Improve code based on tool analysis feeback (#2521)
Fixes are based on Go report card output:
- `gofmt -s` eliminates some duplication in struct/slice initialization
- `golint` found some issues like: `warning: should drop = nil from declaration of var XXX; it is the zero value`
- `golint` found some issues like: `warning: receiver name XXX should be consistent with previous receiver name YYY for ZZZ`
- `golint` says not to use underscores for function/variable names
- `golint` found several issues like: `warning: if block ends with a return statement, so drop this else and outdent its block`

No functional changes are included - just source code quality improvements.
2016-09-06 16:35:25 -04:00