We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
public class PageAnnotationProcessor extends BaseProcessor { @Override public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment env) { .... for (Element element : env.getElementsAnnotatedWith(RouterPage.class)) { } }
这段apt生成文件的逻辑中,env.getElementsAnnotatedWith(RouterPage.class)返回的set不能保证有序,而文件名中的md5是遍历的第一个元素生成的。
相同或微调的代码,在两次编译中,router生成的相关类可能差异较大,再做一些增量工作(例如Tinker 补丁包)时,会导致差异偏大。
目前做了一个简单的排序
public static Set<? extends Element> sort(Set<? extends Element> set) { TreeSet treeSet = new TreeSet<>(new Comparator<Element>() { @Override public int compare(Element o1, Element o2) { return o1.toString().compareTo(o2.toString()); } }); treeSet.addAll(set); return treeSet; }
auto组件中warning也有提到https://github.com/google/auto/blob/master/value/userguide/index.md#warnings
The text was updated successfully, but these errors were encountered:
No branches or pull requests
这段apt生成文件的逻辑中,env.getElementsAnnotatedWith(RouterPage.class)返回的set不能保证有序,而文件名中的md5是遍历的第一个元素生成的。
相同或微调的代码,在两次编译中,router生成的相关类可能差异较大,再做一些增量工作(例如Tinker 补丁包)时,会导致差异偏大。
目前做了一个简单的排序
The text was updated successfully, but these errors were encountered: