walkertest
walkertest
The context Link:https://github.com/antlr/antlr4/issues/3652 ``` Env: antlr 3.5 Run commond: java -jar antlr-3.5-complete.jar TarsParser.g ``` I have tralated the lexer file successfully.: https://github.com/walkertest/TarsJava/blob/feature/antlrfind/tools/tars-maven-plugin/src/main/resources/antlr/TarsLexer.g The parser file was almost found back:https://github.com/walkertest/TarsJava/blob/feature/antlrfind/tools/tars-maven-plugin/src/main/resources/antlr/TafParser.g The...
TarsCodec.decodeCallbackArgs 方法中 ``` public Object[] decodeCallbackArgs(TarsServantResponse response) throws ProtocolException { byte[] data = response.getInputStream().read(new byte[]{}, 6, true); TarsServantRequest request = response.getRequest(); TarsMethodInfo methodInfo = null; Map map = AnalystManager.getInstance().getMethodMap(request.getApi()); for...
当有些地方不设置datapath,比如一些sdk(兼容非tars服务)的时候,tarsnodes.dat的存储路径会比较怪. 例子: ``` URL url = Loader.getResource("", true); String path=url.getFile(); File f = new File(path, Constants.SERVER_NODE_CACHE_FILENAME); String parentPath = f.getParentFile().getPath(); String filePath = f.getAbsolutePath(); log.info("URL_DATA_PATH:{} parentPath:{} filePath:{}", path, parentPath, filePath);...
问题: 1. Unsafe,jdk不建议使用,在高版本中编译会报warning; 2. BeanAccessor 中的实现,为什么还要引入 Unsafe,来get/set属性,Field底层也是用unsafe实现的.
* 设计应该是放在工作线程,去上报 * 当前是额外线程池.
``` module TestTars { enum EGender { MALE = 0, FEMALE = 1 }; struct UserInfo { 0 optional EGender gender = FEMALE; }; } ``` java会把这个值搞成默认值 int 0. 不符合语法定义.
可以从https://github.com/TarsCloud/TarsTools/blob/master/src/main/java/com/tencent/jceplugin/language/jce-grammar.bnf 中的一些语法文件翻译成antlr
1. 是否需要配套的工具或者指引方法,比如文件:https://github.com/TarsCloud/TarsJava/blob/v1.7.x/core/src/main/resources/AdminF.tars 2. 部分协议文件缺失,比如:ServerFPrx
参考之前springboot的项目用法:https://github.com/spring-projects/spring-boot/blob/2.1.x/pom.xml
打包版本建议
``` ClientVersion中的version能否从maven的版本中获取 防止版本忘记修改的问题. ```