You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Johan Stuyts (JIRA)" <ji...@apache.org> on 2008/05/16 09:32:57 UTC

[jira] Created: (THRIFT-9) Add a default namespace declaration for all languages

Add a default namespace declaration for all languages
-----------------------------------------------------

                 Key: THRIFT-9
                 URL: https://issues.apache.org/jira/browse/THRIFT-9
             Project: Thrift
          Issue Type: Improvement
            Reporter: Johan Stuyts
            Priority: Minor


The namespace for each language has to be specified separately. As new languages are supported, existing Thrift files automatically become outdated because no namespace has been specified for the new languages. I also suspect that in most cases most namespaces have the same value:
{code:none}namespace cocoa  com.acme.foo
namespace cpp    com.acme.foo
namespace csharp com.acme.foo
namespace java   com.acme.foo
php_namespace    com.acme.foo
namespace perl   com.acme.foo
namespace py     com.acme.foo
namespace rb     com.acme.foo
namespace smalltalk.category Acme.Foo{code}

By introducing a default namespace the number of namespace declarations can be reduced, and the chance that a Thrift file has to be updated because a new language is supported becomes smaller. Namespace declarations for a specific language override the default namespace:
{code:none}namespace * com.acme.foo
namespace smalltalk.category Acme.Foo
{code}

Instead of using an asterisk the keyword {{default}} could also be used.

This issue was discussed earlier on the mailing list:
http://publists.facebook.com/pipermail/thrift/2008-May/000989.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-9) Add a default namespace declaration for all languages

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-9?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12905562#action_12905562 ] 

David Reiss commented on THRIFT-9:
----------------------------------

Wow, one-digit issue number.  Let's see if I can even find the branch.

> Add a default namespace declaration for all languages
> -----------------------------------------------------
>
>                 Key: THRIFT-9
>                 URL: https://issues.apache.org/jira/browse/THRIFT-9
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (General)
>            Reporter: Johan Stuyts
>            Assignee: David Reiss
>            Priority: Minor
>         Attachments: default-namespace.patch
>
>
> The namespace for each language has to be specified separately. As new languages are supported, existing Thrift files automatically become outdated because no namespace has been specified for the new languages. I also suspect that in most cases most namespaces have the same value:
> {code:none}namespace cocoa  com.acme.foo
> namespace cpp    com.acme.foo
> namespace csharp com.acme.foo
> namespace java   com.acme.foo
> php_namespace    com.acme.foo
> namespace perl   com.acme.foo
> namespace py     com.acme.foo
> namespace rb     com.acme.foo
> namespace smalltalk.category Acme.Foo{code}
> By introducing a default namespace the number of namespace declarations can be reduced, and the chance that a Thrift file has to be updated because a new language is supported becomes smaller. Namespace declarations for a specific language override the default namespace:
> {code:none}namespace * com.acme.foo
> namespace smalltalk.category Acme.Foo
> {code}
> Instead of using an asterisk the keyword {{default}} could also be used.
> This issue was discussed earlier on the mailing list:
> http://publists.facebook.com/pipermail/thrift/2008-May/000989.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-9) Add a default namespace declaration for all languages

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-9?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Reiss updated THRIFT-9:
-----------------------------

    Patch Info: [Patch Available]

> Add a default namespace declaration for all languages
> -----------------------------------------------------
>
>                 Key: THRIFT-9
>                 URL: https://issues.apache.org/jira/browse/THRIFT-9
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (General)
>            Reporter: Johan Stuyts
>            Assignee: David Reiss
>            Priority: Minor
>         Attachments: default-namespace.patch
>
>
> The namespace for each language has to be specified separately. As new languages are supported, existing Thrift files automatically become outdated because no namespace has been specified for the new languages. I also suspect that in most cases most namespaces have the same value:
> {code:none}namespace cocoa  com.acme.foo
> namespace cpp    com.acme.foo
> namespace csharp com.acme.foo
> namespace java   com.acme.foo
> php_namespace    com.acme.foo
> namespace perl   com.acme.foo
> namespace py     com.acme.foo
> namespace rb     com.acme.foo
> namespace smalltalk.category Acme.Foo{code}
> By introducing a default namespace the number of namespace declarations can be reduced, and the chance that a Thrift file has to be updated because a new language is supported becomes smaller. Namespace declarations for a specific language override the default namespace:
> {code:none}namespace * com.acme.foo
> namespace smalltalk.category Acme.Foo
> {code}
> Instead of using an asterisk the keyword {{default}} could also be used.
> This issue was discussed earlier on the mailing list:
> http://publists.facebook.com/pipermail/thrift/2008-May/000989.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (THRIFT-9) Add a default namespace declaration for all languages

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-9?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Reiss resolved THRIFT-9.
------------------------------

    Fix Version/s: 0.5
       Resolution: Fixed

> Add a default namespace declaration for all languages
> -----------------------------------------------------
>
>                 Key: THRIFT-9
>                 URL: https://issues.apache.org/jira/browse/THRIFT-9
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (General)
>            Reporter: Johan Stuyts
>            Assignee: David Reiss
>            Priority: Minor
>             Fix For: 0.5
>
>         Attachments: default-namespace.patch
>
>
> The namespace for each language has to be specified separately. As new languages are supported, existing Thrift files automatically become outdated because no namespace has been specified for the new languages. I also suspect that in most cases most namespaces have the same value:
> {code:none}namespace cocoa  com.acme.foo
> namespace cpp    com.acme.foo
> namespace csharp com.acme.foo
> namespace java   com.acme.foo
> php_namespace    com.acme.foo
> namespace perl   com.acme.foo
> namespace py     com.acme.foo
> namespace rb     com.acme.foo
> namespace smalltalk.category Acme.Foo{code}
> By introducing a default namespace the number of namespace declarations can be reduced, and the chance that a Thrift file has to be updated because a new language is supported becomes smaller. Namespace declarations for a specific language override the default namespace:
> {code:none}namespace * com.acme.foo
> namespace smalltalk.category Acme.Foo
> {code}
> Instead of using an asterisk the keyword {{default}} could also be used.
> This issue was discussed earlier on the mailing list:
> http://publists.facebook.com/pipermail/thrift/2008-May/000989.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-9) Add a default namespace declaration for all languages

Posted by "Johan Stuyts (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-9?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12597882#action_12597882 ] 

Johan Stuyts commented on THRIFT-9:
-----------------------------------

What about using the identifier {{standard}}? This does not require any changes to the grammar, and I suspect that the impact on the compiler is also minimal.

> Add a default namespace declaration for all languages
> -----------------------------------------------------
>
>                 Key: THRIFT-9
>                 URL: https://issues.apache.org/jira/browse/THRIFT-9
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (General)
>            Reporter: Johan Stuyts
>            Assignee: David Reiss
>            Priority: Minor
>
> The namespace for each language has to be specified separately. As new languages are supported, existing Thrift files automatically become outdated because no namespace has been specified for the new languages. I also suspect that in most cases most namespaces have the same value:
> {code:none}namespace cocoa  com.acme.foo
> namespace cpp    com.acme.foo
> namespace csharp com.acme.foo
> namespace java   com.acme.foo
> php_namespace    com.acme.foo
> namespace perl   com.acme.foo
> namespace py     com.acme.foo
> namespace rb     com.acme.foo
> namespace smalltalk.category Acme.Foo{code}
> By introducing a default namespace the number of namespace declarations can be reduced, and the chance that a Thrift file has to be updated because a new language is supported becomes smaller. Namespace declarations for a specific language override the default namespace:
> {code:none}namespace * com.acme.foo
> namespace smalltalk.category Acme.Foo
> {code}
> Instead of using an asterisk the keyword {{default}} could also be used.
> This issue was discussed earlier on the mailing list:
> http://publists.facebook.com/pipermail/thrift/2008-May/000989.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-9) Add a default namespace declaration for all languages

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-9?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Reiss updated THRIFT-9:
-----------------------------

    Component/s: Compiler (General)
       Assignee: David Reiss

I wrote this in email:

This would be pretty easy to implement in the compiler, but making it "*" would be a bit of a pain because it is not a valid identifier.  If someone wants to suggest another key (that is not a reserved word), I can implement it.  Or we can just change the grammar to allow * or "default".

I can implement this if someone makes a case for what would be the best design.

> Add a default namespace declaration for all languages
> -----------------------------------------------------
>
>                 Key: THRIFT-9
>                 URL: https://issues.apache.org/jira/browse/THRIFT-9
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (General)
>            Reporter: Johan Stuyts
>            Assignee: David Reiss
>            Priority: Minor
>
> The namespace for each language has to be specified separately. As new languages are supported, existing Thrift files automatically become outdated because no namespace has been specified for the new languages. I also suspect that in most cases most namespaces have the same value:
> {code:none}namespace cocoa  com.acme.foo
> namespace cpp    com.acme.foo
> namespace csharp com.acme.foo
> namespace java   com.acme.foo
> php_namespace    com.acme.foo
> namespace perl   com.acme.foo
> namespace py     com.acme.foo
> namespace rb     com.acme.foo
> namespace smalltalk.category Acme.Foo{code}
> By introducing a default namespace the number of namespace declarations can be reduced, and the chance that a Thrift file has to be updated because a new language is supported becomes smaller. Namespace declarations for a specific language override the default namespace:
> {code:none}namespace * com.acme.foo
> namespace smalltalk.category Acme.Foo
> {code}
> Instead of using an asterisk the keyword {{default}} could also be used.
> This issue was discussed earlier on the mailing list:
> http://publists.facebook.com/pipermail/thrift/2008-May/000989.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-9) Add a default namespace declaration for all languages

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-9?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Reiss updated THRIFT-9:
-----------------------------

    Attachment: default-namespace.patch

Well, I put the work in to allow "*".  If people think this is gross, we can go with the simpler solution.  I think I'd prefer "wildcard" in that case.

> Add a default namespace declaration for all languages
> -----------------------------------------------------
>
>                 Key: THRIFT-9
>                 URL: https://issues.apache.org/jira/browse/THRIFT-9
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (General)
>            Reporter: Johan Stuyts
>            Assignee: David Reiss
>            Priority: Minor
>         Attachments: default-namespace.patch
>
>
> The namespace for each language has to be specified separately. As new languages are supported, existing Thrift files automatically become outdated because no namespace has been specified for the new languages. I also suspect that in most cases most namespaces have the same value:
> {code:none}namespace cocoa  com.acme.foo
> namespace cpp    com.acme.foo
> namespace csharp com.acme.foo
> namespace java   com.acme.foo
> php_namespace    com.acme.foo
> namespace perl   com.acme.foo
> namespace py     com.acme.foo
> namespace rb     com.acme.foo
> namespace smalltalk.category Acme.Foo{code}
> By introducing a default namespace the number of namespace declarations can be reduced, and the chance that a Thrift file has to be updated because a new language is supported becomes smaller. Namespace declarations for a specific language override the default namespace:
> {code:none}namespace * com.acme.foo
> namespace smalltalk.category Acme.Foo
> {code}
> Instead of using an asterisk the keyword {{default}} could also be used.
> This issue was discussed earlier on the mailing list:
> http://publists.facebook.com/pipermail/thrift/2008-May/000989.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-9) Add a default namespace declaration for all languages

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-9?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12613748#action_12613748 ] 

David Reiss commented on THRIFT-9:
----------------------------------

Now that this is in the IDL documentation on the wiki, does someone want to sign off on it?

> Add a default namespace declaration for all languages
> -----------------------------------------------------
>
>                 Key: THRIFT-9
>                 URL: https://issues.apache.org/jira/browse/THRIFT-9
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (General)
>            Reporter: Johan Stuyts
>            Assignee: David Reiss
>            Priority: Minor
>         Attachments: default-namespace.patch
>
>
> The namespace for each language has to be specified separately. As new languages are supported, existing Thrift files automatically become outdated because no namespace has been specified for the new languages. I also suspect that in most cases most namespaces have the same value:
> {code:none}namespace cocoa  com.acme.foo
> namespace cpp    com.acme.foo
> namespace csharp com.acme.foo
> namespace java   com.acme.foo
> php_namespace    com.acme.foo
> namespace perl   com.acme.foo
> namespace py     com.acme.foo
> namespace rb     com.acme.foo
> namespace smalltalk.category Acme.Foo{code}
> By introducing a default namespace the number of namespace declarations can be reduced, and the chance that a Thrift file has to be updated because a new language is supported becomes smaller. Namespace declarations for a specific language override the default namespace:
> {code:none}namespace * com.acme.foo
> namespace smalltalk.category Acme.Foo
> {code}
> Instead of using an asterisk the keyword {{default}} could also be used.
> This issue was discussed earlier on the mailing list:
> http://publists.facebook.com/pipermail/thrift/2008-May/000989.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-9) Add a default namespace declaration for all languages

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-9?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12905553#action_12905553 ] 

Bryan Duxbury commented on THRIFT-9:
------------------------------------

David, go ahead and commit this.

> Add a default namespace declaration for all languages
> -----------------------------------------------------
>
>                 Key: THRIFT-9
>                 URL: https://issues.apache.org/jira/browse/THRIFT-9
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (General)
>            Reporter: Johan Stuyts
>            Assignee: David Reiss
>            Priority: Minor
>         Attachments: default-namespace.patch
>
>
> The namespace for each language has to be specified separately. As new languages are supported, existing Thrift files automatically become outdated because no namespace has been specified for the new languages. I also suspect that in most cases most namespaces have the same value:
> {code:none}namespace cocoa  com.acme.foo
> namespace cpp    com.acme.foo
> namespace csharp com.acme.foo
> namespace java   com.acme.foo
> php_namespace    com.acme.foo
> namespace perl   com.acme.foo
> namespace py     com.acme.foo
> namespace rb     com.acme.foo
> namespace smalltalk.category Acme.Foo{code}
> By introducing a default namespace the number of namespace declarations can be reduced, and the chance that a Thrift file has to be updated because a new language is supported becomes smaller. Namespace declarations for a specific language override the default namespace:
> {code:none}namespace * com.acme.foo
> namespace smalltalk.category Acme.Foo
> {code}
> Instead of using an asterisk the keyword {{default}} could also be used.
> This issue was discussed earlier on the mailing list:
> http://publists.facebook.com/pipermail/thrift/2008-May/000989.html

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.