-
-
Notifications
You must be signed in to change notification settings - Fork 2
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
Change canonical GUIDs list so it doesn't parse 1000 strings on startup #1361
Comments
Tried this format (obtained by printing out the GUIDs with
and got a bunch of errors about how int or uint couldn't be converted to short, despite the C# documentation saying that int literals can be autoconverted to shorter types (including short) if their values fit in the range. So then I tried:
And compilation hung for a long time; longer than it's worth. I don't know why the explicit casts were causing compile time to slow down so much, but I'm going to give up on this idea and go with using Guid.ToByteArray() to print out the internal structure, then specifying the byte arrays in the |
Here's the code I used to generate this: public static void PrintGuids()
{
foreach (var g in CanonicalSemDomGuids)
{
var b = g.ToByteArray();
var s = $"new Guid([{string.Join(", ", b.Select(b => b.ToString()))}]),";
Console.WriteLine($"{s,-90} // {g.ToString()}");
}
} It's not going into any commit, so I'm saving it here on the off-chance I need to do this again later. |
Pushed in commit 00335e4 which went on the wrong branch; will pull it back out of that branch and convert it to its own PR. |
Describe the feature
#1344 (review)
We want to change the canonical GUID list to use a constructor that doesn't need to parse the GUIDs. This issue exists to track that remaining work that didn't make it into #1344 before it was merged.
The text was updated successfully, but these errors were encountered: