Description

When CommandLineTools is set as the default tool, an inaccurate warning message is displayed when opening the Editor that states that Xcode is too old to compile Metal shaders, even if the latest version of Xcode is installed. CommandLineTools does not contain the Metal compiler, so it is unable to compile Metal Shaders. However, the warning message would cause users to look for the wrong solution (eg. upgrading Xcode).

Steps to Reproduce

SETUP:
This requires that CommandLineTools be installed on the Mac. CommandLineTools is included with Xcode, and can be installed by running the command xcode-select --install.

REPRO:

  1. Create a new project.
  2. Open the new project in the Editor.
  3. Note that there is no message displayed about Xcode being too old.
  4. Close the Editor.
  5. Set the CommandLineTools package to be the default tool by running the following command (may require a password): sudo xcode-select -s /Library/Developer/CommandLineTools
    • To verify that the CommandLineTools is the default, you can run the command xcode-select -p
  6. Open the new project in the Editor.

RESULT:
When the project opens, a warning message appears that states Xcode installed on this Mac is too old to be used for Metal shader compilation. Falling back to runtime compiled shaders, which are slower. Please update to latest version of Xcode for best performance.

EXPECTED:
Since the CommandLineTools package does not include the Metal compiler, a warning message is displayed that lets the user know that Xcode needs to be set to be the default tool in order for Metal shaders to be compiled.

WORKAROUND:
If CommandLineTools is currently set to be the default tool, the selection can be reset to use Xcode again by running the following command (may require a password): sudo xcode-select -r

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

5
Login to Vote

Fixed
ComponentTools
Affects Versions4.184.19
Target Fix4.22
Fix Commit4529373
Main Commit4676940
Release Commit4862694
CreatedNov 13, 2017
ResolvedOct 31, 2018
UpdatedFeb 12, 2019
View Jira Issue