Commit Graph

784 Commits

Author SHA1 Message Date
Erik Arvidsson a60de44b13 Generated code 2015-10-23 11:04:41 -04:00
Erik Arvidsson 91e7ffb8e1 NomDL Codegen: Parameterize the types package
This allows us to use the codegen from types/ without manual touchups
2015-10-23 11:04:30 -04:00
cmasone-attic 8a8aa9c647 Merge pull request #458 from cmasone-attic/issue391
Make generated enum types implement types.Value
Fixes #391
2015-10-22 10:57:12 -07:00
Chris Masone e810716e45 remove unreachable case 2015-10-22 10:56:13 -07:00
Chris Masone 612ca18cf5 generated code 2015-10-22 09:56:31 -07:00
Chris Masone 1486d84487 Make generated Enum types implement types.Value
Fixes #391
2015-10-22 09:56:26 -07:00
Erik Arvidsson 3b20144ed8 NomDL: Clean up namespace handling in New calls
Fixes #449
2015-10-22 12:38:56 -04:00
Erik Arvidsson d668d05801 WriteValue minor fix 2015-10-22 12:36:15 -04:00
Erik Arvidsson 71197cb4e7 Generated code 2015-10-22 12:33:39 -04:00
Erik Arvidsson 8c4bc79fcd NomDL: Remove $type from struct impl
The implementation of structs is a Map and we used to reserve a key
with the name "$type" for the TypeRef. This is no longer needed since
the TypeRef is a constant per struct and needs no storage.

Fixes #450
2015-10-22 12:33:39 -04:00
Erik Arvidsson 64217a8548 Generated files 2015-10-22 10:49:06 -04:00
Erik Arvidsson 3a5bb571fb NomDL: Remove NomsValue() 2015-10-22 10:47:14 -04:00
Erik Arvidsson fa71853c4a Merge pull request #448 from arv/new-serialization-default
NomDL: Make the new serialization default
2015-10-22 09:47:28 -04:00
Erik Arvidsson 0b80508047 Fix Commit to use Set(Ref(Commit)) 2015-10-21 19:29:11 -04:00
Erik Arvidsson afeef44020 Updated generated code 2015-10-21 19:04:22 -04:00
Erik Arvidsson 16353f38f8 NomDL: Make the new serialization default
This makes the new typed serialization the default (the old
serialization is not used but the code has not been cleaned up yet).

Some things are no working in the new world:

Chunking -  The compound list is not working correctly any more. The
Chunks method is having issues because it assumed things based on the
old implicit chunking.

Commit - uses a `Set(Commit)` which means that the parent commit is
embedded. We need to change that to be `Set(Ref(Commit))` so that the
parent commit is referenced instead.
2015-10-21 19:04:22 -04:00
Dan Willhite c16c414cd4 Merge pull request #447 from willhite/empty-ref
Add IsEmpty() function on ref.Ref.
2015-10-21 12:22:26 -07:00
Dan Willhite bb2f983446 Add IsEmpty() function on ref.Ref.
Fixes #337.
2015-10-21 12:07:34 -07:00
Erik Arvidsson 91f720be81 NomDL: Need to include the deps in the package 2015-10-21 09:17:35 -04:00
Erik Arvidsson 55436d745b Disable old codegen for tagdex since it depends on non existing util.PhotoTypeDef 2015-10-21 09:07:10 -04:00
cmasone-attic 0378a1dcfe Merge pull request #444 from cmasone-attic/issue431
Update import paths in clients/sfcrime_search
2015-10-20 16:04:24 -07:00
Chris Masone 1dd032cc63 Update import paths in clients/sfcrime_search 2015-10-20 16:02:24 -07:00
cmasone-attic ce9ae17526 Merge pull request #432 from cmasone-attic/issue431
Update sfcrime_search to use shared Geoposition & Georectangle
2015-10-20 15:52:12 -07:00
Rafael Weinstein d963ce537a Merge pull request #443 from rafael-atticlabs/flickrNomdl
Update Flickr to use nomdl. Fixes #426
2015-10-20 15:41:38 -07:00
Rafael Weinstein 2b67f64aac Update Flickr to use nomdl 2015-10-20 15:40:25 -07:00
Erik Arvidsson 32cc756778 Merge pull request #440 from arv/unresolved-type-ref
NomDL Serialization: Need to handle Name and Namespace
2015-10-20 15:39:15 -04:00
Erik Arvidsson c217ffc74a NomDL Serialization: Need to handle Name and Namespace
MakeUnresolvedTypeRef has a Name and a Namespace and we should
serialize these too or we break Ref equality
2015-10-20 15:24:33 -04:00
Chris Masone a8cea4d16c Update sfcrime_search to use shared Geoposition & Georectangle
Towards issue #431
2015-10-20 12:10:27 -07:00
Aaron Boodman e2e51a3ae7 Merge pull request #438 from aboodman/server-port
server: print port listening on at startup
2015-10-20 10:54:33 -07:00
Aaron Boodman 64a4c1ee2f Merge pull request #437 from aboodman/splore-readme
splore: Add a README
2015-10-20 10:39:42 -07:00
Aaron Boodman 9118530e53 server: print port listening on at startup 2015-10-20 10:28:31 -07:00
Aaron Boodman 5e44339bd3 splore: Add a README 2015-10-20 10:25:36 -07:00
Erik Arvidsson d6869cef35 NomDL: Make Package a primitive type
This solves the bootstrapping problems we are encountering.

