-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(超级月经贴) Should use AST code refactoring some gf gen
commands.
#3067
Comments
@oldme-git Is it slower using codes AST than text regular expression? Some auto generating feature, for example |
@gqcn AST is slower than Regex after testing. Why |
|
The command |
Please paste the result. |
@gqcn AST is slower than Regex, but the 'gf gen' command scans all files after changing one file. This slows down the file generation process. If we make improvements and opt for AST, we can achieve greater precision and maintain an acceptable generation time. |
文件的监控虽然能监控到修改了一个文件,但是在代码生成的期间可能用户又改了其他文件,这样会造成生成得代码会有遗漏。所以当前工具的代码自动生成,会每次重新遍历目录,并且判断生成的内容和当前目标文件内容是否一致,判断是否覆盖生成。 |
@gqcn 很多 issue 都提到了 gf gen 匹配不精确的问题,已经是月经贴了,所以我关闭了所有此类的问题,统一提到这里讨论。 |
@gqcn Many issues have mentioned the problem of inaccurate gf gen matching, which is already for menstrual patches, so I have closed all such issues and mentioned them here for discussion. |
gf gen
commands.gf gen
commands.
Now, gf-cli uses regex to get file content, but this is not precision.
PR #3066 has finished some.
The text was updated successfully, but these errors were encountered: