New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 729906 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug

Blocked on:
issue 746559

Blocking:
issue 518942
issue 729895


Show other hotlists

Hotlists containing this issue:
web-bluetooth


Sign in to add a comment

[HighSierra] Build device/bluetooth with the 10.13 SDK

Project Member Reported by tapted@chromium.org, Jun 6 2017

Issue description

OS Version: OS X 10.13.0 (use XCode 9 Beta)

-c ../../device/bluetooth/bluetooth_adapter_mac.mm -o obj/device/bluetooth/bluetooth/bluetooth_adapter_mac.o
../../device/bluetooth/bluetooth_adapter_mac.mm:157:69: error: comparison of two values with different enumeration types ('CBManagerState' and 'CBCentralManagerState') [-Werror,-Wenum-compare]
    is_present = is_present || ([low_energy_central_manager_ state] !=
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
../../device/bluetooth/bluetooth_adapter_mac.mm:166:69: error: comparison of two values with different enumeration types ('CBManagerState' and 'CBCentralManagerState') [-Werror,-Wenum-compare]
    is_powered = is_powered || ([low_energy_central_manager_ state] ==
                                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
../../device/bluetooth/bluetooth_adapter_mac.mm:601:43: error: comparison of two values with different enumeration types ('CBManagerState' and 'CBCentralManagerState') [-Werror,-Wenum-compare]
  if ([low_energy_central_manager_ state] < CBCentralManagerStatePoweredOn) {
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 errors generated.


-c ../../device/bluetooth/bluetooth_low_energy_device_mac.mm -o obj/device/bluetooth/bluetooth/bluetooth_low_energy_device_mac.o
../../device/bluetooth/bluetooth_low_energy_device_mac.mm:386:30: error: 'identifier' is only available on macOS 10_13 or newer [-Werror,-Wunguarded-availability]
  NSUUID* uuid = [peripheral identifier];
                             ^~~~~~~~~~~
../../../../../../../../Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk/System/Library/Frameworks/CoreBluetooth.framework/Headers/CBPeer.h:24:40: note: 'identifier' has been explicitly marked partial here
@property(readonly, nonatomic) NSUUID *identifier NS_AVAILABLE(10_13, 7_0);
                                       ^
../../device/bluetooth/bluetooth_low_energy_device_mac.mm:386:30: note: enclose 'identifier' in an @available check to silence this warning
  NSUUID* uuid = [peripheral identifier];
                             ^~~~~~~~~~~
1 error generated.


-c ../../device/bluetooth/bluetooth_low_energy_discovery_manager_mac.mm -o obj/device/bluetooth/bluetooth/bluetooth_low_energy_discovery_manager_mac.o
../../device/bluetooth/bluetooth_low_energy_discovery_manager_mac.mm:49:32: error: comparison of two values with different enumeration types ('CBManagerState' and 'CBCentralManagerState') [-Werror,-Wenum-compare]
  if ([central_manager_ state] != CBCentralManagerStatePoweredOn) {
      ~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

 
Blocking: 518942
Cc: jlebel@chromium.org
Components: -OS>Systems>Bluetooth IO>Bluetooth
Status: Available (was: Untriaged)
jlebel: Feel free to assign to yourself if you can take a look at this.
Owner: tapted@chromium.org
Status: Assigned (was: Available)
It doesn't look like any logic needs to change. I've got a likely fix for this in https://codereview.chromium.org/2924753002
Thanks. Could you run device_unittests locally? Our tests don't run on CQ :/

Comment 4 by sdy@chromium.org, Jun 6 2017

Cc: thakis@chromium.org sdy@chromium.org
The platforms SoTU yesterday (https://developer.apple.com/videos/play/wwdc2017/102/ @14:30) showed `if (@available…)` working. thakis@, does that mean it's available for us to use?
I tried out if (@available(..))  -- well, actually if (__builtin_available(..)) which also works in .cc files -- in https://codereview.chromium.org/2924743002/ and hit a link error on __isOSVersionAtLeast(..). See also  http://crbug.com/729896#c4 

For the fixes needed for the bluetooth stuff, in https://codereview.chromium.org/2924753002, I don't think if(@available(..)) will work anyway though. The errors aren't partial availability warnings.

for the 'identifier' error, the problem is actually that the property moved from a child class to a new parent class, and it is marked partially available on the parent. So, for the particular child class, it is always available at runtime.
Project Member

Comment 6 by bugdroid1@chromium.org, Jun 8 2017

Status: Fixed (was: Assigned)

Comment 8 by mark@chromium.org, Jul 19 2017

Blockedon: 746559

Comment 9 by mark@chromium.org, Jul 19 2017

-Wunguarded-availability-new rendered the checked-in solution broken with the 10.13 SDK. See  bug 746559 .

Sign in to add a comment