lucy-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [lucy-issues] [jira] [Commented] (CLOWNFISH-32) Autogenerate Go binding code
Date Wed, 22 Apr 2015 04:48:59 GMT

    [ https://issues.apache.org/jira/browse/CLOWNFISH-32?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14506415#comment-14506415
] 

ASF GitHub Bot commented on CLOWNFISH-32:
-----------------------------------------

GitHub user rectang opened a pull request:

    https://github.com/apache/lucy-clownfish/pull/10

    CLOWNFISH-32 Autogenerate Go bindings

    Autogenerate Go bindings: wrappers for each method, plus 
    struct, interface and helper function for each class.
    
    This fixes CLOWNFISH-32.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/rectang/lucy-clownfish CLOWNFISH-32-autogen-go

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/lucy-clownfish/pull/10.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #10
    
----
commit 45134b31803a41ab70a976fdd7f9473bb2b06a71
Author: Marvin Humphrey <marvin@rectangular.com>
Date:   2015-03-23T19:06:24Z

    Start autogenerating Go binding code.

commit d7522087bca20eeadbde579d845602a5199058e3
Author: Marvin Humphrey <marvin@rectangular.com>
Date:   2015-03-24T00:52:09Z

    Add CFCGoClass: Go bindings for a Clownfish Class.

commit 196b210f2ba47057394fd7f281aecf3ece30cd8f
Author: Marvin Humphrey <marvin@rectangular.com>
Date:   2015-03-29T22:02:38Z

    Determine Go package from Clownfish parcel.

commit 688d3e4ebc97c25675cc3c87ae5536ec8da5b43b
Author: Marvin Humphrey <marvin@rectangular.com>
Date:   2015-03-29T22:04:53Z

    Autogenerate Go type statements for classes.
    
    All non-inert classes get both an public interface type and a private
    struct type.

commit 89073783b9b2b07db61ce1b2dcc22e28d2fb2a23
Author: Marvin Humphrey <marvin@rectangular.com>
Date:   2015-03-30T04:21:45Z

    Add accessor for client to CFCGoClass.

commit dd5e1305adf6b803daa2c2460ba5b4731635da1b
Author: Marvin Humphrey <marvin@rectangular.com>
Date:   2015-04-07T03:12:00Z

    Add CFCGoMethod.

commit c49cf4aa5fd52f55df492a88605f2e2f47b82838
Author: Marvin Humphrey <marvin@rectangular.com>
Date:   2015-04-07T03:18:18Z

    Enable method binding generation by CFCGoClass.

commit ef244fe1c51fc0556299b289cb5b8ee70b76b137
Author: Marvin Humphrey <marvin@rectangular.com>
Date:   2015-04-01T00:14:33Z

    Autogenerate some per-Class Go helper funcs.

commit 499a33fd94f879dc9a6e0cd3eb0ad496fe889342
Author: Marvin Humphrey <marvin@rectangular.com>
Date:   2015-04-01T23:57:58Z

    Brute normalization of method signatures for Go.
    
    *   Pass invoker to Go method glue generation.
    *   Use novel method invocation function.
    *   For co-variant return types, the Go bindings always return the
        lowest common denominator from the novel method.  This is
        necessary because a method with a co-variant return type does not
        satisfy a Go interface.

commit fb8fc9aa68443df350034e8cf2a26fca8c9ef8b4
Author: Marvin Humphrey <marvin@rectangular.com>
Date:   2015-04-03T18:37:48Z

    Flesh out Go interfaces.  Use *all* methods.
    
    Every Go struct wrapper for a Clownfish class must include wrappers for
    *all* it methods, even those whose implementation is inherited.  This is
    necessary because otherwise the struct would not implement the interface
    for the class (which includes method sigs for every method you can call).

commit 17a894df3ef6331c9562a6887fbd30be0343b6ec
Author: Marvin Humphrey <marvin@rectangular.com>
Date:   2015-04-07T03:11:42Z

    Autogenerate CGO method bindings.

commit edb86c4586d3614c89b9089f5ab039d8b603aa9c
Author: Marvin Humphrey <marvin@rectangular.com>
Date:   2015-04-08T22:03:41Z

    Use idiomatic Go argument names when possible.
    
    *   Single-letter method receievers.
    *   lowerCamelCase for parameters.

commit 0ab2744c42197ac6f5150f7a6725c46254ff1acb
Author: Marvin Humphrey <marvin@rectangular.com>
Date:   2015-04-09T22:45:59Z

    Allow suppression of autogenerated Go init().
    
    Bootstrapping is a problem when there are multiple init() functions
    because the order in which they run is not defined.  Therefore, allow
    the user to suppress the autogenerated init and perform bootstrapping in
    their own init() function.

commit 83d9d1ad32df41399a61883dabe437cc4a7506ee
Author: Marvin Humphrey <marvin@rectangular.com>
Date:   2015-04-10T01:21:38Z

    Generate Go imports for prereq parcels.
    
    When Clownfish parcels depend on other parcels, we need to generate a Go
    import statement for each dependency to insert into the autogenerated Go
    code.

commit e7fadd854aef36773f9af06b7978430759cc7aa3
Author: Marvin Humphrey <marvin@rectangular.com>
Date:   2015-04-10T02:02:47Z

    Disallow Go keywords as param names.
    
    Append an underscore to the end -- e.g. for the param `type`,
    substitute `type_`.  It's ugly and not Go style, but it's bulletproof
    because we it will never clash with lowerCamelCase.

commit 898d5ba88298cdfb8eefa201d53659016078fae1
Author: Marvin Humphrey <marvin@rectangular.com>
Date:   2015-04-10T02:46:49Z

    Publish abstract method backing functions.
    
    Declare the implementing functions for abstract methods.  Have the
    implementations match the method signatures rather than abuse C function
    pointer casting.
    
    Having implementing functions hidden was a latent bug: the method
    invocation symbol for a `final` class which fails to implement the
    method is a macro alias for the implementing func, and if such a method
    were ever used in source code, the symbol would have been missing at
    link time.

commit 33e2a26e403f68f6bd31d588ce95702979db1826
Author: Marvin Humphrey <marvin@rectangular.com>
Date:   2015-04-10T02:55:08Z

    Use IMP func for final method call from Go.
    
    CGO can't deal with macros, and for a final method which is also novel,
    the method invocation symbol is a macro which resolves to the
    implementing function.  Use the implementing function instead of the
    macro alias so that CGO doesn't choke.

commit 257f9224105ee365485afee978ed67076c79df03
Author: Marvin Humphrey <marvin@rectangular.com>
Date:   2015-04-12T16:07:54Z

    Make CFCGoClass available via CFC Go bindings.

commit 1f0ce57f3e37f831924be22d329601805056d41f
Author: Marvin Humphrey <marvin@rectangular.com>
Date:   2015-04-12T16:09:31Z

    Lazy load class when fetched from Go binding.

commit 20d298cd830db09e734913e2348eb9c421d882bc
Author: Marvin Humphrey <marvin@rectangular.com>
Date:   2015-04-12T16:24:13Z

    Enable customized Go method bindings.
    
    Allow Clownfish methods to be bound to Go using custom signatures, and
    allow arbitrary methods to be added.  In both cases, the expectation is
    that the user will supply the implementation code, as customizing the
    signature disables autogenerating the default binding (which would
    presumably not match the custom signature).

commit cf758c0788c718f3c6cc321c39e6c944d3983cf7
Author: Marvin Humphrey <marvin@rectangular.com>
Date:   2015-04-22T04:18:57Z

    Install .h headers as well under Go.
    
    In addition to .cfh and .cfp, install .h header files from the source
    dir to the Clownfish include dir.

----


> Autogenerate Go binding code
> ----------------------------
>
>                 Key: CLOWNFISH-32
>                 URL: https://issues.apache.org/jira/browse/CLOWNFISH-32
>             Project: Apache Lucy-Clownfish
>          Issue Type: Improvement
>            Reporter: Marvin Humphrey
>            Assignee: Marvin Humphrey
>
> Take the proof-of-concept hand-coded bindings from CLOWNFISH-28 and replace them with
autogenerated code whenever possible.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message