Skip to content

[linux-port] Fix incorrect UUIDs on Linux - #2796

Merged
Ehsan (ehsannas) merged 1 commit into
microsoft:masterfrom
nicebyte:uuid-hash
Mar 30, 2020
Merged

Ehsan (ehsannas) merged 1 commit into
microsoft:masterfrom
nicebyte:uuid-hash

Conversation

@nicebyte

Copy link
Copy Markdown
Contributor

When using libdxcompiler.so, UUIDs of classes don't match
because on Linux a UUID is effectively an address of a
static member variable.

This change replaces UUIDs with a consistent value -
a hash of the class name.

@msftclas

Microsoft Contribution License Agreements (msftclas) commented Mar 29, 2020 •

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

@AppVeyorBot

Copy link
Copy Markdown

@ehsannas
Ehsan (ehsannas) self-requested a review March 30, 2020 13:45
@ehsannas Ehsan (ehsannas) changed the title Fix incorrect UUIDs on Linux [linux-port] Fix incorrect UUIDs on Linux Mar 30, 2020
@ehsannas Ehsan (ehsannas) added the linux Linux-specific work label Mar 30, 2020

@ehsannas Ehsan (ehsannas) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution nicebyte (@nicebyte). LGTM. Please run clang-format on this file

When using libdxcompiler.so, UUIDs of classes don't match
because on Linux a UUID is effectively an address of a
static member variable.

This change replaces UUIDs with a consistent value -
a hash of the class name.
@nicebyte

Copy link
Copy Markdown
Contributor Author

re-fromatted the file, PTAL. Thanks!

@pow2clk Gregory Roth (pow2clk) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the headaches that the previous UUID implementation caused me and now I'm kicking myself for not thinking of this! Thanks nicebyte (@nicebyte)!

@AppVeyorBot

Copy link
Copy Markdown

@ehsannas Ehsan (ehsannas) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@ehsannas
Ehsan (ehsannas) merged commit 34de0e3 into microsoft:master Mar 30, 2020
Marijn Suijten (MarijnS95) added a commit to MarijnS95/DirectXShaderCompiler that referenced this pull request Nov 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

linux Linux-specific work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants