You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Philippe STRAUSS (JIRA)" <ji...@apache.org> on 2011/09/06 00:20:09 UTC
[jira] [Created] (THRIFT-1322) OCaml lib fail to compile: Thrift.ml
line 305, int vs int32 mismatch
OCaml lib fail to compile: Thrift.ml line 305, int vs int32 mismatch
--------------------------------------------------------------------
Key: THRIFT-1322
URL: https://issues.apache.org/jira/browse/THRIFT-1322
Project: Thrift
Issue Type: Bug
Components: OCaml - Library
Environment: Mac OS 10.6.8, 64bits x86_64
Reporter: Philippe STRAUSS
Priority: Blocker
Fix For: 0.8
Between SVN of 20110418 and today, the lib/ocaml has ceased to build.
I mean it did build on april 18, not lately.
The build die in this way:
-- 8< --
philou@air:~/src/thrift-svn/lib/ocaml$ make
cd src; make; cd ..
ocamlopt -c -thread Thrift.ml
File "Thrift.ml", line 305, characters 6-8:
Error: This pattern matches values of type int
but a pattern was expected which matches values of type int32
-- 8< --
The lib/ocaml changes between 20110418 and 20110905 are listed below, and rather thin, should not be a big deal to fix :
diff -ur thrift-svn-20110418/lib/ocaml/src/Thrift.ml thrift-svn/lib/ocaml/src/Thrift.ml
--- thrift-svn-20110418/lib/ocaml/src/Thrift.ml 2011-04-13 18:38:21.000000000 +0200
+++ thrift-svn/lib/ocaml/src/Thrift.ml 2011-08-03 16:10:25.000000000 +0200
@@ -292,6 +292,8 @@
| WRONG_METHOD_NAME
| BAD_SEQUENCE_ID
| MISSING_RESULT
+ | INTERNAL_ERROR
+ | PROTOCOL_ERROR
let typ_of_i = function
0l -> UNKNOWN
@@ -300,6 +302,8 @@
| 3l -> WRONG_METHOD_NAME
| 4l -> BAD_SEQUENCE_ID
| 5l -> MISSING_RESULT
+ | 61 -> INTERNAL_ERROR
+ | 71 -> PROTOCOL_ERROR
| _ -> raise Thrift_error;;
let typ_to_i = function
| UNKNOWN -> 0l
@@ -308,6 +312,8 @@
| WRONG_METHOD_NAME -> 3l
| BAD_SEQUENCE_ID -> 4l
| MISSING_RESULT -> 5l
+ | INTERNAL_ERROR -> 61
+ | PROTOCOL_ERROR -> 71
class t =
object (self)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (THRIFT-1322) OCaml lib fail to compile: Thrift.ml
line 305, int vs int32 mismatch
Posted by "Jake Farrell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jake Farrell closed THRIFT-1322.
--------------------------------
Resolution: Duplicate
THRIFT-690 applied this same patch to OCaml lib. This is available in trunk since 2011-08-03 04:49:27
> OCaml lib fail to compile: Thrift.ml line 305, int vs int32 mismatch
> --------------------------------------------------------------------
>
> Key: THRIFT-1322
> URL: https://issues.apache.org/jira/browse/THRIFT-1322
> Project: Thrift
> Issue Type: Bug
> Components: OCaml - Library
> Environment: Mac OS 10.6.8, 64bits x86_64
> Reporter: Philippe STRAUSS
> Priority: Blocker
> Fix For: 0.8
>
> Original Estimate: 20m
> Remaining Estimate: 20m
>
> Between SVN of 20110418 and today, the lib/ocaml has ceased to build.
> I mean it did build on april 18, not lately.
> The build die in this way:
> -- 8< --
> philou@air:~/src/thrift-svn/lib/ocaml$ make
> cd src; make; cd ..
> ocamlopt -c -thread Thrift.ml
> File "Thrift.ml", line 305, characters 6-8:
> Error: This pattern matches values of type int
> but a pattern was expected which matches values of type int32
> -- 8< --
> The lib/ocaml changes between 20110418 and 20110905 are listed below, and rather thin, should not be a big deal to fix :
> diff -ur thrift-svn-20110418/lib/ocaml/src/Thrift.ml thrift-svn/lib/ocaml/src/Thrift.ml
> --- thrift-svn-20110418/lib/ocaml/src/Thrift.ml 2011-04-13 18:38:21.000000000 +0200
> +++ thrift-svn/lib/ocaml/src/Thrift.ml 2011-08-03 16:10:25.000000000 +0200
> @@ -292,6 +292,8 @@
> | WRONG_METHOD_NAME
> | BAD_SEQUENCE_ID
> | MISSING_RESULT
> + | INTERNAL_ERROR
> + | PROTOCOL_ERROR
>
> let typ_of_i = function
> 0l -> UNKNOWN
> @@ -300,6 +302,8 @@
> | 3l -> WRONG_METHOD_NAME
> | 4l -> BAD_SEQUENCE_ID
> | 5l -> MISSING_RESULT
> + | 61 -> INTERNAL_ERROR
> + | 71 -> PROTOCOL_ERROR
> | _ -> raise Thrift_error;;
> let typ_to_i = function
> | UNKNOWN -> 0l
> @@ -308,6 +312,8 @@
> | WRONG_METHOD_NAME -> 3l
> | BAD_SEQUENCE_ID -> 4l
> | MISSING_RESULT -> 5l
> + | INTERNAL_ERROR -> 61
> + | PROTOCOL_ERROR -> 71
>
> class t =
> object (self)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1322) OCaml lib fail to compile:
Thrift.ml line 305, int vs int32 mismatch
Posted by "Philippe STRAUSS (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13098120#comment-13098120 ]
Philippe STRAUSS commented on THRIFT-1322:
------------------------------------------
This is the patch to apply on top of THRIFT-690:
--- Thrift.ml.orig 2011-09-06 17:59:44.000000000 +0200
+++ Thrift.ml 2011-09-06 17:58:39.000000000 +0200
@@ -302,8 +302,8 @@
| 3l -> WRONG_METHOD_NAME
| 4l -> BAD_SEQUENCE_ID
| 5l -> MISSING_RESULT
- | 61 -> INTERNAL_ERROR
- | 71 -> PROTOCOL_ERROR
+ | 6l -> INTERNAL_ERROR
+ | 7l -> PROTOCOL_ERROR
| _ -> raise Thrift_error;;
let typ_to_i = function
| UNKNOWN -> 0l
@@ -312,8 +312,8 @@
| WRONG_METHOD_NAME -> 3l
| BAD_SEQUENCE_ID -> 4l
| MISSING_RESULT -> 5l
- | INTERNAL_ERROR -> 61
- | PROTOCOL_ERROR -> 71
+ | INTERNAL_ERROR -> 6l
+ | PROTOCOL_ERROR -> 7l
class t =
object (self)
-- 8< --
6 and 7 L, el, not one, 1 :-)
> OCaml lib fail to compile: Thrift.ml line 305, int vs int32 mismatch
> --------------------------------------------------------------------
>
> Key: THRIFT-1322
> URL: https://issues.apache.org/jira/browse/THRIFT-1322
> Project: Thrift
> Issue Type: Bug
> Components: OCaml - Library
> Environment: Mac OS 10.6.8, 64bits x86_64
> Reporter: Philippe STRAUSS
> Priority: Blocker
> Fix For: 0.8
>
> Original Estimate: 20m
> Remaining Estimate: 20m
>
> Between SVN of 20110418 and today, the lib/ocaml has ceased to build.
> I mean it did build on april 18, not lately.
> The build die in this way:
> -- 8< --
> philou@air:~/src/thrift-svn/lib/ocaml$ make
> cd src; make; cd ..
> ocamlopt -c -thread Thrift.ml
> File "Thrift.ml", line 305, characters 6-8:
> Error: This pattern matches values of type int
> but a pattern was expected which matches values of type int32
> -- 8< --
> The lib/ocaml changes between 20110418 and 20110905 are listed below, and rather thin, should not be a big deal to fix :
> diff -ur thrift-svn-20110418/lib/ocaml/src/Thrift.ml thrift-svn/lib/ocaml/src/Thrift.ml
> --- thrift-svn-20110418/lib/ocaml/src/Thrift.ml 2011-04-13 18:38:21.000000000 +0200
> +++ thrift-svn/lib/ocaml/src/Thrift.ml 2011-08-03 16:10:25.000000000 +0200
> @@ -292,6 +292,8 @@
> | WRONG_METHOD_NAME
> | BAD_SEQUENCE_ID
> | MISSING_RESULT
> + | INTERNAL_ERROR
> + | PROTOCOL_ERROR
>
> let typ_of_i = function
> 0l -> UNKNOWN
> @@ -300,6 +302,8 @@
> | 3l -> WRONG_METHOD_NAME
> | 4l -> BAD_SEQUENCE_ID
> | 5l -> MISSING_RESULT
> + | 61 -> INTERNAL_ERROR
> + | 71 -> PROTOCOL_ERROR
> | _ -> raise Thrift_error;;
> let typ_to_i = function
> | UNKNOWN -> 0l
> @@ -308,6 +312,8 @@
> | WRONG_METHOD_NAME -> 3l
> | BAD_SEQUENCE_ID -> 4l
> | MISSING_RESULT -> 5l
> + | INTERNAL_ERROR -> 61
> + | PROTOCOL_ERROR -> 71
>
> class t =
> object (self)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (THRIFT-1322) OCaml lib fail to compile: Thrift.ml
line 305, int vs int32 mismatch
Posted by "Jake Farrell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jake Farrell closed THRIFT-1322.
--------------------------------
Resolution: Fixed
Didnt understand what the patch was for at first, I've updated the ocaml driver with the necessary changes.
For contributions please attach patches with asf inclusion rather than pasting full diffs to the ticket. http://wiki.apache.org/thrift/HowToContribute
> OCaml lib fail to compile: Thrift.ml line 305, int vs int32 mismatch
> --------------------------------------------------------------------
>
> Key: THRIFT-1322
> URL: https://issues.apache.org/jira/browse/THRIFT-1322
> Project: Thrift
> Issue Type: Bug
> Components: OCaml - Library
> Environment: Mac OS 10.6.8, 64bits x86_64
> Reporter: Philippe STRAUSS
> Assignee: Jake Farrell
> Priority: Blocker
> Fix For: 0.8
>
> Original Estimate: 20m
> Remaining Estimate: 20m
>
> Between SVN of 20110418 and today, the lib/ocaml has ceased to build.
> I mean it did build on april 18, not lately.
> The build die in this way:
> -- 8< --
> philou@air:~/src/thrift-svn/lib/ocaml$ make
> cd src; make; cd ..
> ocamlopt -c -thread Thrift.ml
> File "Thrift.ml", line 305, characters 6-8:
> Error: This pattern matches values of type int
> but a pattern was expected which matches values of type int32
> -- 8< --
> The lib/ocaml changes between 20110418 and 20110905 are listed below, and rather thin, should not be a big deal to fix :
> diff -ur thrift-svn-20110418/lib/ocaml/src/Thrift.ml thrift-svn/lib/ocaml/src/Thrift.ml
> --- thrift-svn-20110418/lib/ocaml/src/Thrift.ml 2011-04-13 18:38:21.000000000 +0200
> +++ thrift-svn/lib/ocaml/src/Thrift.ml 2011-08-03 16:10:25.000000000 +0200
> @@ -292,6 +292,8 @@
> | WRONG_METHOD_NAME
> | BAD_SEQUENCE_ID
> | MISSING_RESULT
> + | INTERNAL_ERROR
> + | PROTOCOL_ERROR
>
> let typ_of_i = function
> 0l -> UNKNOWN
> @@ -300,6 +302,8 @@
> | 3l -> WRONG_METHOD_NAME
> | 4l -> BAD_SEQUENCE_ID
> | 5l -> MISSING_RESULT
> + | 61 -> INTERNAL_ERROR
> + | 71 -> PROTOCOL_ERROR
> | _ -> raise Thrift_error;;
> let typ_to_i = function
> | UNKNOWN -> 0l
> @@ -308,6 +312,8 @@
> | WRONG_METHOD_NAME -> 3l
> | BAD_SEQUENCE_ID -> 4l
> | MISSING_RESULT -> 5l
> + | INTERNAL_ERROR -> 61
> + | PROTOCOL_ERROR -> 71
>
> class t =
> object (self)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Reopened] (THRIFT-1322) OCaml lib fail to compile:
Thrift.ml line 305, int vs int32 mismatch
Posted by "Jake Farrell (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1322?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jake Farrell reopened THRIFT-1322:
----------------------------------
Assignee: Jake Farrell
> OCaml lib fail to compile: Thrift.ml line 305, int vs int32 mismatch
> --------------------------------------------------------------------
>
> Key: THRIFT-1322
> URL: https://issues.apache.org/jira/browse/THRIFT-1322
> Project: Thrift
> Issue Type: Bug
> Components: OCaml - Library
> Environment: Mac OS 10.6.8, 64bits x86_64
> Reporter: Philippe STRAUSS
> Assignee: Jake Farrell
> Priority: Blocker
> Fix For: 0.8
>
> Original Estimate: 20m
> Remaining Estimate: 20m
>
> Between SVN of 20110418 and today, the lib/ocaml has ceased to build.
> I mean it did build on april 18, not lately.
> The build die in this way:
> -- 8< --
> philou@air:~/src/thrift-svn/lib/ocaml$ make
> cd src; make; cd ..
> ocamlopt -c -thread Thrift.ml
> File "Thrift.ml", line 305, characters 6-8:
> Error: This pattern matches values of type int
> but a pattern was expected which matches values of type int32
> -- 8< --
> The lib/ocaml changes between 20110418 and 20110905 are listed below, and rather thin, should not be a big deal to fix :
> diff -ur thrift-svn-20110418/lib/ocaml/src/Thrift.ml thrift-svn/lib/ocaml/src/Thrift.ml
> --- thrift-svn-20110418/lib/ocaml/src/Thrift.ml 2011-04-13 18:38:21.000000000 +0200
> +++ thrift-svn/lib/ocaml/src/Thrift.ml 2011-08-03 16:10:25.000000000 +0200
> @@ -292,6 +292,8 @@
> | WRONG_METHOD_NAME
> | BAD_SEQUENCE_ID
> | MISSING_RESULT
> + | INTERNAL_ERROR
> + | PROTOCOL_ERROR
>
> let typ_of_i = function
> 0l -> UNKNOWN
> @@ -300,6 +302,8 @@
> | 3l -> WRONG_METHOD_NAME
> | 4l -> BAD_SEQUENCE_ID
> | 5l -> MISSING_RESULT
> + | 61 -> INTERNAL_ERROR
> + | 71 -> PROTOCOL_ERROR
> | _ -> raise Thrift_error;;
> let typ_to_i = function
> | UNKNOWN -> 0l
> @@ -308,6 +312,8 @@
> | WRONG_METHOD_NAME -> 3l
> | BAD_SEQUENCE_ID -> 4l
> | MISSING_RESULT -> 5l
> + | INTERNAL_ERROR -> 61
> + | PROTOCOL_ERROR -> 71
>
> class t =
> object (self)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1322) OCaml lib fail to compile:
Thrift.ml line 305, int vs int32 mismatch
Posted by "Philippe STRAUSS (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13098117#comment-13098117 ]
Philippe STRAUSS commented on THRIFT-1322:
------------------------------------------
Jake,
You got wrong (the other way around) understanding, the patch I attached is exactly the one added by THRIFT-690 (just discorering this fact by reading the case on jira), and **is the change that now makes ocaml lib _fail_ to compile**.
also, is there some
> OCaml lib fail to compile: Thrift.ml line 305, int vs int32 mismatch
> --------------------------------------------------------------------
>
> Key: THRIFT-1322
> URL: https://issues.apache.org/jira/browse/THRIFT-1322
> Project: Thrift
> Issue Type: Bug
> Components: OCaml - Library
> Environment: Mac OS 10.6.8, 64bits x86_64
> Reporter: Philippe STRAUSS
> Priority: Blocker
> Fix For: 0.8
>
> Original Estimate: 20m
> Remaining Estimate: 20m
>
> Between SVN of 20110418 and today, the lib/ocaml has ceased to build.
> I mean it did build on april 18, not lately.
> The build die in this way:
> -- 8< --
> philou@air:~/src/thrift-svn/lib/ocaml$ make
> cd src; make; cd ..
> ocamlopt -c -thread Thrift.ml
> File "Thrift.ml", line 305, characters 6-8:
> Error: This pattern matches values of type int
> but a pattern was expected which matches values of type int32
> -- 8< --
> The lib/ocaml changes between 20110418 and 20110905 are listed below, and rather thin, should not be a big deal to fix :
> diff -ur thrift-svn-20110418/lib/ocaml/src/Thrift.ml thrift-svn/lib/ocaml/src/Thrift.ml
> --- thrift-svn-20110418/lib/ocaml/src/Thrift.ml 2011-04-13 18:38:21.000000000 +0200
> +++ thrift-svn/lib/ocaml/src/Thrift.ml 2011-08-03 16:10:25.000000000 +0200
> @@ -292,6 +292,8 @@
> | WRONG_METHOD_NAME
> | BAD_SEQUENCE_ID
> | MISSING_RESULT
> + | INTERNAL_ERROR
> + | PROTOCOL_ERROR
>
> let typ_of_i = function
> 0l -> UNKNOWN
> @@ -300,6 +302,8 @@
> | 3l -> WRONG_METHOD_NAME
> | 4l -> BAD_SEQUENCE_ID
> | 5l -> MISSING_RESULT
> + | 61 -> INTERNAL_ERROR
> + | 71 -> PROTOCOL_ERROR
> | _ -> raise Thrift_error;;
> let typ_to_i = function
> | UNKNOWN -> 0l
> @@ -308,6 +312,8 @@
> | WRONG_METHOD_NAME -> 3l
> | BAD_SEQUENCE_ID -> 4l
> | MISSING_RESULT -> 5l
> + | INTERNAL_ERROR -> 61
> + | PROTOCOL_ERROR -> 71
>
> class t =
> object (self)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (THRIFT-1322) OCaml lib fail to compile:
Thrift.ml line 305, int vs int32 mismatch
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-1322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13098154#comment-13098154 ]
Hudson commented on THRIFT-1322:
--------------------------------
Integrated in Thrift #251 (See [https://builds.apache.org/job/Thrift/251/])
Thrift-1322: OCaml lib fail to compile: Thrift.ml line 305, int vs int32 mismatch
Client: OCaml
Updates the ocaml lib INTERNAL and PROTOCOL error enums to use the correct numeric values
> OCaml lib fail to compile: Thrift.ml line 305, int vs int32 mismatch
> --------------------------------------------------------------------
>
> Key: THRIFT-1322
> URL: https://issues.apache.org/jira/browse/THRIFT-1322
> Project: Thrift
> Issue Type: Bug
> Components: OCaml - Library
> Environment: Mac OS 10.6.8, 64bits x86_64
> Reporter: Philippe STRAUSS
> Assignee: Jake Farrell
> Priority: Blocker
> Fix For: 0.8
>
> Original Estimate: 20m
> Remaining Estimate: 20m
>
> Between SVN of 20110418 and today, the lib/ocaml has ceased to build.
> I mean it did build on april 18, not lately.
> The build die in this way:
> -- 8< --
> philou@air:~/src/thrift-svn/lib/ocaml$ make
> cd src; make; cd ..
> ocamlopt -c -thread Thrift.ml
> File "Thrift.ml", line 305, characters 6-8:
> Error: This pattern matches values of type int
> but a pattern was expected which matches values of type int32
> -- 8< --
> The lib/ocaml changes between 20110418 and 20110905 are listed below, and rather thin, should not be a big deal to fix :
> diff -ur thrift-svn-20110418/lib/ocaml/src/Thrift.ml thrift-svn/lib/ocaml/src/Thrift.ml
> --- thrift-svn-20110418/lib/ocaml/src/Thrift.ml 2011-04-13 18:38:21.000000000 +0200
> +++ thrift-svn/lib/ocaml/src/Thrift.ml 2011-08-03 16:10:25.000000000 +0200
> @@ -292,6 +292,8 @@
> | WRONG_METHOD_NAME
> | BAD_SEQUENCE_ID
> | MISSING_RESULT
> + | INTERNAL_ERROR
> + | PROTOCOL_ERROR
>
> let typ_of_i = function
> 0l -> UNKNOWN
> @@ -300,6 +302,8 @@
> | 3l -> WRONG_METHOD_NAME
> | 4l -> BAD_SEQUENCE_ID
> | 5l -> MISSING_RESULT
> + | 61 -> INTERNAL_ERROR
> + | 71 -> PROTOCOL_ERROR
> | _ -> raise Thrift_error;;
> let typ_to_i = function
> | UNKNOWN -> 0l
> @@ -308,6 +312,8 @@
> | WRONG_METHOD_NAME -> 3l
> | BAD_SEQUENCE_ID -> 4l
> | MISSING_RESULT -> 5l
> + | INTERNAL_ERROR -> 61
> + | PROTOCOL_ERROR -> 71
>
> class t =
> object (self)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira