You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
-[MGLTileSetTests testTileSetFromTileURLTemplates] fails on High Sierra and above #13386
#11391 didn’t completely fix #11289: on macOS 10.14 High Sierra and above, -[MGLTileSetTests testTileSetFromTileURLTemplates] still fails on the following assertion:
Test Suite 'MGLTileSetTests' started at 2018-11-15 18:24:15.215
Test Case '-[MGLTileSetTests testTileSetFromTileURLTemplates]' started.
/path/to/mapbox-gl-native/platform/darwin/test/MGLTileSetTests.mm:95: error: -[MGLTileSetTests testTileSetFromTileURLTemplates] : ((@(tileSet.attribution.c_str())) equal to (html)) failed: ("<font face="Helvetica" size="3" style="font: 12.0px Helvetica"><a href="https://www.mapbox.com/">Mapbox</a> </font><font face="Helvetica" size="3" style="font: 12.0px Helvetica; background-color: #fb0007">GL</font>
") is not equal to ("<font face="Helvetica" size="3" style="font: 12.0px Helvetica"><a href="https://www.mapbox.com/">Mapbox</a> </font><font face="Helvetica" size="3" style="font: 12.0px Helvetica; background-color: #ff0000">GL</font>
")
Test Case '-[MGLTileSetTests testTileSetFromTileURLTemplates]' failed (4.425 seconds).
Test Suite 'MGLTileSetTests' failed at 2018-11-15 18:24:19.642.
The problem is that -[NSAttributedString dataFromRange:documentAttributes:error:] exports HTML that expresses colors in the generic RGB (aka calibrated RGB) color space instead of sRGB, which is a violation of the CSS specification. I’ve opened rdar://problem/46115233 (lionheart/openradar-mirror#20722) to track the issue upstream in the (Apple) macOS SDK. In the meantime, we can work around the issue by expressing the test’s initial color in calibrated RGB:
This test is the only place in the codebase where we generate HTML from an attributed string, so the issue and workaround don’t impact production code. It also doesn’t affect builds on CircleCI, which still runs macOS 10.13 Sierra.
This test is the only place in the codebase where we generate HTML from an attributed string, so the issue and workaround don’t impact production code.
Actually, this issue does affect production code, specifically the use of MGLTileSourceOptionAttributionInfos in -[MGLVectorTileSource initWithIdentifier:tileURLTemplates:options:].
It also doesn’t affect builds on CircleCI, which still runs macOS 10.13 Sierra.
CircleCI builds run on macOS 10.14 High Sierra these days, which accounts for the failures I’m seeing in #13387. So the difference between running locally and on CI must be related to the system color profile or something.
#15432 merely silenced the failure by adding a case for the new result, but we don’t know if there’s more to do to address the issue yet.
The original issue in this PR is related but not the same — it’s the same test, but colors (and not text sizes) changing, and it evidently only happens on macOS.
Activity
1ec5 commentedon Nov 16, 2018
Actually, this issue does affect production code, specifically the use of
MGLTileSourceOptionAttributionInfosin-[MGLVectorTileSource initWithIdentifier:tileURLTemplates:options:].CircleCI builds run on macOS 10.14 High Sierra these days, which accounts for the failures I’m seeing in #13387. So the difference between running locally and on CI must be related to the system color profile or something.
friedbunny commentedon Apr 3, 2019
This is still an issue locally, running macOS 10.14.5b1 and Xcode 10.2.
friedbunny commentedon Aug 20, 2019
Now seeing a similar failure on CircleCI (and here) for iOS jobs with Xcode 11b5:
... it seems the font size has changed from points to pixels. 🤔
zugaldia commentedon Aug 26, 2019
cc: @julianrex for prioritization.
julianrex commentedon Aug 26, 2019
@friedbunny can we close this due to #15432? Or has this now mutated into a change-the-test issue?
friedbunny commentedon Aug 26, 2019
#15432 merely silenced the failure by adding a case for the new result, but we don’t know if there’s more to do to address the issue yet.
The original issue in this PR is related but not the same — it’s the same test, but colors (and not text sizes) changing, and it evidently only happens on macOS.