You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by dr...@apache.org on 2009/03/24 21:02:24 UTC

svn commit: r757994 - in /incubator/thrift/trunk: compiler/cpp/src/thriftl.ll contrib/fb303/if/fb303.thrift contrib/thrift.el contrib/thrift.vim lib/rb/spec/ThriftSpec.thrift test/ThriftTest.thrift tutorial/tutorial.thrift

Author: dreiss
Date: Tue Mar 24 20:02:22 2009
New Revision: 757994

URL: http://svn.apache.org/viewvc?rev=757994&view=rev
Log:
THRIFT-136. s/async/oneway/ in the Thrift IDL

This is the real change.  The lexer now recognizes "oneway"
and warns on "async".  All example and test IDLs have been
updated, as have the syntax files.

Modified:
    incubator/thrift/trunk/compiler/cpp/src/thriftl.ll
    incubator/thrift/trunk/contrib/fb303/if/fb303.thrift
    incubator/thrift/trunk/contrib/thrift.el
    incubator/thrift/trunk/contrib/thrift.vim
    incubator/thrift/trunk/lib/rb/spec/ThriftSpec.thrift
    incubator/thrift/trunk/test/ThriftTest.thrift
    incubator/thrift/trunk/tutorial/tutorial.thrift

Modified: incubator/thrift/trunk/compiler/cpp/src/thriftl.ll
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/compiler/cpp/src/thriftl.ll?rev=757994&r1=757993&r2=757994&view=diff
==============================================================================
--- incubator/thrift/trunk/compiler/cpp/src/thriftl.ll (original)
+++ incubator/thrift/trunk/compiler/cpp/src/thriftl.ll Tue Mar 24 20:02:22 2009
@@ -106,7 +106,7 @@
 "map"                { return tok_map;                  }
 "list"               { return tok_list;                 }
 "set"                { return tok_set;                  }
-"async"              { return tok_oneway;               }
+"oneway"             { return tok_oneway;               }
 "typedef"            { return tok_typedef;              }
 "struct"             { return tok_struct;               }
 "exception"          { return tok_xception;             }
@@ -117,6 +117,10 @@
 "const"              { return tok_const;                }
 "required"           { return tok_required;             }
 "optional"           { return tok_optional;             }
+"async" {
+  pwarning(0, "\"async\" is deprecated.  It is called \"oneway\" now.\n");
+  return tok_oneway;
+}
 
 
 "abstract"           { thrift_reserved_keyword(yytext); }

Modified: incubator/thrift/trunk/contrib/fb303/if/fb303.thrift
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/contrib/fb303/if/fb303.thrift?rev=757994&r1=757993&r2=757994&view=diff
==============================================================================
--- incubator/thrift/trunk/contrib/fb303/if/fb303.thrift (original)
+++ incubator/thrift/trunk/contrib/fb303/if/fb303.thrift Tue Mar 24 20:02:22 2009
@@ -95,11 +95,11 @@
   /**
    * Tell the server to reload its configuration, reopen log files, etc
    */
-  async void reinitialize(),
+  oneway void reinitialize(),
 
   /**
    * Suggest a shutdown to the server
    */
-  async void shutdown(),
+  oneway void shutdown(),
 
 }

Modified: incubator/thrift/trunk/contrib/thrift.el
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/contrib/thrift.el?rev=757994&r1=757993&r2=757994&view=diff
==============================================================================
--- incubator/thrift/trunk/contrib/thrift.el (original)
+++ incubator/thrift/trunk/contrib/thrift.el Tue Mar 24 20:02:22 2009
@@ -10,7 +10,7 @@
 (defconst thrift-font-lock-keywords
   (list
    '("#.*$" . font-lock-comment-face)  ;; perl style comments
-   '("\\<\\(include\\|struct\\|exception\\|typedef\\|const\\|enum\\|service\\|extends\\|void\\|async\\|throws\\|optional\\|required\\)\\>" . font-lock-keyword-face)  ;; keywords
+   '("\\<\\(include\\|struct\\|exception\\|typedef\\|const\\|enum\\|service\\|extends\\|void\\|oneway\\|throws\\|optional\\|required\\)\\>" . font-lock-keyword-face)  ;; keywords
    '("\\<\\(bool\\|byte\\|i16\\|i32\\|i64\\|double\\|string\\|binary\\|map\\|list\\|set\\)\\>" . font-lock-type-face)  ;; built-in types
    '("\\<\\([0-9]+\\)\\>" . font-lock-variable-name-face)   ;; ordinals
    '("\\<\\(\\w+\\)\\s-*(" (1 font-lock-function-name-face))  ;; functions

Modified: incubator/thrift/trunk/contrib/thrift.vim
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/contrib/thrift.vim?rev=757994&r1=757993&r2=757994&view=diff
==============================================================================
--- incubator/thrift/trunk/contrib/thrift.vim (original)
+++ incubator/thrift/trunk/contrib/thrift.vim Tue Mar 24 20:02:22 2009
@@ -40,7 +40,7 @@
 syn match thriftSpecial "\d\+:"
 
 " Structure
-syn keyword thriftStructure service async extends
+syn keyword thriftStructure service oneway extends
 "async"         { return tok_async;         }
 "exception"     { return tok_xception;      }
 "extends"       { return tok_extends;       }

Modified: incubator/thrift/trunk/lib/rb/spec/ThriftSpec.thrift
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/lib/rb/spec/ThriftSpec.thrift?rev=757994&r1=757993&r2=757994&view=diff
==============================================================================
--- incubator/thrift/trunk/lib/rb/spec/ThriftSpec.thrift (original)
+++ incubator/thrift/trunk/lib/rb/spec/ThriftSpec.thrift Tue Mar 24 20:02:22 2009
@@ -40,7 +40,7 @@
 service NonblockingService {
   Hello greeting(1:bool english)
   bool block()
-  async void unblock(1:i32 n)
-  async void shutdown()
+  oneway void unblock(1:i32 n)
+  oneway void shutdown()
   void sleep(1:double seconds)
 }

Modified: incubator/thrift/trunk/test/ThriftTest.thrift
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/test/ThriftTest.thrift?rev=757994&r1=757993&r2=757994&view=diff
==============================================================================
--- incubator/thrift/trunk/test/ThriftTest.thrift (original)
+++ incubator/thrift/trunk/test/ThriftTest.thrift Tue Mar 24 20:02:22 2009
@@ -103,7 +103,7 @@
   Xtruct testMultiException(string arg0, string arg1) throws(Xception err1, Xception2 err2)
 
   /* Test oneway void */
-  async void testOneway(1:i32 secondsToSleep)
+  oneway void testOneway(1:i32 secondsToSleep)
 }
 
 service SecondService

Modified: incubator/thrift/trunk/tutorial/tutorial.thrift
URL: http://svn.apache.org/viewvc/incubator/thrift/trunk/tutorial/tutorial.thrift?rev=757994&r1=757993&r2=757994&view=diff
==============================================================================
--- incubator/thrift/trunk/tutorial/tutorial.thrift (original)
+++ incubator/thrift/trunk/tutorial/tutorial.thrift Tue Mar 24 20:02:22 2009
@@ -121,7 +121,7 @@
     * a request and does not listen for any response at all. Oneway methods
     * must be void.
     */
-   async void zip()
+   oneway void zip()
 
 }