Follow up for #1935022-16: Add a language selector on views and #44
Part of #1938580: [META] Make active config save format match the default yml file (order and quotes)
Problem/Motivation
The order in the yml file in the sites/default active config is different than the default core yml
Proposed resolution
Make the default yml use the same order as what saves the active config.
(Or make the active config save use the same order as the default, ... some order that makes sense and is repeatable, so that a diff is really a diff and not an artifact of save using a different format.)
Also, make other things the same (like use or not use of quotes).
Remaining tasks
(novice) get steps to reproduce from the original issue and copy/update them here.
User interface changes
No UI changes.
API changes
No API changes anticipated.
Comment | File | Size | Author |
---|---|---|---|
#8 | 1938570-8.patch | 18.36 KB | damiankloip |
#8 | interdiff.txt | 2.66 KB | damiankloip |
#5 | drupal-1938570.patch | 18.36 KB | derEremit |
Comments
Comment #1
Gábor HojtsyMarking as bug because diffs in config will not be honest with the keys moving around I think.
Comment #2
YesCT CreditAttribution: YesCT commentedcreated #1938580: [META] Make active config save format match the default yml file (order and quotes) to track other config files with differing formats.
Comment #3
dawehnerSo basically the reason for that are the following two problems:
So the task a novice can do is to basically save all those views, and copy the stored yml file back to the modules folder.
Comment #4
derEremit CreditAttribution: derEremit commentedComment #5
derEremit CreditAttribution: derEremit commentedsaved, compared diff to see that no actual values have changed.
I also deleted UUID from exported file, as that made no sense to me to be included ???
Comment #6
gddComment #8
damiankloip CreditAttribution: damiankloip commentedLooks good, we just don't want all of them turned on by default.
Comment #9
Gábor HojtsyLooks good to me.
Comment #10
dawehner+1
Comment #11
webchickSo we're un-quoting strings, quoting ints, and casting booleans to ints even though YAML supports boolean values?
Go home Symfony, you're drunk. :(
We should really open up a follow-up issue (if it doesn't already exist) to pursue a YAML parser that doesn't screw up our values this badly, and/or fix Symfony's parser upstream.
In the meantime, this is needed for sensical diffs, so...
Committed to 8.x. I'll push once testbot has caught up a bit.
Comment #12
vijaycs85Un-quoting single word string is something yml does but we have code style standard to have quotes for all label/string that can get space
Comment #13
YesCT CreditAttribution: YesCT commentedrelated/follow-up for quoting ints #1945246: Can Symfony .yml exporter export integer/boolean values *without* quotes in configuration files?
Comment #14
damiankloip CreditAttribution: damiankloip commentedNot sure aboutbthat follow up, Isn't this something that our configuration system is enforcing and not the yaml component?
Comment #15
YesCT CreditAttribution: YesCT commentedI think that is what will be sorted out in that issue.
If it is possible, that issue might turn into "fix config save so that int dont have quotes, or fix config save to know about types" or something like that.
Comment #16
sunThanks for improving those default config files!
Please note though:
All of these default config file synchronizations are cosmetic clean-ups only and do not have a technical impact.
I don't know who started this effort and for which reason, but whatever the reason is, I'd recommend to forget about it.
Comment #17
Gábor HojtsyThanks @sun! The idea is/was, that when updates are made to these files in later commits, it is very well possible that people will take their Drupal generated config and submit in the patch. If we have inconsistently written shipped config all the time, then reviewing those pathces will be a headache. Think if your IDE would reorder methods/functions in whatever PHP code file you open based on some logic :) Would not it be better to aggree on one logic for contributor sanity in that case?
Comment #18
YesCT CreditAttribution: YesCT commented@sun I guess I started it
I agree it's not something not of the highest priority. But I think if we dont make it match it will be confusing. (It did confuse me while reviewing the schema issues.)
It is also a nice place for people to dip their toes in the water, to get used to the idea that there is config, etc.
[edit: added:]
It also has let us find things that we actually do want to fix.
Comment #19
sunSure, OK, as long as the intention and ultimate purpose is truly limited to "diff/patch CX and contributor sanity", this is completely fine.
What I want and need to prevent is that anyone may take this effort further than that. For example, it is only a very small mind-step from this to the idea of comparing your active config against your default config. That will not work.
Comment #20.0
(not verified) CreditAttribution: commentedadded link to meta