Skip to content
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

Switch to macOS sdk version 11 #473

Closed
Phillipus opened this issue Jan 10, 2024 · 10 comments · Fixed by #474
Closed

Switch to macOS sdk version 11 #473

Phillipus opened this issue Jan 10, 2024 · 10 comments · Fixed by #474
Assignees

Comments

@Phillipus
Copy link

See discussion here eclipse-platform/eclipse.platform.swt#771 and comments from @sravanlakkimsetti concerning switching.

Is it as simple as re-instating the following commit?

0dad463

@Phillipus
Copy link
Author

@sravanlakkimsetti Thank-you. I will test the next I-Build.

@sravanlakkimsetti
Copy link
Member

The launcher has been rebuilt and committed to equinox.binaries via eclipse-equinox/equinox.binaries@87fa483

@Phillipus
Copy link
Author

The launcher has been rebuilt and committed to equinox.binaries via eclipse-equinox/equinox.binaries@87fa483

I downloaded the eclipse and eclipse_11803.so binaries and ran the command otool -l <filename> on them. The SDK reported is 13.0:

Load command 8
      cmd LC_BUILD_VERSION
  cmdsize 32
 platform 1
    minos 11.0
      sdk 13.0

Does that mean they will only work on a minimum of macOS 13 (Ventura)?

@Phillipus
Copy link
Author

Phillipus commented Jan 11, 2024

Testing with latest launcher binary and with latest java 17 with child Eclipse and RCP app I see a problem in Trees with clipping of text:

Screenshot 2024-01-11 at 15 40 20

I seem to remember a clipping problem like this before and a workaround was applied.

Note that the screenshot shows Eclipse running without the -Dorg.eclipse.swt.internal.carbon.smallFonts argument.

@Phillipus
Copy link
Author

This was originally patched here:

eclipse-platform/eclipse.platform.swt@0e67434

Changing the line by removing && !OS.IS_X86_64 fixes it:

if (OS.isBigSurOrLater()) width += Tree.TEXT_GAP;

But I'm not sure how this will affect users not on latest Java.

@Phillipus
Copy link
Author

What concerns me is places in the code that call OS.IS_X86_64 such as the line above and elsewhere. There are places in SWT code that assume that a difference is caused by OS architecture but in fact may be caused by SDK version. For example in OS class:

public static final int NSTextAlignmentCenter = IS_X86_64 ? 2 : 1;
public static final int NSTextAlignmentRight = IS_X86_64 ? 1 : 2;

Phillipus added a commit to Phillipus/eclipse.platform.swt that referenced this issue Jan 11, 2024
Now that the Mac x86_64 launcher and the latest versions of Mac x86_64 Java are built using a later SDK we see text truncated in Tree widgets as we did in Mac aarch64.

The fix is to remove the check and apply the extra gap for both x86_64 and aarch64.

See eclipse-equinox/equinox#473
@Phillipus
Copy link
Author

I opened PR eclipse-platform/eclipse.platform.swt#969 for the text clipping bug.

@Phillipus
Copy link
Author

@sravanlakkimsetti I'm confused. It seems that the launcher for Eclipse 4.30 macOS x86_64 is already built using the later SDK.

Here's the result of vtool -show Eclipse.app/Contents/MacOS/eclipse for Eclipse 4.30:

Load command 9
      cmd LC_VERSION_MIN_MACOSX
  cmdsize 16
  version 10.10
      sdk 13.0
Load command 10
      cmd LC_SOURCE_VERSION
  cmdsize 16
  version 0.0

And for Eclipse 4.29:

Load command 9
      cmd LC_VERSION_MIN_MACOSX
  cmdsize 16
  version 10.10
      sdk 10.14
Load command 10
      cmd LC_SOURCE_VERSION
  cmdsize 16
  version 0.0

@sravanlakkimsetti
Copy link
Member

I moved min version to 11 now. Lets give it a try

@Phillipus
Copy link
Author

I moved min version to 11 now. Lets give it a try

Yes, I see that. But it seems that the x86_64 launcher has been built with SDK 13 already for some time (at least since Eclipse 4.30). So the original issue is not necessary.

Phillipus added a commit to Phillipus/eclipse.platform.swt that referenced this issue Jan 17, 2024
Now that the Mac x86_64 launcher and the latest versions of Mac x86_64 Java are built using a later SDK we see text truncated in Tree widgets as we did in Mac aarch64.

The fix is to remove the check and apply the extra gap for both x86_64 and aarch64.

See eclipse-equinox/equinox#473
Phillipus added a commit to Phillipus/eclipse.platform.swt that referenced this issue Jan 18, 2024
Now that the Mac x86_64 launcher and the latest versions of Mac x86_64 Java are built using a later SDK we see text truncated in Tree widgets as we did in Mac aarch64.

The fix is to remove the check and apply the extra gap for both x86_64 and aarch64.

See eclipse-equinox/equinox#473
Phillipus added a commit to eclipse-platform/eclipse.platform.swt that referenced this issue Jan 18, 2024
Now that the Mac x86_64 launcher and the latest versions of Mac x86_64 Java are built using a later SDK we see text truncated in Tree widgets as we did in Mac aarch64.

The fix is to remove the check and apply the extra gap for both x86_64 and aarch64.

See eclipse-equinox/equinox#473
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 a pull request may close this issue.

2 participants