You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jesper Reenberg (JIRA)" <ji...@apache.org> on 2011/01/03 22:54:46 UTC

[jira] Created: (THRIFT-1028) field names of structs used with wrong casing in the generated haskell code

field names of structs used with wrong casing in the generated haskell code
---------------------------------------------------------------------------

                 Key: THRIFT-1028
                 URL: https://issues.apache.org/jira/browse/THRIFT-1028
             Project: Thrift
          Issue Type: Bug
          Components: Haskell - Compiler
    Affects Versions: 0.5
            Reporter: Jesper Reenberg
            Priority: Critical


Invalid haskell code is generated using the following thrift code:

--------------------------------------------------------

struct Test {
  1:string Foo,
  3:i32 BarBaz,
  4:i32 HestTest
}

service Test {

  bool makeTest(1:Test tst, 2:double i)        

}

--------------------------------------------------------

The wrong casing is generated in the record setter parts of the generated data in read_Test_fields and generation of the initial "record" in read_Test.

The wrong casing is the first letter from the thrift struct specification always being lowercase when used in the above two generated functions.

The generated data type is 

data Test = Test 
            {
              f_Test_Foo :: Maybe String
            , f_Test_BarBaz :: Maybe Int32
            ,  f_Test_HestTest :: Maybe Int32
            } 
          deriving (Show,Eq,Ord,Typeable)

Where it is used with the field names f_Test_foo, f_Test_barBaz and f_Test_hestTest as seen below

read_Test iprot = do
  _ <- readStructBegin iprot
  record <- read_Test_fields iprot 
            (Test{f_Test_foo=Nothing,f_Test_barBaz=Nothing,f_Test_hestTest=Nothing})
  readStructEnd iprot
  return record

I have downloaded and build the 0.5.0 from http://thrift.apache.org/ and i don't know if it affect older versions as well.

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


[jira] Commented: (THRIFT-1028) field names of structs used with wrong casing in the generated haskell code

Posted by "Jesper Reenberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12987803#action_12987803 ] 

Jesper Reenberg commented on THRIFT-1028:
-----------------------------------------

I would say that it should follow the .thrift specification as long as it is valid haskell.
But then again, I don't know what the other code generators does. 
The optimal solution would be that it should be easy to move from language to language when using the same .thrift file says without having to worry about different capitalising in the code generated for the different languages. 

> field names of structs used with wrong casing in the generated haskell code
> ---------------------------------------------------------------------------
>
>                 Key: THRIFT-1028
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1028
>             Project: Thrift
>          Issue Type: Bug
>          Components: Haskell - Compiler
>    Affects Versions: 0.5
>         Environment: ghc 6.12.1, Thrift version 0.5.0, ubuntu 10.10
>            Reporter: Jesper Reenberg
>            Assignee: Christian Lavoie
>            Priority: Minor
>
> Invalid haskell code is generated using the following thrift code:
> --------------------------------------------------------
> struct Test {
>   1:string Foo,
>   3:i32 BarBaz,
>   4:i32 HestTest
> }
> service Test {
>   bool makeTest(1:Test tst, 2:double i)        
> }
> --------------------------------------------------------
> The wrong casing is generated in the record setter parts of the generated data in read_Test_fields and generation of the initial "record" in read_Test.
> The wrong casing is the first letter from the thrift struct specification always being lowercase when used in the above two generated functions.
> The generated data type is 
> data Test = Test 
>             {
>               f_Test_Foo :: Maybe String
>             , f_Test_BarBaz :: Maybe Int32
>             ,  f_Test_HestTest :: Maybe Int32
>             } 
>           deriving (Show,Eq,Ord,Typeable)
> Where it is used with the field names f_Test_foo, f_Test_barBaz and f_Test_hestTest as seen below
> read_Test iprot = do
>   _ <- readStructBegin iprot
>   record <- read_Test_fields iprot 
>             (Test{f_Test_foo=Nothing,f_Test_barBaz=Nothing,f_Test_hestTest=Nothing})
>   readStructEnd iprot
>   return record
> I have downloaded and build the 0.5.0 from http://thrift.apache.org/ and i don't know if it affect older versions as well.

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


[jira] Issue Comment Edited: (THRIFT-1028) field names of structs used with wrong casing in the generated haskell code

Posted by "Jesper Reenberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12987803#action_12987803 ] 

Jesper Reenberg edited comment on THRIFT-1028 at 1/27/11 5:41 PM:
------------------------------------------------------------------

I would say that it should follow the .thrift specification as long as it is valid haskell.
But then again, I don't know what the other code generators does. 
The optimal solution would be that it should be easy to move from language to language when using the same .thrift file says without having to worry about different capitalising in the code generated for the different languages. 

But for a starter, it would be great if the generated haskell code compiles out of the box as it is a pain to have to manually edit the files just so it compiles.

      was (Author: reenberg):
    I would say that it should follow the .thrift specification as long as it is valid haskell.
But then again, I don't know what the other code generators does. 
The optimal solution would be that it should be easy to move from language to language when using the same .thrift file says without having to worry about different capitalising in the code generated for the different languages. 
  
> field names of structs used with wrong casing in the generated haskell code
> ---------------------------------------------------------------------------
>
>                 Key: THRIFT-1028
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1028
>             Project: Thrift
>          Issue Type: Bug
>          Components: Haskell - Compiler
>    Affects Versions: 0.5
>         Environment: ghc 6.12.1, Thrift version 0.5.0, ubuntu 10.10
>            Reporter: Jesper Reenberg
>            Assignee: Christian Lavoie
>            Priority: Minor
>
> Invalid haskell code is generated using the following thrift code:
> --------------------------------------------------------
> struct Test {
>   1:string Foo,
>   3:i32 BarBaz,
>   4:i32 HestTest
> }
> service Test {
>   bool makeTest(1:Test tst, 2:double i)        
> }
> --------------------------------------------------------
> The wrong casing is generated in the record setter parts of the generated data in read_Test_fields and generation of the initial "record" in read_Test.
> The wrong casing is the first letter from the thrift struct specification always being lowercase when used in the above two generated functions.
> The generated data type is 
> data Test = Test 
>             {
>               f_Test_Foo :: Maybe String
>             , f_Test_BarBaz :: Maybe Int32
>             ,  f_Test_HestTest :: Maybe Int32
>             } 
>           deriving (Show,Eq,Ord,Typeable)
> Where it is used with the field names f_Test_foo, f_Test_barBaz and f_Test_hestTest as seen below
> read_Test iprot = do
>   _ <- readStructBegin iprot
>   record <- read_Test_fields iprot 
>             (Test{f_Test_foo=Nothing,f_Test_barBaz=Nothing,f_Test_hestTest=Nothing})
>   readStructEnd iprot
>   return record
> I have downloaded and build the 0.5.0 from http://thrift.apache.org/ and i don't know if it affect older versions as well.

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


[jira] Commented: (THRIFT-1028) field names of structs used with wrong casing in the generated haskell code

Posted by "Jesper Reenberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982164#action_12982164 ] 

Jesper Reenberg commented on THRIFT-1028:
-----------------------------------------

Christian Lavoie,

It sounded like you had already fixed the issue. Any chance it will be pushed to the svn any time soon or?

> field names of structs used with wrong casing in the generated haskell code
> ---------------------------------------------------------------------------
>
>                 Key: THRIFT-1028
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1028
>             Project: Thrift
>          Issue Type: Bug
>          Components: Haskell - Compiler
>    Affects Versions: 0.5
>         Environment: ghc 6.12.1, Thrift version 0.5.0, ubuntu 10.10
>            Reporter: Jesper Reenberg
>            Assignee: Christian Lavoie
>            Priority: Minor
>
> Invalid haskell code is generated using the following thrift code:
> --------------------------------------------------------
> struct Test {
>   1:string Foo,
>   3:i32 BarBaz,
>   4:i32 HestTest
> }
> service Test {
>   bool makeTest(1:Test tst, 2:double i)        
> }
> --------------------------------------------------------
> The wrong casing is generated in the record setter parts of the generated data in read_Test_fields and generation of the initial "record" in read_Test.
> The wrong casing is the first letter from the thrift struct specification always being lowercase when used in the above two generated functions.
> The generated data type is 
> data Test = Test 
>             {
>               f_Test_Foo :: Maybe String
>             , f_Test_BarBaz :: Maybe Int32
>             ,  f_Test_HestTest :: Maybe Int32
>             } 
>           deriving (Show,Eq,Ord,Typeable)
> Where it is used with the field names f_Test_foo, f_Test_barBaz and f_Test_hestTest as seen below
> read_Test iprot = do
>   _ <- readStructBegin iprot
>   record <- read_Test_fields iprot 
>             (Test{f_Test_foo=Nothing,f_Test_barBaz=Nothing,f_Test_hestTest=Nothing})
>   readStructEnd iprot
>   return record
> I have downloaded and build the 0.5.0 from http://thrift.apache.org/ and i don't know if it affect older versions as well.

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


[jira] Commented: (THRIFT-1028) field names of structs used with wrong casing in the generated haskell code

Posted by "Christian Lavoie (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12987773#action_12987773 ] 

Christian Lavoie commented on THRIFT-1028:
------------------------------------------

Oh, I see what you mean.

Yeah, right now the bindings decapitalize a few more things than they could -- part of the problem is that Haskell requires certain things to capitalized and others not too. I think the current code generator tries (too) hard to stay consistent across cases where parts of the code want a given identifier capitalized and others parts wants that same identifier non-capitalized (Types vs function and field names, for example).

I wonder what's the right rule of thumb here -- "keep what the .thrift file uses unless Haskell's grammar requires otherwise"?

> field names of structs used with wrong casing in the generated haskell code
> ---------------------------------------------------------------------------
>
>                 Key: THRIFT-1028
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1028
>             Project: Thrift
>          Issue Type: Bug
>          Components: Haskell - Compiler
>    Affects Versions: 0.5
>         Environment: ghc 6.12.1, Thrift version 0.5.0, ubuntu 10.10
>            Reporter: Jesper Reenberg
>            Assignee: Christian Lavoie
>            Priority: Minor
>
> Invalid haskell code is generated using the following thrift code:
> --------------------------------------------------------
> struct Test {
>   1:string Foo,
>   3:i32 BarBaz,
>   4:i32 HestTest
> }
> service Test {
>   bool makeTest(1:Test tst, 2:double i)        
> }
> --------------------------------------------------------
> The wrong casing is generated in the record setter parts of the generated data in read_Test_fields and generation of the initial "record" in read_Test.
> The wrong casing is the first letter from the thrift struct specification always being lowercase when used in the above two generated functions.
> The generated data type is 
> data Test = Test 
>             {
>               f_Test_Foo :: Maybe String
>             , f_Test_BarBaz :: Maybe Int32
>             ,  f_Test_HestTest :: Maybe Int32
>             } 
>           deriving (Show,Eq,Ord,Typeable)
> Where it is used with the field names f_Test_foo, f_Test_barBaz and f_Test_hestTest as seen below
> read_Test iprot = do
>   _ <- readStructBegin iprot
>   record <- read_Test_fields iprot 
>             (Test{f_Test_foo=Nothing,f_Test_barBaz=Nothing,f_Test_hestTest=Nothing})
>   readStructEnd iprot
>   return record
> I have downloaded and build the 0.5.0 from http://thrift.apache.org/ and i don't know if it affect older versions as well.

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


[jira] Commented: (THRIFT-1028) field names of structs used with wrong casing in the generated haskell code

Posted by "Jesper Reenberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12977301#action_12977301 ] 

Jesper Reenberg commented on THRIFT-1028:
-----------------------------------------

Ah ok, didn't look through all the closed issues.

I have cloned the dreiss github repo as I haven't really worked with svn before and didn't want to mess anything up. As far as I understand then this repo should be updated each time there is a new commit to the apache svn.  But maybe not as it has version 0.6.0-dev?

However there are multiple issues regarding the Haskell part when trying to make it.

The licence part of the update Thrift.cabal file is not valid according to my cabal: https://github.com/dreiss/thrift/blob/master/lib/hs/Thrift.cabal#L23

     /usr/bin/runhaskell Setup.lhs configure 
     Setup.lhs: Thrift.cabal:23: Parse of field 'license' failed.

When changed to something valid, ex Apache2 I only get the warnings that it is not a known license as would be expected. 
However it seems that i have three versions of network installed, which gave me a hard time when trying to compile the 0.5.0 from the tar.


     /var/lib/ghc-6.12.1/package.conf.d
        network-2.2.1.7
        network-2.3                <-- Manually hidden
    /home/jesper/.ghc/i386-linux-6.12.1/package.conf.d
        network-2.2.1.10       <-- Manually hidden

So to conpile the 0.5.0 i manually hided the 2.2.1.10 and 2.3 to make it compile.

But both the 0.5.0 tar and the dreiss git gives the following warning:

   Warning: This package indirectly depends on multiple versions of the same
   package. This is highly likely to cause a compile failure.
   package HTTP-4000.0.9 requires network-2.2.1.7
   package thrift-0.6.0 requires network-2.3


This however gave som issues when compiling from the dreiss git

   src/Thrift/Transport/HttpClient.hs:85:30:
       Couldn't match expected type `network-2.2.1.7:Network.URI.URI'
              against inferred type `URI'
       In the `rqURI' field of a record
   ......

even though the HttpClient.hs files are exactly the same
I gues that it is cabal that makes it think that it needs network-2.3 even though i have hidden it :S  But when adding the constraing network == 2.2.1.7 to Thrift.cabal made it compile.


It still doesn't work, after unregistering the old thrift package which wrongly is called Thrift-0.2.0, note the capital T whereas the new is called thrift-0.6.0
Same errors as before..

I gues I will have to try the svn and make sure. But it seems "silly" that the 0.5.0 isn't updated with these changes as it is basicly useless for Haskell. Also the configure script failed in the 0.5.0 tar due to some php that it didn't detect that wasn't present, this however is fixed in the 0.6.0-dev i got.


> field names of structs used with wrong casing in the generated haskell code
> ---------------------------------------------------------------------------
>
>                 Key: THRIFT-1028
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1028
>             Project: Thrift
>          Issue Type: Bug
>          Components: Haskell - Compiler
>    Affects Versions: 0.5
>         Environment: ghc 6.12.1, Thrift version 0.5.0, ubuntu 10.10
>            Reporter: Jesper Reenberg
>            Assignee: Christian Lavoie
>            Priority: Minor
>
> Invalid haskell code is generated using the following thrift code:
> --------------------------------------------------------
> struct Test {
>   1:string Foo,
>   3:i32 BarBaz,
>   4:i32 HestTest
> }
> service Test {
>   bool makeTest(1:Test tst, 2:double i)        
> }
> --------------------------------------------------------
> The wrong casing is generated in the record setter parts of the generated data in read_Test_fields and generation of the initial "record" in read_Test.
> The wrong casing is the first letter from the thrift struct specification always being lowercase when used in the above two generated functions.
> The generated data type is 
> data Test = Test 
>             {
>               f_Test_Foo :: Maybe String
>             , f_Test_BarBaz :: Maybe Int32
>             ,  f_Test_HestTest :: Maybe Int32
>             } 
>           deriving (Show,Eq,Ord,Typeable)
> Where it is used with the field names f_Test_foo, f_Test_barBaz and f_Test_hestTest as seen below
> read_Test iprot = do
>   _ <- readStructBegin iprot
>   record <- read_Test_fields iprot 
>             (Test{f_Test_foo=Nothing,f_Test_barBaz=Nothing,f_Test_hestTest=Nothing})
>   readStructEnd iprot
>   return record
> I have downloaded and build the 0.5.0 from http://thrift.apache.org/ and i don't know if it affect older versions as well.

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


[jira] Commented: (THRIFT-1028) field names of structs used with wrong casing in the generated haskell code

Posted by "Christian Lavoie (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982242#action_12982242 ] 

Christian Lavoie commented on THRIFT-1028:
------------------------------------------

It's been in the SVN for a while, but not in a released version (I thought). I'm fairly busy this week, but I'll try to poke at this ASAP.

> field names of structs used with wrong casing in the generated haskell code
> ---------------------------------------------------------------------------
>
>                 Key: THRIFT-1028
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1028
>             Project: Thrift
>          Issue Type: Bug
>          Components: Haskell - Compiler
>    Affects Versions: 0.5
>         Environment: ghc 6.12.1, Thrift version 0.5.0, ubuntu 10.10
>            Reporter: Jesper Reenberg
>            Assignee: Christian Lavoie
>            Priority: Minor
>
> Invalid haskell code is generated using the following thrift code:
> --------------------------------------------------------
> struct Test {
>   1:string Foo,
>   3:i32 BarBaz,
>   4:i32 HestTest
> }
> service Test {
>   bool makeTest(1:Test tst, 2:double i)        
> }
> --------------------------------------------------------
> The wrong casing is generated in the record setter parts of the generated data in read_Test_fields and generation of the initial "record" in read_Test.
> The wrong casing is the first letter from the thrift struct specification always being lowercase when used in the above two generated functions.
> The generated data type is 
> data Test = Test 
>             {
>               f_Test_Foo :: Maybe String
>             , f_Test_BarBaz :: Maybe Int32
>             ,  f_Test_HestTest :: Maybe Int32
>             } 
>           deriving (Show,Eq,Ord,Typeable)
> Where it is used with the field names f_Test_foo, f_Test_barBaz and f_Test_hestTest as seen below
> read_Test iprot = do
>   _ <- readStructBegin iprot
>   record <- read_Test_fields iprot 
>             (Test{f_Test_foo=Nothing,f_Test_barBaz=Nothing,f_Test_hestTest=Nothing})
>   readStructEnd iprot
>   return record
> I have downloaded and build the 0.5.0 from http://thrift.apache.org/ and i don't know if it affect older versions as well.

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


[jira] Commented: (THRIFT-1028) field names of structs used with wrong casing in the generated haskell code

Posted by "Jesper Reenberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12983761#action_12983761 ] 

Jesper Reenberg commented on THRIFT-1028:
-----------------------------------------

If you the fixes are in the svn, are they in trunk?

I just tried to do another update of trunk but besides the one a few days ago that changed the version number to 0.7.0-dev there has been nothing new.

> svn up
At revision 1060836.

However i tried making a new compile and install to make sure, but it still generates erroneous selector names

> thrift -version
Thrift version 0.7.0-dev

> field names of structs used with wrong casing in the generated haskell code
> ---------------------------------------------------------------------------
>
>                 Key: THRIFT-1028
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1028
>             Project: Thrift
>          Issue Type: Bug
>          Components: Haskell - Compiler
>    Affects Versions: 0.5
>         Environment: ghc 6.12.1, Thrift version 0.5.0, ubuntu 10.10
>            Reporter: Jesper Reenberg
>            Assignee: Christian Lavoie
>            Priority: Minor
>
> Invalid haskell code is generated using the following thrift code:
> --------------------------------------------------------
> struct Test {
>   1:string Foo,
>   3:i32 BarBaz,
>   4:i32 HestTest
> }
> service Test {
>   bool makeTest(1:Test tst, 2:double i)        
> }
> --------------------------------------------------------
> The wrong casing is generated in the record setter parts of the generated data in read_Test_fields and generation of the initial "record" in read_Test.
> The wrong casing is the first letter from the thrift struct specification always being lowercase when used in the above two generated functions.
> The generated data type is 
> data Test = Test 
>             {
>               f_Test_Foo :: Maybe String
>             , f_Test_BarBaz :: Maybe Int32
>             ,  f_Test_HestTest :: Maybe Int32
>             } 
>           deriving (Show,Eq,Ord,Typeable)
> Where it is used with the field names f_Test_foo, f_Test_barBaz and f_Test_hestTest as seen below
> read_Test iprot = do
>   _ <- readStructBegin iprot
>   record <- read_Test_fields iprot 
>             (Test{f_Test_foo=Nothing,f_Test_barBaz=Nothing,f_Test_hestTest=Nothing})
>   readStructEnd iprot
>   return record
> I have downloaded and build the 0.5.0 from http://thrift.apache.org/ and i don't know if it affect older versions as well.

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


[jira] Issue Comment Edited: (THRIFT-1028) field names of structs used with wrong casing in the generated haskell code

Posted by "Jesper Reenberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12977315#action_12977315 ] 

Jesper Reenberg edited comment on THRIFT-1028 at 1/4/11 8:47 PM:
-----------------------------------------------------------------

Got the svn now..

I can see that the cabal file licence "issue" has been fixed but I still have to fix the network package with ==, still version 0.6.0-dev though and still the capitalisation issues in xxx_Types.hs.

Edit: After some fidling with my local/global packages it got it to work without any changes.

On a side note: The ruby part doesn't compile. I don't use ruby myself but it seems to be somewhat standard on a ubuntu install these days, but something could be wrong on my system.




      was (Author: reenberg):
    Got the svn now..

I can see that the cabal file licence "issue" has been fixed but I still have to fix the network package with ==, still version 0.6.0-dev though and still the capitalisation issues in xxx_Types.hs.


