-
Notifications
You must be signed in to change notification settings - Fork 139
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
[Build] Enable API checks in CI builds #1011
[Build] Enable API checks in CI builds #1011
Conversation
eeb0d7a
to
795b4d4
Compare
I have not investigated it in detail but maybe API checking fragments of other platforms fails because the fragments don't resolve in that case. But because in general all native fragments can have their Java code compiled on a platform (I can confirm this at least for Windows), it could work to API check all fragments on Jenkins only. But this probably requires adjustments in Tycho/PDE and it is of course the question if this special case is worth it. |
Yes. This would be enough for now. |
5f792ba
to
5de57cb
Compare
Looks like we have the first API error catched:
But when looking at git-blame it says that
Fortunately the I have also tried to enable the api-validation for all platforms at the same time, by setting the os/ws/arch properties of the target-platform-configuration accordingly but this seem not to help. |
API tools does not know anything about target platform, only dependencies of the project and the baseline is resolved by Tycho and then passed to API-Tools, you can enable the debugging to see more details. |
Awesome, thanks @laeubi.
@Phillipus I assume you don't see this kind of API error locally in the workspace on your Mac? |
I see it on Mac since, I think, pulling #1008. I assumed it to be a local/temporary problem, but did not have time to investigate further yet. |
1733793
to
1a6ef25
Compare
Thanks for checking this. |
The Nullpointer exception is fixed here:
What do you mean by "vanish"? The IBuild uses ant and only compares the jars (maybe even ignoring swt in some way or handling it special), so this is "easier" but at the expense of not handling it necessarily the same as in the IDE. Tycho executes API tools (mostly) as in the IDE so there you should see equal messages between IDE+Build. |
1a6ef25
to
cca65ca
Compare
cca65ca
to
f5c9fb5
Compare
@HeikoKlare or @Phillipus could you please be so kind and post the content of the .api_filters file after you have asked APITools to add a filter on that error? It looks like the one I captured does not work. |
I get this
|
API filters are not correctly evaluated in the build if you use linked resources as mentioned here I'll try to take a look but can't make a promise as the topic is rather complex to solve in general as it is very generic and support man indirection e.g. variables that probably can not be evaluated like done in a full ide... |
Thanks Heiko, that looks different to mine. I'll try it this evening.
Thank you for your help. |
Exactly the same here on Mac. |
@HannesWell : 4.31 is almost released, we are in 4.32 development cycle already. |
I know. I was just hoping that an update of the RC or a patch release was not yet completely off the table (although I haven't checked if this would have too far consequences due to version locking in features). But with all your work in PDE and Tycho we are probably already prepared to handle this (for API tools users) big problem. Thank you already for this, I just didn't catch up on all of it (had an 8h flight and are waiting for the train to finally get home). |
4c3a780
to
3255c85
Compare
API checks are fine now. Anything else missing in this PR? |
I think existing API warnings should be suppressed (if we not plan to fix them), maybe wee need some more |
This also looks strange:
Lines 19 to 31 in d06d1a1
maybe we should simply delete the interface, J2ME platforms are likely not a target anymore for SWT? |
3255c85
to
34ee159
Compare
I haven't checked all warnings, but as far as I can tell they are all about extending the
Either that or make it part of SWT's API or suppress all warnings (which would be a bit tedious since we would have to do it for all fragments) or just accept they exists. |
Can we please first fix one issue (no API checks) and once we are confident it works, continue with any refactoring we might want in SWT (like removing SWTEventListener or whatever else)? |
If we want to keep this interface, we should suppress them, that's one time work (with maybe can be copied a lot) but keeping them will just let us start bad... If we start clean you can even set the option failOnWarnings so we can ensure no new API problems are introduced (I did this for PDE already). |
So then people can complain that they get "unrelated" warnings? |
34ee159
to
e9c98f9
Compare
If we want to keep it yes the warnings should be suppressed, but I agree with with Andrey that we can keep this for a follow-up/separate PR and focus here on enabling the API-tools per se. |
J2ME is dead and I tried to clean up in the past c66026a but obviously there are more leftovers. https://bugs.eclipse.org/bugs/show_bug.cgi?id=483638 has more content. |
Created #1101 to inline it. Please have a look. |
e9c98f9
to
b22f164
Compare
b22f164
to
51a079e
Compare
With #1101 we are down to one API error. |
No. |
Fixes #1003