Community
Participate
Working Groups
Copy paste of the original question from https://dev.eclipse.org/mhonarc/lists/platform-swt-dev/msg08035.html It seems that the bridge support files for the Cocoa port are quite outdated. From https://www.eclipse.org/eclipse/development/plans/eclipse_project_plan_4_7.xml#target_environments, the minimum version of supported macOS is 10.11, but there lack some classes/protocols/... from the bridge support files for this version. I tried to copy and override the bridgesupport from my own system: cp /System/Library/Frameworks/AppKit.framework/Resources/BridgeSupport/AppKit.bridgesupport \ path/to/git/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse\ SWT\ PI/cocoa/org/eclipse/swt/internal/cocoa/FoundationFull.bridgesupport and it works well (at least, missing classes/protocols/.../ show up correctly in the Mac Gen view), but when I try to generate again, it fails with NPE: java.lang.NullPointerException at org.eclipse.swt.tools.internal.MacGenerator.getCType(MacGenerator.java:1450) at org.eclipse.swt.tools.internal.MacGenerator.generateCustomCallbacks(MacGenerator.java:1509) at org.eclipse.swt.tools.internal.MacGenerator.generateMainClass(MacGenerator.java:790) at org.eclipse.swt.tools.internal.MacGenerator.generate(MacGenerator.java:191) at org.eclipse.swt.tools.internal.MacGeneratorUI.generate(MacGeneratorUI.java:320) at org.eclipse.swt.tools.views.MacGeneratorView$GenJob.run(MacGeneratorView.java:40) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) It actually fails logically, as a comparison between the current HEAD and my own bridgesupport file shows that declared_type is not specified in my system files. ---- Fixing this bug should also be the occasion to document how to update the bridge support file ;)
When you do that, can please make sure that the binding for NSView scrollRect:by: is included? https://developer.apple.com/reference/appkit/nsview/1483497-scrollrect?language=objc I think this will be useful to replace NSCopyBits, which is deprecated. https://developer.apple.com/reference/appkit/1473630-nscopybits
(In reply to Mikaël Barbero from comment #0) > From > https://www.eclipse.org/eclipse/development/plans/eclipse_project_plan_4_7.xml#target_environments, > the minimum version of supported macOS is 10.11, [..] That's not what the plan says. OS X 10.11 is the reference platform, i.e. the configuration that is most thoroughly tested. The minimal platform for SWT is usually the oldest platform that is practical to be supported by the SWT team, or the oldest that is officially supported by the OS provider. AFAIK, Apple doesn't publish EOL dates for OS X, but from recent security updates, we can assume that at least 10.9 is still "alive". So unless there are technical reasons, we should still aim for 10.9 compatibility.
(In reply to Markus Keller from comment #2) > That's not what the plan says. OS X 10.11 is the reference platform, i.e. > the configuration that is most thoroughly tested. Agreed, I've overlooked the definition. Thanks for the heads-up. > AFAIK, Apple doesn't publish EOL dates for OS > X, but from recent security updates, we can assume that at least 10.9 is > still "alive". So unless there are technical reasons, we should still aim > for 10.9 compatibility. Apple usually releases security updates for current, n-1 and n-2 releases. With the recent release of 10.12 (Sierra), that would make 10.10 (Yosemite) the minimum target. WDYT?
(In reply to Mikaël Barbero from comment #3) > (In reply to Markus Keller from comment #2) > > That's not what the plan says. OS X 10.11 is the reference platform, i.e. > > the configuration that is most thoroughly tested. The tests on Hudson still run on 10.10 though :). See bug 478954. > > AFAIK, Apple doesn't publish EOL dates for OS > > X, but from recent security updates, we can assume that at least 10.9 is > > still "alive". So unless there are technical reasons, we should still aim > > for 10.9 compatibility. > > Apple usually releases security updates for current, n-1 and n-2 releases. > With the recent release of 10.12 (Sierra), that would make 10.10 (Yosemite) > the minimum target. WDYT? +1. I think that some people are staying on 10.9 because of the big UI change in 10.10 but I don't know what that proportion is. If I look at the Steam HW Survey (which might not be representative at all of the Eclipse user base!), 10.9 sits at 6% of macOS users. At least, if 10.9 stays supported in Neon.x, I think it would be reasonable for Oxygen to require 10.10 as minimum.
I was able to fish out the command (gen_bridge_metadata) that was used to generate the current bridge support files on 10.7 but that doesn't seem to work on 10.10, or at least I haven't gotten it to work yet, may be the arguments/flags we're using need to be tweaked a little bit. I'll try once again and provide an update in a day or two...
(In reply to Arun Thondapu from comment #5) > I was able to fish out the command (gen_bridge_metadata) that was used to > generate the current bridge support files on 10.7 but that doesn't seem to > work on 10.10, or at least I haven't gotten it to work yet, may be the > arguments/flags we're using need to be tweaked a little bit. > > I'll try once again and provide an update in a day or two... Where are the sources of the command gen_bridge_metadata?
(In reply to Mikaël Barbero from comment #6) > (In reply to Arun Thondapu from comment #5) > > I was able to fish out the command (gen_bridge_metadata) that was used to > > generate the current bridge support files on 10.7 but that doesn't seem to > > work on 10.10, or at least I haven't gotten it to work yet, may be the > > arguments/flags we're using need to be tweaked a little bit. I seem to get good results with: gen_bridge_metadata -d -F complete --framework AppKit.framework -o AppKitFull.bridgesupport > Where are the sources of the command gen_bridge_metadata? That's an Apple utility that comes with xcode/osx.
(In reply to Gunnar Wagenknecht from comment #7) > (In reply to Mikaël Barbero from comment #6) > > (In reply to Arun Thondapu from comment #5) > > > I was able to fish out the command (gen_bridge_metadata) that was used to > > > generate the current bridge support files on 10.7 but that doesn't seem to > > > work on 10.10, or at least I haven't gotten it to work yet, may be the > > > arguments/flags we're using need to be tweaked a little bit. > > I seem to get good results with: > gen_bridge_metadata -d -F complete --framework AppKit.framework -o > AppKitFull.bridgesupport Terrific, thanks Gunnar! > > > Where are the sources of the command gen_bridge_metadata? > > That's an Apple utility that comes with xcode/osx. Thanks and sorry for the misunderstanding.
Created attachment 264853 [details] gen_bridge_metadata log with tons of errors I digged deeper. While I was able to generate the bridgesupport files. The MacGenerator fails on them with the following stack strace: java.lang.NullPointerException at org.eclipse.swt.tools.internal.MacGenerator.generateFunctions(MacGenerator.java:1900) at org.eclipse.swt.tools.internal.MacGenerator.generateMainClass(MacGenerator.java:815) at org.eclipse.swt.tools.internal.MacGenerator.generate(MacGenerator.java:191) at org.eclipse.swt.tools.internal.MacGeneratorUI.generate(MacGeneratorUI.java:320) at org.eclipse.swt.tools.internal.MacGeneratorUI.lambda$6(MacGeneratorUI.java:315) I've pushed a review to have a more helpful error message. https://git.eclipse.org/r/83205 In this particular case, the function 'NSSearchPathForDirectoriesInDomains' is missing in the new 'FoundationFull.bridgesupport'. It's still in FoundationFull.bridgesupport.extra. That's why the generator wants to generate code for it. The function is actually called. Thus, it is required. It's also not deprecated. Thus, it should be there. I noticed that during generation a ton of errors are thrown. This doesn't seem right. I've attached the log output for people on this bug. Maybe they have an idea.
New Gerrit change created: https://git.eclipse.org/r/83254
New Gerrit change created: https://git.eclipse.org/r/83253
New Gerrit change created: https://git.eclipse.org/r/83255
I was able to make *a lot* more progress. I'm now closer to have MacGenerator generate something that compiles. Currently it does not because of a few new language features in objective c. You can follow the reviews for details. :) Current compile errors still open: - instancetype (this is tricky as we actually need to interpret it) - few more missing types (ObjectType, KeyType) - few missing fields/methods In general, this is progress. There was quite some change in the BridgeSupport files.
I've pushed a backup of my work (for the curious follower) here: https://git.eclipse.org/r/83256
New Gerrit change created: https://git.eclipse.org/r/83290
New Gerrit change created: https://git.eclipse.org/r/83289
New Gerrit change created: https://git.eclipse.org/r/83291
Awesome work Gunnar. See https://dev.eclipse.org/mhonarc/lists/platform-swt-dev/msg07731.html and https://git.eclipse.org/r/#/c/44460/ about the issues I've already raised about XULRunner.
New Gerrit change created: https://git.eclipse.org/r/83419
New Gerrit change created: https://git.eclipse.org/r/83417
Sorry I haven't been able to get to this one yet as I got pulled into a couple of other issues that needed to be looked at this week, will hopefully be able to find some time tomorrow...
Hi Gunnar, I've started reviewing the patches again and should be done by tomorrow but that will be too late for M3, moving to M4, we can plan to merge the patches after M3 is declared later this week.
I'm currently re-installing Yosemite (10.10) to re-generate the bridge files. Stay tuned
New Gerrit change created: https://git.eclipse.org/r/84484
Eventually managed to do it. Here are the bridge files for 10.10 https://git.eclipse.org/r/84484. Did not run any diff with Gunnar's files. May be worth it to see the differences between 10.11 and 10.10.
Gunnar and Mikael, Sorry the reviews got delayed once again as I was on vacation recently, I plan to re-look at the patches tomorrow.
Arun, do you have any feedbacks?
(In reply to Mikaël Barbero from comment #28) > Arun, do you have any feedbacks? Hi Mikael, I had to confirm whether we need a CQ for this contribution because of the usage of the gen_bridge_metadata utility from Mac OS X, and it looks like we don't need one (confirmed with Silenio who had generated the files for the first time with help from Apple engineers). I've started reviewing the patches once again and should have more updates in a day or two. Thanks!
(In reply to Arun Thondapu from comment #29) > I've started reviewing the patches once again and should have more updates > in a day or two. Thanks! Sorry for the delays once again, there were a few other distractions and it took a bit longer time than anticipated to complete the reviews. I have now gone through all the changes in the patches and did some testing, the gerrit patches look good to be merged but unfortunately we're in the code freeze week for M5 and cannot release the changes now. Moving to M6, will merge the changes right after M5 is declared.
Cool. Thanks for the update!
Gerrit change https://git.eclipse.org/r/84484 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=ae2db8a2d30b5f40d5d431ecf8cc1e52b7070b27
I've merged the updated bridge support files from 10.10. I will generate the source changes and merge them tomorrow.
(In reply to Arun Thondapu from comment #33) > I've merged the updated bridge support files from 10.10. I will generate the > source changes and merge them tomorrow. I was going through Gunnar's patches which contain the necessary source and Mac Generator changes but there were minor modifications needed as those patches are based on bridge support files from 10.11 but we need to use the ones from 10.10 for now. I will push the patches with the needed minor tweaks but its again the testing week for M6 and so cannot do it now, moving to M7 for completing the remaining work on this...
Gerrit change https://git.eclipse.org/r/83290 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=7abad2988e2fb5bbd488e0e5198e011b5460a637
Gerrit change https://git.eclipse.org/r/83205 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=da42019cae04188ad5ad5d03615b6c53d6cbb021
Gerrit change https://git.eclipse.org/r/83253 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=8d36d0a7aa4ac7933330b66106efd438c2ebcee9
New Gerrit change created: https://git.eclipse.org/r/93706
Gerrit change https://git.eclipse.org/r/93706 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=010d9d278b66159e1bb8026b19814c336766fc4f
Gerrit change https://git.eclipse.org/r/83291 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=98fb0fa32692eb176a502f67f34e40b05db747e8
Gerrit change https://git.eclipse.org/r/83202 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=659442f8e759f014e1d446ba8b8d01c857874cd6
Gerrit change https://git.eclipse.org/r/83419 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=0390b103c8176ed5c3ef8cfb95cca9582de83f70
Gerrit change https://git.eclipse.org/r/83254 was merged to [master]. Commit: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=70ea713017537c5b5f00e7c46e8e473978a96f58
(In reply to Eclipse Genie from comment #43) > Gerrit change https://git.eclipse.org/r/83254 was merged to [master]. > Commit: > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/ > ?id=70ea713017537c5b5f00e7c46e8e473978a96f58 This patch is not exactly necessary right now as it deals with null annotation information that is present in the bridge support files from macOS 10.11. I merged it nevertheless, as it would help when we do the next round of updates to the bridge support files from 10.10 to 10.11.
I think we can consider this done now with respect to the updates corresponding to macOS 10.10. I'll raise a follow up bug for updating the bridge support files to macOS 10.11 in the 4.8 release.