Coder Social home page Coder Social logo

firefly's People

Contributors

mivanzhang avatar qichuan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

firefly's Issues

Single quotation mark is not accepted during Java files generation

Exception is thrown if the string value is quoted with single quotation mark, please see error stack below.

[error] (run-main-0) com.meituan.firefly.ParseException: [42.32] failure: `{' expected but `'' found
[error] 
[error]     3: optional string sound = 'default';
[error] 
[error]                                ^
com.meituan.firefly.ParseException: [42.32] failure: `{' expected but `'' found

    3: optional string sound = 'default';

                               ^
    at com.meituan.firefly.ThriftParser.parseFile(ThriftParser.scala:240)
    at com.meituan.firefly.Compiler$$anonfun$run$1.apply(Compiler.scala:20)
    at com.meituan.firefly.Compiler$$anonfun$run$1.apply(Compiler.scala:19)
    at scala.collection.immutable.List.foreach(List.scala:381)
    at com.meituan.firefly.Compiler.run(Compiler.scala:18)
    at com.meituan.firefly.Main$$anonfun$main$1.apply(Main.scala:13)
    at com.meituan.firefly.Main$$anonfun$main$1.apply(Main.scala:13)
    at scala.Option.foreach(Option.scala:257)
    at com.meituan.firefly.Main$.main(Main.scala:13)
    at com.meituan.firefly.Main.main(Main.scala)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)

And the Java file generation will be successful if we use double quotation mark
i.e., 3: optional string sound = "default";

If enum value is > 1k, comma is added in the integer in the generated Java file

An enum defined in the thrift file

enum EventAction {
    // UI events
    BUTTON_PRESS = 10001
   ...

will be translated in generated Java file as below

public enum EventAction {
 BUTTON_PRESS(10,001),...
    private final static Map<Integer, EventAction> map = new HashMap<Integer, EventAction>();
    static {
        map.put(10,001, BUTTON_PRESS);
        ...

where Integer value in 10,001 format will result in compilation error.

Cannot find com.meituan.firefly:generator_2.11:0.2.1 when integrating with gradle

Hi there,

I have added classpath 'com.meituan.firefly:gradle-plugin:0.2.2' in my build.gradle and getting the error below.

Error:Could not find com.meituan.firefly:generator_2.11:0.2.1.
Searched in the following locations:
    file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/meituan/firefly/generator_2.11/0.2.1/generator_2.11-0.2.1.pom
    file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/meituan/firefly/generator_2.11/0.2.1/generator_2.11-0.2.1.jar
    https://repo1.maven.org/maven2/com/meituan/firefly/generator_2.11/0.2.1/generator_2.11-0.2.1.pom
    https://repo1.maven.org/maven2/com/meituan/firefly/generator_2.11/0.2.1/generator_2.11-0.2.1.jar
    https://jcenter.bintray.com/com/meituan/firefly/generator_2.11/0.2.1/generator_2.11-0.2.1.pom
    https://jcenter.bintray.com/com/meituan/firefly/generator_2.11/0.2.1/generator_2.11-0.2.1.jar

Required by:
    paktorandroid.libraries:lib-paktor-common:unspecified > com.meituan.firefly:gradle-plugin:0.2.2

I also found that the directory inhttps://repo.jfrog.org/artifactory/libs-release-bintray/com/meituan/ is empty, can you please check your jcenter repository? thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.