Skip to content

Conversation

@sratz
Copy link
Member

@sratz sratz commented Mar 24, 2025

Also make sure the issues are published even in case of a failed build, as otherwise they are not visualized.

See eclipse-tycho/tycho#4897

@github-actions
Copy link
Contributor

github-actions bot commented Mar 24, 2025

Test Results

   541 files     541 suites   27m 46s ⏱️
 4 364 tests  4 349 ✅  15 💤 0 ❌
16 596 runs  16 486 ✅ 110 💤 0 ❌

Results for commit a464ce4.

♻️ This comment has been updated with latest results.

@sratz sratz force-pushed the apitools branch 3 times, most recently from 969fbaf to 8c02806 Compare March 24, 2025 10:57
Also make sure the issues are published even in case of a failed build,
as otherwise they are not visualized.
@sratz sratz changed the title [DO NOT SUBMIT] Jenkinsfile: Test Tycho 4.0.13 way to display api tools warnings Jenkinsfile: Use Tycho 4.0.13 way to display api tools warnings Mar 24, 2025
@sratz sratz requested review from HannesWell and laeubi March 24, 2025 11:07
@sratz
Copy link
Member Author

sratz commented Mar 24, 2025

See
https://ci.eclipse.org/releng/job/eclipse.platform.swt/job/PR-1932/4/ for a test result.
All the issues are now recorded even if the build failed.

Note: the link to the apitools is kind of broken (the link on the main page is broken as the results are put under to /native instead of /apitools). This is a bug in Jenkins warnings-ng (already fixed): jenkinsci/warnings-ng-plugin#470

Copy link
Contributor

@laeubi laeubi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for looking into this, I think this is good in general and ready to be merged, still there seem some issues in the output itself (that needs fixing at Tycho):

grafik

  1. There is some strange null:0 file assigned to a message
  2. SWT.java seems not correctly linked
  3. One message is duplicated for the Manifest

@sratz
Copy link
Member Author

sratz commented Mar 24, 2025

  • There is some strange null:0 file assigned to a message
  • SWT.java seems not correctly linked
  • One message is duplicated for the Manifest

I think this is because of linked resources in the SWT fragments. The information comes like that from the API Tooling output already.

@laeubi
Copy link
Contributor

laeubi commented Mar 24, 2025

As said this is more something we probably can improve in Tycho, so nothing to block this PR!

@sratz
Copy link
Member Author

sratz commented Mar 24, 2025

As said this is more something we probably can improve in Tycho, so nothing to block this PR!

Yep, at least if line is 0 / file is null, we should not put those in the XML in Tycho.

SWT.java seems not correctly linked

As for linked resources, I am not sure how to handle that. Maybe @HannesWell do you have an idea?

One message is duplicated for the Manifest

It's actually not a duplicate, but two times the same message for two fragments:

[ERROR] [API ERROR] File unknown at line 0: The field org.eclipse.swt.SWT.MOZILLA has been removed (location: unknown)
[ERROR] [API ERROR] File MANIFEST.MF at line 1: The major version should be incremented in version 3.130.0, since API breakage occurred since version 3.129.0 (location: /home/jenkins/agent/workspace/eclipse.platform.swt_PR-1932/eclipse.platform.swt/binaries/org.eclipse.swt.gtk.linux.ppc64le/META-INF/MANIFEST.MF)
[ERROR] [API ERROR] File MANIFEST.MF at line 6: The major version should be incremented in version 3.130.0, since API breakage occurred since version 3.129.0 (location: /home/jenkins/agent/workspace/eclipse.platform.swt_PR-1932/eclipse.platform.swt/binaries/org.eclipse.swt.gtk.linux.x86_64/META-INF/MANIFEST.MF)

@laeubi
Copy link
Contributor

laeubi commented Mar 24, 2025

@sratz by the way feel free to merge as you like, we can improve this later on. Would be great to have the same for other platform repos as well.

@sratz sratz merged commit 3e59697 into eclipse-platform:master Mar 24, 2025
12 of 15 checks passed
@sratz sratz deleted the apitools branch March 24, 2025 12:55
@laeubi
Copy link
Contributor

laeubi commented Mar 24, 2025

As for linked resources, I am not sure how to handle that.

I would try to resolve the real system path somewhere in the analysis step:

https://github.com/eclipse-tycho/tycho/blob/e59ede590b6c666f8b0d3fd4c5b84aa9f9c12ea3/tycho-apitools-plugin/src/main/java/org/eclipse/tycho/apitools/ApiAnalysis.java#L437

we then would need to get this into the ApiAnalysisResult

Maybe even directly in the ApiProblemDTO

@HannesWell
Copy link
Member

SWT.java seems not correctly linked

As for linked resources, I am not sure how to handle that. Maybe @HannesWell do you have an idea?

Sorry I haven't fully read through all linked issues/PR, but what exactly is the problem? That the SWT.java occurs twice or that it occurs at all?

@sratz
Copy link
Member Author

sratz commented Mar 25, 2025

Sorry I haven't fully read through all linked issues/PR, but what exactly is the problem? That the SWT.java occurs twice or that it occurs at all?

No worries, I think I found the problem.

The path returned for the finding is
Eclipse SWT/common/org/eclipse/swt/SWT.java

which needs to be resolved to an absolute path in the context of the eclipse project's root directory:
/jenkins/workspace/.../eclipse.platform.swt/binaries/org.eclipse.swt.win32.win32.x86_64

But to do that it needs to consider linked resources defined in the fragment's .project:

	<linkedResources>
		<link>
			<name>Eclipse SWT</name>
			<type>2</type>
			<locationURI>SWT_HOST_PLUGIN/Eclipse%20SWT</locationURI>
		</link>
		<link>
			<name>Eclipse SWT Tests</name>
			<type>2</type>
			<!-- Once Tycho supports custom variables, SWT_HOST_PLUGIN should be used here: https://github.com/eclipse-tycho/tycho/issues/3820 -->
			<locationURI>PARENT-2-PROJECT_LOC/bundles/org.eclipse.swt/Eclipse%20SWT%20Tests</locationURI>
		</link>
	</linkedResources>
	<variableList>
		<variable>
			<name>SWT_HOST_PLUGIN</name>
			<value>$%7BPARENT-2-PROJECT_LOC%7D/bundles/org.eclipse.swt</value>
		</variable>
	</variableList>

For that we need basic support of user-defined variables: eclipse-tycho/tycho#3820.

I've got a preliminary solution ready and will provide an improvement PR to Tycho which should resolve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants