-
Notifications
You must be signed in to change notification settings - Fork 826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move to using YAML for project layers file #711
Comments
See also my (naive) request at mapbox/carto#336. |
So, mapbox-studio has been released, which has saner MML files, but I see three big issues
|
In a way, switching to hstore also depends on this. The switch will involve significant query rewriting, and I've been put off from that by the thought of editing that many queries in json. |
Would switching to hstore not be backwards compatible if we keep the same columns in the style file? |
I thought I wrote something on this, but I guess not. Simply adding hstore is backwards compatible, but is a performance loss. We can regain that by changing queries and dropping columns. It is possible to do this incrementally - but that's a separate issue. |
I did some investigation
Of course, converting is likely to be the diff from hell. |
The situation with our SQL queries has become a nightmare for handling pull requests. In the .mml file, the entire query needs to be on one line, and some of these are becoming thousands of characters long (the current longest clocks in at 2533 characters - or over 30 lines if we were doing 80 chars per line). Recent work suggests the queries could become even longer.
Due to their length, any pull request that changes the SQL - even just to add a since value to an existing list - is both hard to review, and also pull requests will frequently become unmergeable since any change to the query will cause a merge conflict.
Of course, this limitation of using json files is well known, which is why tm2 uses yaml files instead. An example of a multiline query can be seen here. I can say from personal experience it's much more pleasant to edit, and given the number of contributors + pull requests for this project, it's becoming urgent.
However, I don't want to change this project to become incompatible with tilemill or to require a custom fork or whatnot. So as far as I see the options are:
I don't know enough about how the tilemill plugins work, but that will be the first thing to investigate.
The text was updated successfully, but these errors were encountered: