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
[APITools] Various minor and local code clean-ups and simplifications #1199
Conversation
1d3d20b
to
f21368d
Compare
ded6e8e
to
1cc0893
Compare
4317c5f
to
4060e6b
Compare
4060e6b
to
dc26614
Compare
/** | ||
* The mapping of filters for this store. | ||
*/ | ||
protected HashMap<String, Set<IApiProblemFilter>> fFilterMap = null; | ||
protected Map<String, Set<IApiProblemFilter>> fFilterMap = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@laeubi it looks like changing the type of this field breaks the tycho-apitools-plugin:verify
verify mojo.
I saw executions that fail with
Caused by: java.lang.NoSuchFieldError: fFilterMap
at org.eclipse.tycho.apitools.ApiAnalysis$3.initializeApiFilters (ApiAnalysis.java:470)
at org.eclipse.pde.api.tools.internal.FilterStore.isFiltered (FilterStore.java:181)
Maybe I understand something wrong, but does Tycho really use internals of API-Tools and at the same time loads the classes from a current I-builds repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #1203 to restore the field of the internal class for now.
But on the long run there should be a more robust solution.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe I understand something wrong, but does Tycho really use internals of API-Tools and at the same time loads the classes from a current I-builds repo?
Tycho loads the api-tools bundles and then runs an embedded framework where it calls the code like a regular bundle, as API Tools have literally no API it must call the (exported) internal API. As it compiles against the latest release there is some chance of incompatibility if one mixes a newer/older API tools Tycho is not build against.
In this case it extends FilterStore
in org.eclipse.tycho.apitools.ApiAnalysis.getApiFilterStore(BundleComponent)
to intercept the loading as otherwhise there is no way to influence where the store loads the file from, you can provide a constructor that allows to supply a file (or path) then we can use that one from the next release on.
No description provided.