Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Restore runtime styling code generation #179

Merged
merged 3 commits into from
Feb 26, 2020
Merged

Restore runtime styling code generation #179

merged 3 commits into from
Feb 26, 2020

Conversation

1ec5
Copy link
Contributor

@1ec5 1ec5 commented Feb 25, 2020

Fixed the darwin-style-code make rule, which synchronizes the iOS and macOS map SDKs’ headers and implementation with the latest style specification.

mapbox/mapbox-gl-native#15177 suppressed three unimplemented properties from the style specification: circle-sort-key, line-sort-key, fill-sort-key. However, it did so in three different places, one per platform. mapbox/mapbox-gl-native#15839 and mapbox/mapbox-gl-native#15875 removed only the override that affects code generation in mbgl, but not the corresponding overrides for Android and iOS/macOS. mapbox/mapbox-gl-native#10937 created scripts/style-spec.js as a central place for these overrides, so this PR moves the overrides back there.

This PR also removes the overrides for line-sort-key and fill-sort-key, which were implemented in mapbox/mapbox-gl-native#15839. Now that the make rule works again, running it adds corresponding properties to the MGLFillStyleLayer and MGLLineStyleLayer classes.

Finally, the “Nitpick Darwin code generation” build step has been reenabled. It fails whenever the style specification changes in a way that would require us to rerun make darwin-style-code.

Depends on #178. Before merging, change the base from 1ec5-macos to master and rebase onto master.

/cc @mapbox/maps-ios @mapbox/gl-core

@1ec5 1ec5 added this to the release-vanillashake milestone Feb 25, 2020
@1ec5 1ec5 requested review from ahk and a team February 25, 2020 08:26
@1ec5 1ec5 self-assigned this Feb 25, 2020
var spec = module.exports = require('../vendor/mapbox-gl-native/mapbox-gl-js/src/style-spec/reference/v8');

// FIXME: https://github.com/mapbox/mapbox-gl-native/issues/15008
delete spec.layout_circle["circle-sort-key"];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally, gl-native would also centralize style specification overrides in scripts/style-spec.js so that this repository could simply require the file from that submodule instead of maintaining a separate copy.

@nishant-karajgikar
Copy link
Contributor

Finally, the “Nitpick Darwin code generation” build step has been reenabled. It fails whenever the style specification changes in a way that would require us to rerun make darwin-style-code.

Awesome.

Updated path to style spec reference following spinoff from gl-native repository. Centralized overrides for not-yet-implemented layout properties. Removed overrides that have already been removed for mbgl in gl-native.
This reverts commit 73295e9d80a2a79869e6c0e38eae62fd358dd476.
@1ec5 1ec5 changed the base branch from 1ec5-macos to master February 26, 2020 20:26
@1ec5 1ec5 merged commit e403a06 into master Feb 26, 2020
@1ec5 1ec5 deleted the 1ec5-style-code branch February 26, 2020 21:12
@1ec5 1ec5 mentioned this pull request Feb 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants