Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Malcolm Greaves
    @malcolmgreaves
    Released 0.3.0 which includes @ebiggs 's awesome new feature.
    Malcolm Greaves
    @malcolmgreaves
    So in spectacular fashion.....we forgot to ensure that the actual code generation step uses this new parser XD
    @pkinsky and I will work on this tomorrow and get this sorted out
    (1) make sure that the codegen part uses the new partial schema parser
    (2) have it work with both .avsc and .avsp
    (3) update the end-to-end tests to include partial schemas, verify that they are parsed correctly
    (4) update the .travis.yml to include "sbt test"
    when we fix, we'll release 0.3.1
    Eric Biggs
    @ebiggs
    hah yeah I shoulda mentioned that i didn't do that part!
    hey so does anybody else feel like it might be nice to move the Av* stuff into runtime, and put the string literals as partials into a central file and then replace the long canonical strings in each generated class file with a call to AvModule?
    that way there's no repetition in the string literals.
    Eric Biggs
    @ebiggs
    Regarding your commit message about namespaces, I want to explain what I ran into and maybe we can come up with a better solution... The avro specification makes a distinction between no namespace and the null namespace. The null namespace is referred to by an empty string, And specifying no namespace means to inherit from the parent context. However, if there is no parent context, then use the null namespace. Unfortunately there's no way to distinguish between these two different semantics using the fully qualified name, but the Av* AST does make a distinction. So if you specified namesakes == None, it infers the null namespace and a reference that refers to None will not work.. I think there's probably a way to clean this up I just didn't take the time to think it through and write the tests etc..
    Malcolm Greaves
    @malcolmgreaves
    Paul and I paired today, getting the codegen module to actually use the partial schema parser. Updated the e2e tests to exercise this new behavior. Now 0.3.1 is out which is nice and useable! =D
    wrt to the runtime stuff @ebiggs : I think that could work. It is generated code, though, so I don't know how much of a burden this change will lift off our collective shoulders... You're advocating this just to reduce repetition?
    wrt namespaces: ah, I didn't realize that distinction in the spec
    with that, I think what I had earlier was a test exercising the null namespace...but without actually using null.<name_of_schema>
    so that e2e test case was actually probably wrong to begin with...
    With this new info, I'm not sure if this namespace thing is as important. IMO everyone should put their schemas into namespaces. Maybe we could have an option to fail the codegen if we encounter a schema w/o a namespace?
    Eric Biggs
    @ebiggs
    Perhaps, but if it's less intuitive to work with than .avsc there's probably a way to make it feel the same.. we just have to figure out exactly what that means..
    Malcolm Greaves
    @malcolmgreaves
    I hear you
    this does seem like a more minor issue, right? so we could open it up and maybe flesh out some details there
    Eric Biggs
    @ebiggs
    Yes there is an issue regarding repetitive / long string literals, which is fairly inconsequential... but I'm also finding that I'd like to repurpose the AST in my scala 2.11 code so I was trying to make an excuse to have it published that way :)
    Yeah it's minor, I mean it doesn't bother me, but it might help make the software more approachable to newbies
    Malcolm Greaves
    @malcolmgreaves
    Definitely. Not dismissing, just sort-of mentally triaging.
    Eric Biggs
    @ebiggs
    I also have a desire for something that might be a bit crazy that having the AST would make it much more easy to implement.
    Malcolm Greaves
    @malcolmgreaves
    I'll let @pkinsky weigh in with his thoughts here. But I'd personally be open to review a PR for it.
    Eric Biggs
    @ebiggs
    I'm not even sure if it's a feasible feature
    but essentially want I want to be able to do is have it codegen case class that take a type parameter, which when specified will create different Avro schema depending on the parameter you call it with
    Malcolm Greaves
    @malcolmgreaves
    the crazy thing?
    oh interesting...
    Eric Biggs
    @ebiggs
    Yeah simple in principle but the edge cases, and how to extend avro to even make sense of it, would take some serious thinking
    Malcolm Greaves
    @malcolmgreaves
    so I have gotta get home right now
    I'll catch up on messages in a little while
    Eric Biggs
    @ebiggs
    ok, later
    Malcolm Greaves
    @malcolmgreaves
    (need some zzzzs! =D )
    Malcolm Greaves
    @malcolmgreaves
    Hey Eric! Made any headway on this idea? (just checkin' in)
    Eric Biggs
    @ebiggs
    I created an issue to discuss it further: Nitro/avro-codegen#7
    I get the impression that no other current user would get excited about this feature
    I may ultimately end developing it, though... and would offer to contribute it back, however wouldn't necessarily expect it to be accepted back in...
    Malcolm Greaves
    @malcolmgreaves
    If you make a PR, we'd definitely review it (and probably merge it in, you've written great code before).
    Taleb Zeghmi
    @talebzeghmi
    Can I use avro-codegen as a maven plugin?
    Taleb Zeghmi
    @talebzeghmi
    Also, does it support .idl extension file type?
    Taleb Zeghmi
    @talebzeghmi
    @malcolmgreaves can avro-codegen be used in maven?
    Malcolm Greaves
    @malcolmgreaves
    hi tewf! I believe the answer is no
    it is specifically an sbt plugin
    the runtime, however, can be used w/ maven
    (so you can use the generated scala code w/ any build process)
    if you're not bound by a legacy constraint.... we highly suggest using sbt for any scala project
    @tewf It does not. I have no clue what .idl is...
    a windows "interface definition file" ? we don't do anything special for windows