On a side note: The ruby part doesn't compile. I don't use ruby myself so something could be wrong on my system.



  
> field names of structs used with wrong casing in the generated haskell code
> ---------------------------------------------------------------------------
>
>                 Key: THRIFT-1028
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1028
>             Project: Thrift
>          Issue Type: Bug
>          Components: Haskell - Compiler
>    Affects Versions: 0.5
>         Environment: ghc 6.12.1, Thrift version 0.5.0, ubuntu 10.10
>            Reporter: Jesper Reenberg
>            Assignee: Christian Lavoie
>            Priority: Minor
>
> Invalid haskell code is generated using the following thrift code:
> --------------------------------------------------------
> struct Test {
>   1:string Foo,
>   3:i32 BarBaz,
>   4:i32 HestTest
> }
> service Test {
>   bool makeTest(1:Test tst, 2:double i)        
> }
> --------------------------------------------------------
> The wrong casing is generated in the record setter parts of the generated data in read_Test_fields and generation of the initial "record" in read_Test.
> The wrong casing is the first letter from the thrift struct specification always being lowercase when used in the above two generated functions.
> The generated data type is 
> data Test = Test 
>             {
>               f_Test_Foo :: Maybe String
>             , f_Test_BarBaz :: Maybe Int32
>             ,  f_Test_HestTest :: Maybe Int32
>             } 
>           deriving (Show,Eq,Ord,Typeable)
> Where it is used with the field names f_Test_foo, f_Test_barBaz and f_Test_hestTest as seen below
> read_Test iprot = do
>   _ <- readStructBegin iprot
>   record <- read_Test_fields iprot 
>             (Test{f_Test_foo=Nothing,f_Test_barBaz=Nothing,f_Test_hestTest=Nothing})
>   readStructEnd iprot
>   return record
> I have downloaded and build the 0.5.0 from http://thrift.apache.org/ and i don't know if it affect older versions as well.

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


[jira] Updated: (THRIFT-1028) field names of structs used with wrong casing in the generated haskell code

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

Jesper Reenberg updated THRIFT-1028:
------------------------------------

    Environment: ghc 6.12.1, Thrift version 0.5.0, ubuntu 10.10

> field names of structs used with wrong casing in the generated haskell code
> ---------------------------------------------------------------------------
>
>                 Key: THRIFT-1028
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1028
>             Project: Thrift
>          Issue Type: Bug
>          Components: Haskell - Compiler
>    Affects Versions: 0.5
>         Environment: ghc 6.12.1, Thrift version 0.5.0, ubuntu 10.10
>            Reporter: Jesper Reenberg
>            Priority: Critical
>
> Invalid haskell code is generated using the following thrift code:
> --------------------------------------------------------
> struct Test {
>   1:string Foo,
>   3:i32 BarBaz,
>   4:i32 HestTest
> }
> service Test {
>   bool makeTest(1:Test tst, 2:double i)        
> }
> --------------------------------------------------------
> The wrong casing is generated in the record setter parts of the generated data in read_Test_fields and generation of the initial "record" in read_Test.
> The wrong casing is the first letter from the thrift struct specification always being lowercase when used in the above two generated functions.
> The generated data type is 
> data Test = Test 
>             {
>               f_Test_Foo :: Maybe String
>             , f_Test_BarBaz :: Maybe Int32
>             ,  f_Test_HestTest :: Maybe Int32
>             } 
>           deriving (Show,Eq,Ord,Typeable)
> Where it is used with the field names f_Test_foo, f_Test_barBaz and f_Test_hestTest as seen below
> read_Test iprot = do
>   _ <- readStructBegin iprot
>   record <- read_Test_fields iprot 
>             (Test{f_Test_foo=Nothing,f_Test_barBaz=Nothing,f_Test_hestTest=Nothing})
>   readStructEnd iprot
>   return record
> I have downloaded and build the 0.5.0 from http://thrift.apache.org/ and i don't know if it affect older versions as well.

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


[jira] Commented: (THRIFT-1028) field names of structs used with wrong casing in the generated haskell code

Posted by "Jesper Reenberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1028?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12977315#action_12977315 ] 

Jesper Reenberg commented on THRIFT-1028:
-----------------------------------------

Got the svn now..

I can see that the cabal file licence "issue" has been fixed but I still have to fix the network package with ==, still version 0.6.0-dev though and still the capitalisation issues in xxx_Types.hs.


