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
Motivation
When we write to a config file, we try and respect the original contents. One thing is to try not to duplicate config. But how do we determine what is duplicated? We could use the name as an ID, but what if the name is changed and the content is identical? We could use the content as an ID but what if the name is the same, and the content is tweaked (much more likely).
We could do a fuzzy approach based on string similarity but that seems way too complex for the user to get predictable behaviour. On the other hand, it might make for better DX, and the behaviour could be controlled with a flag.
This is related to the use of placeholders - placeholders get automatically removed once we have real content, but there's a chance that the user tweaks the placeholder - in such a case we don't necessarily just want to remove it.
The approach we take has some architectural effects because if we're using name as an ID in dicts that's one thing - once we start using content as an ID that's another.
For now, we're just using name as an ID.
Note that generally multiple shared names is invalid (well suited as an ID) but usually multiple named items can share identical contents (so not necessarily well suited as an ID).
Summary of desired enhancement
Get a clear design approach and document it.
The text was updated successfully, but these errors were encountered:
Motivation
When we write to a config file, we try and respect the original contents. One thing is to try not to duplicate config. But how do we determine what is duplicated? We could use the name as an ID, but what if the name is changed and the content is identical? We could use the content as an ID but what if the name is the same, and the content is tweaked (much more likely).
We could do a fuzzy approach based on string similarity but that seems way too complex for the user to get predictable behaviour. On the other hand, it might make for better DX, and the behaviour could be controlled with a flag.
This is related to the use of placeholders - placeholders get automatically removed once we have real content, but there's a chance that the user tweaks the placeholder - in such a case we don't necessarily just want to remove it.
The approach we take has some architectural effects because if we're using name as an ID in dicts that's one thing - once we start using content as an ID that's another.
For now, we're just using name as an ID.
Note that generally multiple shared names is invalid (well suited as an ID) but usually multiple named items can share identical contents (so not necessarily well suited as an ID).
Summary of desired enhancement
Get a clear design approach and document it.
The text was updated successfully, but these errors were encountered: