Page MenuHome

MacOS: Update Min Requirement to 10.15.
ClosedPublic

Authored by Jeroen Bakker (jbakker) on Jan 9 2023, 9:13 AM.

Details

Summary

A few weeks ago we enabled the Metal back-end for the viewport.
Due to metal, master is only able to build on MacOS 10.15 and above.
The previous minimum requirement is MacOS 10.13.

It was already planned to bump to a higher version for Blender 3.6. After
a short discussion via bf-committers it was decided that it is fine to bump it for
3.5 release.

This patch cleans up the CMake files and update the minimum requirement.

With this patch the next deprecations will be listsed.

  • NSOpenGLView, NSOpenGLContext is deprecated. (replaced by metal)
  • NSStringPboardType is replaced by NSPasteboardTypeString
  • NSTIFFPboardType is replaced by NSPasteboardTypeTIFF
  • NSFilenamesPboardType should be replaved by multiple pasteboard items with NSPasteboardTypeFileURL instead.
  • NSUserNotification should be replaced with UserNotifications.frameworks API

Deprecations will be handled in separate tasks and commits. OpenGL won't be
fixed at this moment, as it will be phased out in the future. NSStringPboardType, NSTiffPboardType & NSFilenamesPboardType
will be provided in a single patch. NSUserNotification will also be provided in
its own patch.

NOTE: After commit the release notes has to be updated.
NOTE: Before release the minimum requirements on blender.org must be updated.

Diff Detail

Repository
rB Blender

Event Timeline

Jeroen Bakker (jbakker) requested review of this revision.Jan 9 2023, 9:13 AM
Jeroen Bakker (jbakker) created this revision.

There is a lot of deprecation warnings introduced with such change. For example,

/Users/sergey/Developer/blender/blender/intern/ghost/intern/GHOST_SystemCocoa.mm:1946:54: warning: 'NSStringPboardType' is deprecated: first deprecated in macOS 10.14 [-Wdeprecated-declarations]
    NSString *textPasted = [pasteBoard stringForType:NSStringPboardType];
                                                     ^~~~~~~~~~~~~~~~~~
                                                     NSPasteboardTypeString

/Users/sergey/Developer/blender/blender/intern/ghost/intern/GHOST_ContextCGL.h:166:10: warning: 'NSOpenGLContext' is deprecated: first deprecated in macOS 10.14 - Please use Metal or MetalKit. [-Wdeprecated-declarations]
  static NSOpenGLContext *s_sharedOpenGLContext;

Some of the code seems just needs adjustment, other code we'll need to use help of clang's pragma diagnostics to force disable deprecation warning as we can not remove OpenGL just yet.

There is no information w.r.t those deprecation warnings in the patch description, so I do not know if it is something that was looked into, planned, or was not considered at all.
Sure it is possible/good to separate commits for actual bump and deprecation cleanup, but those warnings do need to be addressed. There are so many of them that it makes it hard to catch actual issues.

We've always had these warnings on Arm. Good to fix but I don't think it needs to be part of this commit.

They did not happen on Intel platform.

I also would not call it "good to fix" but "they need to be fixed". Also, as I've said in my previous comment: it is indeed good to separate those changes, but there needs to be clarity if it is something already considered/planned, or it is one of those things where I will need to put time for from other projects to cleanup after the patch is landed.

I will have a look at them and add tasks/patches to remove the ones that can be fixed. Will also update the description to mention the deprecation and mitigation of the warnings.

Jeroen Bakker (jbakker) edited the summary of this revision. (Show Details)Jan 9 2023, 12:59 PM

Thanks for the update with the planning.

OpenGL won't be fixed at this moment

Please make it so that it is possible to do clean build and see if some patch introduced new warnings or not. Currently this is not the case on macOS, and it is something recent. Such things are really getting in a way of development.

You can follow the code from GHOST_ContextCGL.mm:

/* Don't generate OpenGL deprecation warning. This is a known thing, and is not something easily
 * solvable in a short term. */
#ifdef __clang__
#  pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
This revision is now accepted and ready to land.Jan 9 2023, 1:53 PM
This revision was automatically updated to reflect the committed changes.