Previously Package was a Struct but structs depend on Package.
2015-10-20 10:26:00 -04:00
cmasone-attic 9914a89a94 Merge pull request #430 from cmasone-attic/issue409
Create shared 'geo' Noms types package
2015-10-19 16:14:37 -07:00
Chris Masone 039c667689 fixup rungen.go 2015-10-19 15:43:32 -07:00
Chris Masone 4169f2af3a Create shared 'geo' Noms types package
First cut at creating a shared Noms types package, by creating
'geotypes.noms' to define Geoposition and Georectangle. These are
shared by quad_tree and sfcrime_importer initially, but will also
by used by sfcrime_search and the stuff that works with photos.

quad_tree used to add methods to the generated Geoposition and
Georectangle types. This doesn't work anymore, since these types
are now generated as part of a separate Go package. Fortunately,
these methods are easily re-cast as pure functions.

Towards #409
2015-10-19 15:19:01 -07:00
cmasone-attic 272a4632c5 Merge pull request #429 from cmasone-attic/issue420
pkg.Parsed should embed a types.Package, not a types.PackageDef
2015-10-19 11:26:04 -07:00
cmasone-attic f75aa67532 Merge pull request #424 from cmasone-attic/nonempty
NewDataset() should refuse to accept "" as the datasetID
2015-10-19 11:23:40 -07:00
Chris Masone e249f11347 pkg.Parsed should embed a types.Package, not a types.PackageDef
Doing so makes it so we don't create new Package instances all over codegen.go

Fixes #420
2015-10-19 11:22:16 -07:00
Chris Masone f9e39f1b89 NewDataset() should refuse to accept "" as the datasetID
Also, update codegen.go to use a sensical default if nothing is provided
on the command line.
2015-10-19 10:45:53 -07:00
cmasone-attic 3d658ecfb9 Merge pull request #415 from cmasone-attic/buggy
Introduce UnresolvedKind, so TypeRefKind isn't overloaded.
2015-10-19 09:59:54 -07:00
Chris Masone 9b225dce9b Introduce UnresolvedKind, so TypeRefKind isn't overloaded.
We'd wound up in a spot where serialization code used 'TypeRefKind' to
mean one of two very different things...either an actual value that
describes some Noms type, or a reference to a type definition that
lives somewhere else. To get rid of this ambiguity, we introduce
'UnresolvedKind' to take over the latter meaning. Now, TypeRefKind
means _only_ a value that describes a type. If you want to point off
to a type definition elsewhere in the type package, or in another
type package, use UnresolvedKind.
2015-10-19 09:58:27 -07:00
Erik Arvidsson e9f5b1e2b5 NomDL codegen: Clean up write and improve ordering
Now we write the named types first, then the using types and finally
the inline type defs in the order that they were defined.
2015-10-19 11:39:58 -04:00
Erik Arvidsson e445d8a240 NomDL: Rename SetOrderedType to SetTypes
I missed this when I renamed the field previously
2015-10-19 10:33:57 -04:00
Erik Arvidsson ba5139a5c4 NomDL codegen: Followup cleanup
Just renaming the parameters back to normal names
2015-10-19 09:35:34 -04:00
Erik Arvidsson f064d35253 NomDL: Move pkgRef to UnresolvedDesc
Only unresolved type refs should have a package ref.
2015-10-16 19:39:49 -04:00
Erik Arvidsson 36d9362628 NomDL: Use ordinal for unresolved type refs
Instead of using the name of the type we now use the index of the type
in the Package that defines it.
2015-10-16 17:46:15 -04:00
Ben Kalman 87ad6a3484 Merge pull request #412 from kalman/list-value-interface
Make List embed the Value interface rather than redefining all methods.
2015-10-16 14:01:30 -07:00
Benjamin Kalman a1b824e114 Make List embed the Value interface rather than redefining all methods. 2015-10-16 12:26:29 -07:00
cmasone-attic 2a18c3f499 Merge pull request #411 from cmasone-attic/issue399
Import .noms files by path

.noms files can now import other .noms files by relative or absolute path.

Fixes #399
2015-10-14 15:49:23 -07:00