Bug 539656 - 4.10 I build introduces: The type org.eclipse.swt.graphics.Image cannot be resolved.
Summary: 4.10 I build introduces: The type org.eclipse.swt.graphics.Image cannot be re...
Status: REOPENED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.9   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 539657
  Show dependency tree
 
Reported: 2018-09-30 05:30 EDT by Ed Willink CLA
Modified: 2020-12-10 13:52 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2018-09-30 05:30:22 EDT
On Windows 10, 64 bit, switching the Eclipse QVTo Tycho build backwards and forwards between 

http://download.eclipse.org/eclipse/updates/4.9/R-4.9-201809060745/
http://download.eclipse.org/eclipse/updates/4.10-I-builds/I20180929-1800/

causes the 

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:1.2.0:compile (default-compile) on project org.eclipse.m2m.qvt.oml.emf.util.ui: Compilation failure: Compilation failure: 
[ERROR] E:\GIT\org.eclipse.qvto\plugins\org.eclipse.m2m.qvt.oml.emf.util.ui\src\org\eclipse\m2m\internal\qvt\oml\emf\util\ui\EmfUtilUiImages.java:[1] 
[ERROR] 	/*******************************************************************************
[ERROR] 	^
[ERROR] The type org.eclipse.swt.graphics.Image cannot be resolved. It is indirectly referenced from required .class files
[ERROR] E:\GIT\org.eclipse.qvto\plugins\org.eclipse.m2m.qvt.oml.emf.util.ui\src\org\eclipse\m2m\internal\qvt\oml\emf\util\ui\EmfUtilUiImages.java:[15] 
[ERROR] 	import org.eclipse.swt.graphics.Image;
[ERROR] 	       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...

to come and go.

Building interactively on an I20180929-1800 installation does not reproduce the problem.

?? Has the retraction of win32 support confused the Tycho 1.2.0 classpath ??
Comment 1 Ed Willink CLA 2018-10-05 08:59:51 EDT
Adding the usual .class not visible workaround makes no difference.

Import-Package: org.eclipse.swt.graphics,
 org.eclipse.swt.layout

Adding to the Tycho target platform:

    <unit id="org.eclipse.swt.win32.win32.x86_64" version="0.0.0"/>

gives: 

[ERROR] Cannot resolve target definition:
[ERROR]   Problems resolving provisioning plan.:
[ERROR]      org.eclipse.swt.win32.win32.x86_64 3.108.100.v20181004-1733 cannot be installed in this environment because its filter is not applicable.

which seems potentially significant but not anything that I understand.

Naively I suspect that lazy Windows coders have always tested "win32" and it is only now that "win32" has vanished that latent bugs have become serious.
Comment 2 Ed Willink CLA 2018-10-05 09:02:03 EDT
Raising to critical (almost blocker) since building on 4.10 is not possible.
Comment 3 Ed Willink CLA 2018-10-06 04:24:59 EDT
Back to normal. Very simple workaround/fix found.

My target definition file contains the longstanding environments declarations

          <environments>
            <environment>
              <os>win32</os>
              <ws>win32</ws>
              <arch>x86</arch>
            </environment>
            <environment>
              <os>win32</os>
              <ws>win32</ws>
              <arch>x86_64</arch>
            </environment>
            ...
          </environments>

If I remove the no longer supported win32 x64 the Tycho compilations succeed as before.

Clearly claiming that my build works on win32 x64 is actually wrong and so removing the claim is a fix. However surely something should have told me that that one of platforms lacked a required fragment?

?? Move to Tycho ??
Comment 4 Christoph Laeubrich CLA 2018-12-13 02:29:39 EST
Thats the problem with the fragment approach, that from an OSGi point of view the fragment is optional, but from SWT point of view its mandatory.
Comment 5 Ed Willink CLA 2018-12-13 04:05:23 EST
(In reply to Christoph Läubrich from comment #4)
> Thats the problem with the fragment approach, that from an OSGi point of
> view the fragment is optional, but from SWT point of view its mandatory.

Surely not? A fragment might be blamed for a failure to provide something that should be available. This bug is a side effect of a failure to find an unnecessary irrelevant declaration causing a real failure in a healthy context.
Comment 6 Ed Willink CLA 2018-12-13 12:05:05 EST
(In reply to Ed Willink from comment #3)
> If I remove the no longer supported win32 x64 the Tycho compilations succeed
> as before.

Correction. Remove win32 x86. Keep win32 x86_64.
Comment 7 Eclipse Genie CLA 2020-12-10 09:05:40 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 8 Ed Willink CLA 2020-12-10 11:33:31 EST
Comment #4 accepts that there is a problem. No furether comment therefore not CLOSED WONTFIX.
Comment 9 Christoph Laeubrich CLA 2020-12-10 11:39:56 EST
@Ed the problem is that recent Eclipse/SWT do no longer support x86 (neither on Windows nor on linux/mac) anymore, so the build failure you see here is cause by requesting an invalid platform that cannot be resolved.

So as long as you won't suggest to put back x86 support into SWT I fear there is nothing much SWT (or tycho) could do here...
Comment 10 Ed Willink CLA 2020-12-10 13:43:29 EST
I'm certainly not suggesting resurrecting x86. I would just like to see a better diagnostic.

It seems to me a warning that x86 is unknown would do.

As it is or rather was, I spent considerable amount of time debugging an obscure corollary that 'diagnosed' the need to delete a gratuitous legacy architecture.
Comment 11 Christoph Laeubrich CLA 2020-12-10 13:52:25 EST
If I remember right this was some similar in Bug 361901 the problem is that there is no standard way for a bundle to reacquire at least one fragment so it might not be possible to give better diagnostics.