-
-
Notifications
You must be signed in to change notification settings - Fork 120
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
v5: Update to latest winmd and land Dart 3 #697
Conversation
Well, I have no clue why this is failing with this error message. 😠 It works fine on my machine! |
It appears that the interface We started encountering this error because the recently updated As a workaround, we could temporarily ignore the Once halildurmus/winmd#68 is resolved, we will no longer face such problems :) |
Ah, that's brilliant. Thank you. Although I don't think that PR will solve this: the aforementioned Windows.Win32.winmd came from NuGet! |
I'll fix the test, merge this and publish this morning as v5 if you're Ok with that. We are nearly there! |
Unless I'm missing something, wouldn't that PR resolve the issue because the
Sounds good! FYI, I plan to publish the |
tool/win32gen/test/input_test.dart
Outdated
..where((typeDef) => typeDef.name.endsWith('Apis')) | ||
// Temporarily disable because of: | ||
// https://github.com/dart-windows/win32/pull/697#issuecomment-1541500049 | ||
..where((typeDef) => | ||
!typeDef.name.startsWith('Windows.Win32.System.WinRT.Metadata.Apis')); | ||
..where((typeDef) => typeDef.name.endsWith('Apis')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@timsneath I think ..where
should be .where
:). Pretty sure that's the reason it didn't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doh. OK, I've disabled this test for right now so I can land this, but I'll re-enable it when we have a green build.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, ready for your approval @halildurmus!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like GitHub is failing us this time :)
Edit: We seem to have a failing test as well :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, because it looks like there are other parts of metadata that depend on other classes in this namespace. I'm going to disable this test for GHA.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MetadataGetDispenser
function is from the ignored namespace Windows.Win32.System.WinRT.Metadata.Apis
.
Ignoring it should fix it (hopefully):
...
// Gather metadata for all the functions in the JSON file
for (final function in functionsToGenerate.values) {
if (function.functionSymbol == 'MetaDataGetDispenser') continue;
final method = methods.where((m) => m.name == function.functionSymbol);
if (method.length != 1) {
fail('${function.functionSymbol} did not match a unique item in '
'the metadata. There were ${method.length} matching items.');
}
}
Edit: On second thought, there are probably more functions like this.
OK, just pulling this test. It's too painful to debug this right now, and I want to get this out. This is just a test flake on Windows 10 machines. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a little complex to land, because of the cyclical dependency between
win32gen
andwinmd
, coupled with the breaking change (the latest Win32 metadata includes the COM classes thatwinmd
depends on, so they've moved towin32
).Step 1: use
git
dependencies andpublish_to: none
to ensure that the pieces work togetherStep 2: remove
publish_to
and replace git dependencies with actual versionsStep 3: publish both simultaneously
Step 4: ...
Step 5: profit :)