On a side note: The ruby part doesn't compile. I don't use ruby myself so something could be wrong on my system.




> field names of structs used with wrong casing in the generated haskell code
> ---------------------------------------------------------------------------
>
>                 Key: THRIFT-1028
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1028
>             Project: Thrift
>          Issue Type: Bug
>          Components: Haskell - Compiler
>    Affects Versions: 0.5
>         Environment: ghc 6.12.1, Thrift version 0.5.0, ubuntu 10.10
>            Reporter: Jesper Reenberg
>            Assignee: Christian Lavoie
>            Priority: Minor
>
> Invalid haskell code is generated using the following thrift code:
> --------------------------------------------------------
> struct Test {
>   1:string Foo,
>   3:i32 BarBaz,
>   4:i32 HestTest
> }
> service Test {
>   bool makeTest(1:Test tst, 2:double i)        
> }
> --------------------------------------------------------
> The wrong casing is generated in the record setter parts of the generated data in read_Test_fields and generation of the initial "record" in read_Test.
> The wrong casing is the first letter from the thrift struct specification always being lowercase when used in the above two generated functions.
> The generated data type is 
> data Test = Test 
>             {
>               f_Test_Foo :: Maybe String
>             , f_Test_BarBaz :: Maybe Int32
>             ,  f_Test_HestTest :: Maybe Int32
>             } 
>           deriving (Show,Eq,Ord,Typeable)
> Where it is used with the field names f_Test_foo, f_Test_barBaz and f_Test_hestTest as seen below
> read_Test iprot = do
>   _ <- readStructBegin iprot
>   record <- read_Test_fields iprot 
>             (Test{f_Test_foo=Nothing,f_Test_barBaz=Nothing,f_Test_hestTest=Nothing})
>   readStructEnd iprot
>   return record
> I have downloaded and build the 0.5.0 from http://thrift.apache.org/ and i don't know if it affect older versions as well.

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


[jira] Updated: (THRIFT-1028) field names of structs used with wrong casing in the generated haskell code

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

Christian Lavoie updated THRIFT-1028:
-------------------------------------

    Priority: Minor  (was: Critical)
    Assignee: Christian Lavoie

This is related to THRIFT-918 and THRIFT-652 -- capitalization isn't awesome in the Haskell bindings.

Jesper -- I thought I fixed that in the SVN Repos. Can you check out trunk and see if that works for you? The Haskell bindings in trunk are significantly less buggy than in the release version (IIRC -- I can never remember if we made a release since my slew of patches).

> field names of structs used with wrong casing in the generated haskell code
> ---------------------------------------------------------------------------
>
>                 Key: THRIFT-1028
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1028
>             Project: Thrift
>          Issue Type: Bug
>          Components: Haskell - Compiler
>    Affects Versions: 0.5
>         Environment: ghc 6.12.1, Thrift version 0.5.0, ubuntu 10.10
>            Reporter: Jesper Reenberg
>            Assignee: Christian Lavoie
>            Priority: Minor
>
> Invalid haskell code is generated using the following thrift code:
> --------------------------------------------------------
> struct Test {
>   1:string Foo,
>   3:i32 BarBaz,
>   4:i32 HestTest
> }
> service Test {
>   bool makeTest(1:Test tst, 2:double i)        
> }
> --------------------------------------------------------
> The wrong casing is generated in the record setter parts of the generated data in read_Test_fields and generation of the initial "record" in read_Test.
> The wrong casing is the first letter from the thrift struct specification always being lowercase when used in the above two generated functions.
> The generated data type is 
> data Test = Test 
>             {
>               f_Test_Foo :: Maybe String
>             , f_Test_BarBaz :: Maybe Int32
>             ,  f_Test_HestTest :: Maybe Int32
>             } 
>           deriving (Show,Eq,Ord,Typeable)
> Where it is used with the field names f_Test_foo, f_Test_barBaz and f_Test_hestTest as seen below
> read_Test iprot = do
>   _ <- readStructBegin iprot
>   record <- read_Test_fields iprot 
>             (Test{f_Test_foo=Nothing,f_Test_barBaz=Nothing,f_Test_hestTest=Nothing})
>   readStructEnd iprot
>   return record
> I have downloaded and build the 0.5.0 from http://thrift.apache.org/ and i don't know if it affect older versions as well.

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