microsoft / terminal

The new Windows Terminal and the original Windows console host, all in the same place!
MIT License
95.89k stars 8.34k forks source link

Feature Request: stable UUIDs for default profiles #870

Closed DHowett-MSFT closed 5 years ago

DHowett-MSFT commented 5 years ago

Summary of the new feature/enhancement

This feature will ensure that the default profiles created by Windows Terminal always have the same GUIDs. This is necessary for us to move to cascading settings (#754), as it will allow the user to override some of the default profiles and for us to re-map their overrides back to the original profile.

Proposed technical implementation details

I propose that we use a version 5 UUID as outlined in RFC 4122, section 4.3: Algorithm for Creating a Name-Based UUID.

Namespace: {2BDE4A90-D05F-401C-9492-E40884EAD1D8} (voted most random at local county fair) Canonical Form: Name of profile encoded in ~BOM-less UTF-8~ BOM-less UTF-16LE

DHowett-MSFT commented 5 years ago

Justification for 0.2 (@cinnamon-msft, @bitcrazed)

This is required for 0.2 because it will be our first out-in-the-wild release. If we change the GUIDs after that point, we risk damaging user settings.

DHowett-MSFT commented 5 years ago

(This is assigned to me because I am working on it. It's not up for grabs!)

DHowett-MSFT commented 5 years ago

I've switched the suggested name format from BOMless UTF-8 to BOMless UTF-16LE because I wanted to have fewer string conversions back and forth at runtime.