These are chat archives for ProtoDef-io/node-protodef

1st
Feb 2017
Romain Beaumont
@rom1504
Feb 01 2017 00:29
@roblabla protodef-validator is there
now integrating in stuff
Romain Beaumont
@rom1504
Feb 01 2017 00:57
all done
well except I believe the way I did it validation is not optional
so I'm not publishing right now
Romain Beaumont
@rom1504
Feb 01 2017 10:37
yeah making validation optional by default is ugly
it means having to guess whether a type is just a simple type or a type with typeargs
making it non-optional would be much simpler
that means protodef 2.0.0 though
and fixing users
Robin Lambertz
@roblabla
Feb 01 2017 14:55
Well, if we're going this route, we might as well remove varint in the same process :D
mhsjlw
@mhsjlw
Feb 01 2017 14:57
And add the missing varint that we need
Romain Beaumont
@rom1504
Feb 01 2017 14:58
yeah well I think I'm going to try to make it optional though, maybe not everybody feels like writing json schemas
but well it requires a bit of thinking so not doing it right now
Robin Lambertz
@roblabla
Feb 01 2017 14:58
JSON schemas are necessary for custom datatypes right ?
in the current impl I mean
Romain Beaumont
@rom1504
Feb 01 2017 14:58
yes
Robin Lambertz
@roblabla
Feb 01 2017 14:58
hmm.
Romain Beaumont
@rom1504
Feb 01 2017 14:58
my solution is
have ["enum",["u8"]] for every simple datatype (probably with a helper like "simple" to write as 4th arg of the type)
Robin Lambertz
@roblabla
Feb 01 2017 14:59
I don't know, maybe making required is a good thing ?
Romain Beaumont
@rom1504
Feb 01 2017 15:00
then for new datatype without schema def, have a oneOf(simple,[name,array])
yeah idk
maybe yeah
*object not array
if it's required then it's a breaking change
for example raknet and pmp will break
not very hard to fix though
I'll try some things to see what makes the more sense
Robin Lambertz
@roblabla
Feb 01 2017 15:02
hmm
Wait, does making it optional just mean that this datatype has little to no validation ?
Romain Beaumont
@rom1504
Feb 01 2017 15:02
yes
Robin Lambertz
@roblabla
Feb 01 2017 15:02
oh
Romain Beaumont
@rom1504
Feb 01 2017 15:02
which might be ok
kind of
Robin Lambertz
@roblabla
Feb 01 2017 15:03
I guess we could just provide a default schema that accepts anything though, right ?
Romain Beaumont
@rom1504
Feb 01 2017 15:03
yes that's the idea I said ^
Robin Lambertz
@roblabla
Feb 01 2017 15:03
yeah ok
Sorry xD
mhsjlw
@mhsjlw
Feb 01 2017 21:13
So , is 2.0 in-progress ? Lol
Romain Beaumont
@rom1504
Feb 01 2017 21:22
Unlike what game seller make you believe, new major versions are not good things
It means you're breaking stuff and not being stable
But well
mhsjlw
@mhsjlw
Feb 01 2017 21:23
We are doing that
We are breaking things now so we don't have to break things later.
In theory :)