eclipse-platform / eclipse.platform.swt

Eclipse SWT
https://www.eclipse.org/swt/
Eclipse Public License 2.0
101 stars 123 forks source link

SWT tests for win32 have API errors #1298

Closed merks closed 1 week ago

merks commented 1 week ago

Describe the bug

With the latest commits, there are API errors in my workspace:

image

To Reproduce

A freshly Oomphed workspace with just SWT has the problem too:

image

Expected behavior

Error freee workspace

Screenshots If applicable, add screenshots to help explain your problem.

Environment:

  1. Select the platform(s) on which the behavior is seen:

      • [ ] All OS
      • [x] Windows
      • [ ] Linux
      • [ ] macOS
  2. Additional OS info (e.g. OS version, Linux Desktop, etc)

Windows 10

  1. JRE/JDK version

Version since

Current clone.

Workaround (or) Additional context

Delete errors.

iloveeclipse commented 1 week ago

The main problem is that tests were added to actual SWT production bundle, not to the test bundle! Fix that please and no API comments will be needed.

HeikoKlare commented 1 week ago

The main problem is that tests were added to actual SWT production bundle, not to the test bundle! Fix that please and no API comments will be needed.

For the record: As discussed in #1299 and https://github.com/eclipse-platform/.github/discussions/203, moving these tests to a test bundle is impossible, as they are no integration or system tests (depending on public API only) but actual unit tests, which require access to packages not provided by the bundle or classes that are packaged protected. Thus, they can only be placed in a separate bundle if that bundle is a fragment (or maybe a friend of the to-be-tested packages in the production bundle). Since the to-be-tested code is already placed in a fragment and fragments of fragments are impossible, this test code can only be placed in the production bundle. In my opinion, this can/should be solved by adapting API tooling (as already discussed in #1299, if I see correctly).