[ 
https://issues.apache.org/jira/browse/THRIFT-4655?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jens Geyer resolved THRIFT-4655.
--------------------------------
    Fix Version/s: 0.18.0
       Resolution: Fixed

The solution moves the PHP-specific keyword list code out of the common 
generator base class into the php generator (where it belongs). 

The default behaviour is now to return an empty keyword list for the 
"validation" step. Each target language is free to override this and use that 
validation filter, if such is necessary and there is no other way to deal with 
it properly (e.g. in C# we can prefix stuff with "@") 

Also, the validation step now prints exactly, which language generator 
implementation tries to fight the user from using what keyword. This should 
help to exercise some pressure on that particular implementation to get it 
finally right.

NB. The rerasons and arguments for and against this design are already 
explained at length in the linked ticket(s). I don't want to repeat it here. 
Furthermore, as we still have a number of different validation concepts and 
keywords handlers (one in the IDL,. this "validation" meachanism, the 
iondividual generators keywords lists and last not least the go validator) 
implemented, I am aware of the fact that this is not a 100% perfect solution 
either, but it's one step into that direction. There's plenty of work to do, 
but it's all out of the scope of this ticket.

> Parser fails on the word "from"
> -------------------------------
>
>                 Key: THRIFT-4655
>                 URL: https://issues.apache.org/jira/browse/THRIFT-4655
>             Project: Thrift
>          Issue Type: Bug
>          Components: Java - Compiler
>    Affects Versions: 0.9.3
>            Reporter: felix wang
>            Assignee: Jens Geyer
>            Priority: Major
>             Fix For: 0.18.0
>
>         Attachments: image-2018-10-25-17-08-31-856.png
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> !image-2018-10-25-17-08-31-856.png!
> {color:#191f25}2018-10-25 04:04:42:[ERROR] thrift failed output: {color}
> {color:#191f25}[ERROR] thrift failed error: 
> [ERROR:/tmp/pebble_idl_tmp/mkt/dis/1540454677417/idlPro/dis/src/main/thrift/mkt_dis_model_dto.thrift:887]
>  (last token was 'from'){color}
> {color:#191f25}[ERROR] Failed to execute goal 
> com.tuniu.thrift.tools:maven-thrift-plugin:0.1.11_1-SNAPSHOT:compile 
> (thrift-java-sources) on project mkt-dis-idl: thrift did not exit cleanly. 
> Review output for more information. -> [Help 1]{color}
> {color:#191f25}[ERROR] {color}
> {color:#191f25}[ERROR] To see the full stack trace of the errors, re-run 
> Maven with the -e switch.{color}
> {color:#191f25}[ERROR] Re-run Maven using the -X switch to enable full debug 
> logging.{color}
> {color:#191f25}[ERROR] {color}
> {color:#191f25}[ERROR] For more information about the errors and possible 
> solutions, please read the following articles:{color}
> {color:#191f25}[ERROR] [Help 1] 
> {color}[http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to