Skip to content

C++/WinRT restore SDK support#122

Merged
kennykerr merged 53 commits into
masterfrom
kennykerr-sdk
Jan 14, 2019
Merged

C++/WinRT restore SDK support#122
kennykerr merged 53 commits into
masterfrom
kennykerr-sdk

Conversation

@kennykerr

Copy link
Copy Markdown
Contributor

This update restores support for referring a specific SDK rather than just a set of winmd files. All of the following now works as before:

-in sdk
-in sdk+
-in 10.0.18314.0
-in 10.0.18314.0+

This update also includes a few bug fixes and tweaks to bring the xlang version on par with the production version of the cppwinrt compiler. I've also ported a few more unit tests.

@kennykerr

Copy link
Copy Markdown
Contributor Author

And no, I have no idea why comments from a previous PR are showing up here. 🙄

@devhawk

devhawk commented Jan 14, 2019

Copy link
Copy Markdown
Contributor

@kennykerr can you delete the comments that are not relevant to this PR?

Comment thread src/library/cmd_reader.h Outdated
Comment thread src/library/cmd_reader.h Outdated

private:

#if XLANG_PLATFORM_WINDOWS

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

wondering if we should factor out windows support into a separate header...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yep, I've been thinking about that. I'll see if I can come up with a reasonable way to separate this out.

Comment thread src/library/cmd_reader.h Outdated
static void add_files_from_xml(
std::set<std::string>& files,
std::string const& sdk_version,
std::experimental::filesystem::path const& xml_path,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

should we be using std::filesystem::path now?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, I'd love to. I thought Harry mentioned some reason why that didn't work on the Ubuntu build at present. I can check whether this has been fixed.

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.

Clang 6.0's libc++ doesn't include filesystem in std namespace. https://github.com/llvm-mirror/libcxx/tree/release_60/include

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Clang 7 has been out for almost 6 months. 😉

Comment thread src/library/cmd_reader.h Outdated
KEY_READ,
&key))
{
throw_invalid("Could not find the Windows SDK");

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd prefer distinct error strings here and following, to help diagnosis

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

👍

Comment thread src/library/cmd_reader.h Outdated
database(database&&) = delete;
database& operator=(database&&) = delete;

static bool is_database(std::string_view const& path)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

consider factoring this and the duplicate ctor logic into a helper

settings.input = args.files("input");
settings.reference = args.files("reference");

settings.input = args.files("input", database::is_database);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

curious why a deep inspection of the PE header is necessary, versus just an extension check?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Previously, we just checked the extension but I was concerned about this being used with xlang (non-WinRT) projects where there has been talk of using a different file extension.

@kennykerr kennykerr merged commit 4edcd50 into master Jan 14, 2019
@kennykerr kennykerr deleted the kennykerr-sdk branch January 14, 2019 20:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants