コミットグラフ

322 コミット

作成者 SHA1 メッセージ 日付
Cory Slep
436def09b4 Add orderedItems property and properly propagate it.
- Fix bug where non-inherited properties didn't apply to a type, only
  the type's children.
- Added orderedItems.
- Excluded items property from OrderedCollectionPage.
- Fixed OrderedCollectionPage extending from two types.
2019-02-06 22:18:08 +01:00
Cory Slep
4ca4b8235f Remove interface based Resolver types.
They do not work as intended, due to differing signature for the
LessThan generated methods.
2019-02-06 20:39:30 +01:00
Cory Slep
9fc75b87b8 Regen code with dependency injected type property constructor. 2019-02-06 20:28:32 +01:00
Cory Slep
a69135b238 Inject the type property constructor at init time.
Undoes the static linking done two commits ago.
2019-02-06 20:27:19 +01:00
Cory Slep
32beb6881e Regenerate types from previous commit, passing all streams_old tests.
See previous commit message about improvements needed to reduce the
linking hell that is introduced in this code generation. Everything is
now linking against the 'type' property's concrete constructor.
2019-02-06 00:55:41 +01:00
Cory Slep
bc058086d2 Type properties automatically set at creation.
All tests pass. However:

- Need to inject the type property constructor at init time, much like
  the manager. Statically linking sucks and really slowed it down with
  the direct linking method currently being used. I suspect this makes
  it no longer compile on a Raspberry Pi 3, so even more of a reason to
  do it at init time.
- Having the type property automatically set at construction time is an
  extremely nice feature lacking in v0.
- Unfortunately, right now this introduces a hack in the convert
  package.
- Modified the 'type' property definition to also be a string for major
  convenience; it has no semantic significance as xsd:string.
2019-02-06 00:51:35 +01:00
Cory Slep
9f79250293 Regenerate streams package with previous commit fixes. 2019-02-06 00:26:21 +01:00
Cory Slep
f90d161ed1 Bugfixes as part of testing.
- Add missing ActivityPub actor and object properties
- Introspect type when deserializing
- Unknown on properties is now an interface
- Can now generate code when an extends hierarchy is specified multiple
  times as a range.
2019-02-06 00:23:47 +01:00
Cory Slep
7beafb477f All streams_old tests passing.
- Type resolution can handle multiple string types now.
- Stability in Disjoint/Extends/ExtendedBy literal generation, reducing
  code generation noise.
- Stability in init function package code generation, reducing the noise
  further.
2019-02-04 23:04:19 +01:00
Cory Slep
ff885a86b3 Update generated code for tests.
All but 1 of the tests migrated from streams_old passes.
2019-02-04 22:29:04 +01:00
Cory Slep
ff02890ddf Add streams_old migrated unit tests for the new generated code. 2019-02-04 22:27:22 +01:00
Cory Slep
9e1159dfd2 xsd:float is now float64 precision for a float32 number.
This is because Go's JSON package usees float64 under the hood, even
though xsd:float specifically specifies float32, I don't feel it is
worth getting that level of compatibility down, we will just be extra
precise.
2019-02-04 22:25:19 +01:00
Cory Slep
e0e809134f Various Improvements.
- Fixed embarassing bug where a != should have been a ==
- Shortcut an len-1-array serialization to be a single value
2019-02-04 22:19:43 +01:00
Cory Slep
0f6ba298b3 Various improvements for tests.
- Sorting serialization and deserialization functions to reduce random
  noise when regenerating code.
- IRI methods can now short-cut to a URI equivalent value.
- Kind constructors.
- Extended types now can also be attached to properties (bleh). Blows up
  the API size, really quickly.
- Minor bugfixes.
2019-02-04 22:06:50 +01:00
Cory Slep
161ebc62e3 Add new ActivityStreams generated vocabulary. 2019-01-29 22:28:40 +01:00
Cory Slep
9240da5763 Don't output empty root files. 2019-01-29 22:28:20 +01:00
Cory Slep
8fa479da40 Move streams to streams_old in preparation for the new vocabulary. 2019-01-29 22:16:19 +01:00
Cory Slep
ba00f3f875 Add JSONResolver.
Moved resolvers to root package due to JSONResolver's reliance on the
manager.
2019-01-29 22:00:33 +01:00
Cory Slep
def4e9f167 Don't need to escape underscore in README 2019-01-28 21:52:37 +01:00
Cory Slep
63d04c78b7 Remove 'vocab' and 'streams' tools, add 'astool' 2019-01-28 21:51:12 +01:00
Cory Slep
9cf6568637 Rename spec.json and custom_spec.json.
This reflects the newly-added usage text in the experimental tool as
well.
2019-01-27 16:24:53 +01:00
Cory Slep
db98736f28 Add Usage help text to the experimental tool. 2019-01-27 16:20:45 +01:00
Cory Slep
ed1a715571 Remove 'prefix' and create autodetecting 'path' flag. 2019-01-27 15:25:49 +01:00
Cory Slep
1f7f42e4cc Remove 'individual' flag.
Clean up and comment the main file for the exp tool.

go fmt also rearranged the imports in a lot of files.
2019-01-27 12:16:56 +01:00
Cory Slep
5ac1ebd79e Remove old TODOs 2019-01-26 22:09:23 +01:00
Cory Slep
9c2c99588f Switch from cjslep fork to go-fed in exp tool 2019-01-26 21:36:04 +01:00
Cory Slep
5d21a35f8f Remove as directory 2019-01-26 21:30:03 +01:00
Cory J Slep
e00b7d8d58
Merge pull request #80 from cjslep/dev
Experimental tool code-generation complete.
2019-01-26 19:49:59 +01:00
Cory Slep
248a464c02 Add property constructors. 2019-01-26 19:46:25 +01:00
Cory Slep
da710a6bfd Add resolver generated comments 2019-01-26 19:00:06 +01:00
Cory Slep
929831f6e2 Code generate all kind of resolvers. 2019-01-26 12:48:06 +01:00
Cory Slep
355e2bd106 Initial resolver outline.
Need to:
- Hook into convert package
- Add comments everywhere to generated code
- Add version that supports navigating AS hierarchy (or applies
  interface-first instead of type-first).
2019-01-20 00:01:54 +01:00
Cory Slep
694c0e6898 Add TODOs for alias normalization when adding types and properties. 2019-01-19 17:59:11 +01:00
Cory Slep
8942794712 Vocab alias autodetected at generation time.
Default aliases no longer used at deserialization time.
2019-01-19 17:57:20 +01:00
Cory Slep
ac87264b54 @context aliasing handled in generated serialization code. 2019-01-19 16:56:19 +01:00
Cory Slep
a2a8775265 First pass at @context management.
Needs several improvements:
- private alias member for each type/property
- New constructor function sets this to be code-generated default
- Modify deserialize to also accept an @context alias map to override
  default if needed.
- Add utility function in root package to turn @context into an alias
  map, which will be needed by resolvers.
2019-01-19 15:17:39 +01:00
Cory Slep
b349761fbc Multiple specs now build successfully after being generated. 2019-01-18 23:35:23 +01:00
Cory Slep
bb777571c8 Put interfaces from different vocabularies together. 2019-01-18 21:49:55 +01:00
Cory Slep
c3b9686d1f Fix init generation for multiple vocabularies. 2019-01-18 21:22:07 +01:00
Cory Slep
a40bd3129f Also generate refrenced vocabularies. 2019-01-18 20:45:52 +01:00
Cory Slep
ceb542ffd3 Multiple specs now generates, but generated code is borked.
The interfaces need to all be generated together, or else vocabularies
could have cyclic dependencies.

Package documentation will need to reflect each of the vocabularies'
documentation.

References' types and properties need to be generated.
2019-01-17 22:40:52 +01:00
Cory Slep
c12e854487 Slightly saner internal function 2019-01-16 21:53:36 +01:00
Cory Slep
920144aba6 Multiple specs supported by RDF parser.
However, the converter still cannot handle converting it to generators
and then files.
2019-01-16 21:43:36 +01:00
Cory Slep
4582f88848 Add custom_spec.json. Populate Vocab name from spec document. 2019-01-14 22:06:03 +01:00
Cory Slep
e2eed869af Code generate the comments in the type and property GoDoc. 2019-01-13 23:04:24 +01:00
Cory Slep
d3a4507a2a Newline after main program says done. 2019-01-13 22:34:29 +01:00
Cory Slep
ad06a07dfa Improve comments and add iterator methods.
Begin, End, Empty, Next, Prev were added. Clarified about concurrent
access not being a thing. Also added "should not use" or "do not use"
comments to the methods that needed it.
2019-01-13 22:17:43 +01:00
Cory Slep
648d7fb7b3 Add Set functions to non-functional property. 2019-01-13 18:17:54 +01:00
Cory Slep
d14128bc0b Add package-level documentation, code generated. 2019-01-13 18:01:50 +01:00
Cory Slep
2527b47493 Generate root-level package documentation. 2019-01-12 22:34:27 +01:00