Skip to content
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

Updated nuget packages #1256

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

AtariDreams
Copy link
Contributor

@AtariDreams AtariDreams commented Oct 7, 2022

Many of these packages are old beta packages that have long been superseded

@manodasanW
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@AtariDreams
Copy link
Contributor Author

AtariDreams commented Oct 20, 2022

Ready! @manodasanW

@manodasanW
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@manodasanW
Copy link
Member

Thanks @AtariDreams for bringing all these packages to updated consistent versions.

I think the Microsoft.WinUI and Microsoft.ProjectReunion version updates come with some breaking changes that may make them need to be addressed separately. But let's see how the build goes. We have plans on updating those packages to the WinAppSDK package which also comes with our changes we will need to do to get it working.

@manodasanW
Copy link
Member

2022-10-21T18:22:00.3941503Z "D:\a\1\s\src\cswinrt.sln" (default target) (1) ->
2022-10-21T18:22:00.3942038Z "D:\a\1\s\src\Tests\HostTest\HostTest.vcxproj" (default target) (29) ->
2022-10-21T18:22:00.3942726Z (ResolveSDKReferences target) -> 
2022-10-21T18:22:00.3944119Z   C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2573,5): error MSB3843: Project "HostTest" targets platform "Windows", but references SDK "Visual C++ 2015-2019 UWP Desktop Runtime for native apps v14.0" which targets platform "UAP". [D:\a\1\s\src\Tests\HostTest\HostTest.vcxproj]
2022-10-21T18:22:00.3945912Z   C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2573,5): error MSB3843: Project "HostTest" targets platform "Windows", but references SDK "Microsoft Universal CRT Debug Runtime v10.0.22621.0" which targets platform "UAP". [D:\a\1\s\src\Tests\HostTest\HostTest.vcxproj]
2022-10-21T18:22:00.3947586Z   C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2573,5): error MSB3843: Project "HostTest" targets platform "Windows", but references SDK "Visual C++ 2015-2019 Runtime for Universal Windows Platform Apps v14.0" which targets platform "UAP". [D:\a\1\s\src\Tests\HostTest\HostTest.vcxproj]
2022-10-21T18:22:00.3948479Z 
2022-10-21T18:22:00.3948659Z 
2022-10-21T18:22:00.3949009Z "D:\a\1\s\src\cswinrt.sln" (default target) (1) ->
2022-10-21T18:22:00.3949677Z "D:\a\1\s\src\Tests\AuthoringConsumptionTest\AuthoringConsumptionTest.vcxproj" (default target) (34) ->
2022-10-21T18:22:00.3950964Z   C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2573,5): error MSB3843: Project "AuthoringConsumptionTest" targets platform "Windows", but references SDK "Visual C++ 2015-2019 UWP Desktop Runtime for native apps v14.0" which targets platform "UAP". [D:\a\1\s\src\Tests\AuthoringConsumptionTest\AuthoringConsumptionTest.vcxproj]
2022-10-21T18:22:00.3952977Z   C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2573,5): error MSB3843: Project "AuthoringConsumptionTest" targets platform "Windows", but references SDK "Microsoft Universal CRT Debug Runtime v10.0.22621.0" which targets platform "UAP". [D:\a\1\s\src\Tests\AuthoringConsumptionTest\AuthoringConsumptionTest.vcxproj]
2022-10-21T18:22:00.3954843Z   C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Current\Bin\amd64\Microsoft.Common.CurrentVersion.targets(2573,5): error MSB3843: Project "AuthoringConsumptionTest" targets platform "Windows", but references SDK "Visual C++ 2015-2019 Runtime for Universal Windows Platform Apps v14.0" which targets platform "UAP". [D:\a\1\s\src\Tests\AuthoringConsumptionTest\AuthoringConsumptionTest.vcxproj]
2022-10-21T18:22:00.3955851Z 
2022-10-21T18:22:00.3956035Z 
2022-10-21T18:22:00.3956388Z "D:\a\1\s\src\cswinrt.sln" (default target) (1) ->
2022-10-21T18:22:00.3956964Z "D:\a\1\s\src\Tests\ObjectLifetimeTests\ObjectLifetimeTests.Lifted.csproj" (default target) (36) ->
2022-10-21T18:22:00.3957718Z "D:\a\1\s\src\Tests\ObjectLifetimeTests\ObjectLifetimeTests.Lifted.csproj" (Build target) (36:2) ->
2022-10-21T18:22:00.3958348Z (_ValidateWindowsPackageType target) -> 
2022-10-21T18:22:00.3959398Z   C:\Users\VssAdministrator\.nuget\packages\microsoft.projectreunion.winui\0.8.12\buildTransitive\Microsoft.Build.Msix.Packaging.targets(119,5): error : 'Desktop' is not valid for the WindowsPackageType property. Value must be one of the following: None,MSIX,Sparse [D:\a\1\s\src\Tests\ObjectLifetimeTests\ObjectLifetimeTests.Lifted.csproj]
2022-10-21T18:22:00.3960245Z 
2022-10-21T18:22:00.3960445Z 
2022-10-21T18:22:00.3960773Z "D:\a\1\s\src\cswinrt.sln" (default target) (1) ->
2022-10-21T18:22:00.3961314Z "D:\a\1\s\src\Tests\ObjectLifetimeTests\ObjectLifetimeTests.Lifted.csproj" (default target) (36) ->
2022-10-21T18:22:00.3962225Z "D:\a\1\s\src\Tests\ObjectLifetimeTests\ObjectLifetimeTests.Lifted.csproj" (Build target) (36:3) ->
2022-10-21T18:22:00.3963372Z   C:\Users\VssAdministrator\.nuget\packages\microsoft.projectreunion.winui\0.8.12\buildTransitive\Microsoft.Build.Msix.Packaging.targets(119,5): error : 'Desktop' is not valid for the WindowsPackageType property. Value must be one of the following: None,MSIX,Sparse [D:\a\1\s\src\Tests\ObjectLifetimeTests\ObjectLifetimeTests.Lifted.csproj]
2022-10-21T18:22:00.3964416Z 
2022-10-21T18:22:00.3964619Z 
2022-10-21T18:22:00.3965007Z "D:\a\1\s\src\cswinrt.sln" (default target) (1) ->
2022-10-21T18:22:00.3965915Z "D:\a\1\s\src\Tests\ObjectLifetimeTests\ObjectLifetimeTests.Lifted.csproj" (default target) (36) ->
2022-10-21T18:22:00.3966666Z "D:\a\1\s\src\Tests\ObjectLifetimeTests\ObjectLifetimeTests.Lifted.csproj" (Build target) (36:4) ->
2022-10-21T18:22:00.3968081Z   C:\Users\VssAdministrator\.nuget\packages\microsoft.projectreunion.winui\0.8.12\buildTransitive\Microsoft.Build.Msix.Packaging.targets(119,5): error : 'Desktop' is not valid for the WindowsPackageType property. Value must be one of the following: None,MSIX,Sparse [D:\a\1\s\src\Tests\ObjectLifetimeTests\ObjectLifetimeTests.Lifted.csproj]
2022-10-21T18:22:00.3968913Z 
2022-10-21T18:22:00.3969060Z 
2022-10-21T18:22:00.3969424Z "D:\a\1\s\src\cswinrt.sln" (default target) (1) ->
2022-10-21T18:22:00.3969946Z "D:\a\1\s\src\Projections\Reunion\Reunion.csproj" (default target) (37) ->
2022-10-21T18:22:00.3970539Z "D:\a\1\s\src\Projections\Reunion\Reunion.csproj" (Build target) (37:2) ->
2022-10-21T18:22:00.3971045Z (CoreCompile target) -> 
2022-10-21T18:22:00.3972999Z   D:\a\1\s\src\Projections\Reunion\Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.cs(13,26): error CS0246: The type or namespace name 'DispatcherQueue' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\src\Projections\Reunion\Reunion.csproj]
2022-10-21T18:22:00.3982470Z   D:\a\1\s\src\Projections\Reunion\Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.cs(15,54): error CS0246: The type or namespace name 'DispatcherQueue' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\src\Projections\Reunion\Reunion.csproj]
2022-10-21T18:22:00.3983490Z 
2022-10-21T18:22:00.3983669Z 
2022-10-21T18:22:00.3984081Z "D:\a\1\s\src\cswinrt.sln" (default target) (1) ->
2022-10-21T18:22:00.3984578Z "D:\a\1\s\src\Projections\Reunion\Reunion.csproj" (default target) (37) ->
2022-10-21T18:22:00.3985179Z "D:\a\1\s\src\Projections\Reunion\Reunion.csproj" (Build target) (37:3) ->
2022-10-21T18:22:00.3986231Z   D:\a\1\s\src\Projections\Reunion\Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.cs(13,26): error CS0246: The type or namespace name 'DispatcherQueue' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\src\Projections\Reunion\Reunion.csproj]
2022-10-21T18:22:00.3987676Z   D:\a\1\s\src\Projections\Reunion\Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.cs(15,54): error CS0246: The type or namespace name 'DispatcherQueue' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\src\Projections\Reunion\Reunion.csproj]
2022-10-21T18:22:00.3988410Z 
2022-10-21T18:22:00.3988739Z 
2022-10-21T18:22:00.3989346Z "D:\a\1\s\src\cswinrt.sln" (default target) (1) ->
2022-10-21T18:22:00.3989916Z "D:\a\1\s\src\Projections\Reunion\Reunion.csproj" (default target) (37) ->
2022-10-21T18:22:00.3990559Z "D:\a\1\s\src\Projections\Reunion\Reunion.csproj" (Build target) (37:4) ->
2022-10-21T18:22:00.3991656Z   D:\a\1\s\src\Projections\Reunion\Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.cs(13,26): error CS0246: The type or namespace name 'DispatcherQueue' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\src\Projections\Reunion\Reunion.csproj]
2022-10-21T18:22:00.3993792Z   D:\a\1\s\src\Projections\Reunion\Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.cs(15,54): error CS0246: The type or namespace name 'DispatcherQueue' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\src\Projections\Reunion\Reunion.csproj]
2022-10-21T18:22:00.3994632Z 
2022-10-21T18:22:00.3995920Z 
2022-10-21T18:22:00.3996557Z "D:\a\1\s\src\cswinrt.sln" (default target) (1) ->
2022-10-21T18:22:00.3999027Z "D:\a\1\s\src\Projections\Reunion\Reunion.csproj" (default target) (37) ->
2022-10-21T18:22:00.3999925Z "D:\a\1\s\src\Projections\Reunion\Reunion.csproj" (Build target) (37:5) ->
2022-10-21T18:22:00.4003528Z   D:\a\1\s\src\Projections\Reunion\Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.cs(13,26): error CS0246: The type or namespace name 'DispatcherQueue' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\src\Projections\Reunion\Reunion.csproj]
2022-10-21T18:22:00.4005575Z   D:\a\1\s\src\Projections\Reunion\Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.cs(15,54): error CS0246: The type or namespace name 'DispatcherQueue' could not be found (are you missing a using directive or an assembly reference?) [D:\a\1\s\src\Projections\Reunion\Reunion.csproj]

The last couple errors look related to what I previously mentioned, but the first 2 look unrelated.

@manodasanW
Copy link
Member

@AtariDreams I have PR #1261 out which addresses moving our uses of the old WinUI and ProjectReunion packages to the WinAppSDK package and addresses the breaking changes from that. Once that is in, I think you should be able to rebase your branch with those changes and then your remaining changes for the other NuGet packages should build without issues.

@AtariDreams
Copy link
Contributor Author

@manodasanW Fixed!

@manodasanW
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@manodasanW
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@AtariDreams
Copy link
Contributor Author

@manodasanW Sorry, could you run that one more time, there was a build error I fixed.

@manodasanW
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@manodasanW
Copy link
Member

"D:\a\1\s\src\cswinrt.sln" (default target) (1) ->
"D:\a\1\s\src\Tests\AuthoringConsumptionTest\AuthoringConsumptionTest.vcxproj" (default target) (35) ->
(EnsureNuGetPackageBuildImports target) -> 
  D:\a\1\s\src\Tests\AuthoringConsumptionTest\AuthoringConsumptionTest.vcxproj(212,5): error : This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ..\..\packages\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.1.8.1.6\build\native\Microsoft.googletest.v140.windesktop.msvcstl.static.rt-dyn.targets.

@AtariDreams
Copy link
Contributor Author

@manodasanW Done, ready, and it builds!

@manodasanW
Copy link
Member

"D:\a\1\s\src\cswinrt.sln" (default target) (1) ->
"D:\a\1\s\src\Tests\AuthoringConsumptionTest\AuthoringConsumptionTest.vcxproj" (default target) (34) ->
(ClCompile target) -> 
  D:\a\1\s\src\Tests\AuthoringConsumptionTest\test.cpp(504,35): error C2672: 'begin': no matching overloaded function found [D:\a\1\s\src\Tests\AuthoringConsumptionTest\AuthoringConsumptionTest.vcxproj]
  D:\a\1\s\src\Tests\AuthoringConsumptionTest\test.cpp(504,35): error C2672: 'end': no matching overloaded function found [D:\a\1\s\src\Tests\AuthoringConsumptionTest\AuthoringConsumptionTest.vcxproj]
  D:\a\1\s\src\Tests\AuthoringConsumptionTest\test.cpp(505,5): error C3536: '<begin>$L0': cannot be used before it is initialized [D:\a\1\s\src\Tests\AuthoringConsumptionTest\AuthoringConsumptionTest.vcxproj]
  D:\a\1\s\src\Tests\AuthoringConsumptionTest\test.cpp(505,5): error C3536: '<end>$L0': cannot be used before it is initialized [D:\a\1\s\src\Tests\AuthoringConsumptionTest\AuthoringConsumptionTest.vcxproj]
  D:\a\1\s\src\Tests\AuthoringConsumptionTest\test.cpp(504,37): error C2100: illegal indirection [D:\a\1\s\src\Tests\AuthoringConsumptionTest\AuthoringConsumptionTest.vcxproj]

@manodasanW
Copy link
Member

Looks like the build is still hitting the error from the previous comment at this line. I looked into it a bit and it might be the result of updating the CppWinRT package from the much older version we were on. It seems like winrt::Microsoft::UI::Xaml::Interop::IBindableVectorView doesn't have a begin / end function per the error. But it seems previously it didn't have it too. It looks like it was working by using a fast_iterator but that seems to be no longer the case. There is another test case that does something similar using an IVectorView and that still seems to be fine and is still using the fast_iterator. @Scottj1s / @kennykerr thoughts? Is this expected?

@kennykerr
Copy link
Contributor

How old? 😜

@sylveon added C++20 range support here (microsoft/cppwinrt#900) and may have affected this. Generally ADL should be used to pick up the begin/end functions which would shield you from any changes like this. It looks like this change was first released in version 2.0.210329.4 so you could try the previous version to confirm.

@sylveon
Copy link

sylveon commented Nov 7, 2022

Looks like we need to also special case the WinUI 3 IBindableIterable and IBindableIterator interfaces, right now we only do it for system XAML: https://github.com/microsoft/cppwinrt/blob/6ce4fa91bb98763c099e24a744b3234f6b23727c/cppwinrt/code_writers.h#L1456

Should be fairly trivial to do... ctrl-c ctrl-v and replace Windows for Microsoft.

@kennykerr
Copy link
Contributor

Why would that be necessary? We've only ever supported the Windows.* types and supporting other types is out of scope and not maintainable.

@sylveon
Copy link

sylveon commented Nov 7, 2022

Because IBindableIterable doesn't implement IIterable<IInspectable> despite having the same API surface :(

@kennykerr
Copy link
Contributor

Sure, but cppwinrt does not provide iterator support for an open-ended list of collections. Only those based on Windows.Foundation.Collections are supported.

@sylveon
Copy link

sylveon commented Nov 7, 2022

This could be fixed at the WinUI 3 level by having IBindableIterable do so, and should make the range-for and everything else just light up, but I assume the API is kind of frozen at this point (so much for being decoupled)

@kennykerr
Copy link
Contributor

kennykerr commented Nov 7, 2022

Oh, I see. Prior to your change this worked with any "collection" with a First method. We could try to add those free begin/end functions back to backfill for such types.

@sylveon
Copy link

sylveon commented Nov 8, 2022

I had to remove them because otherwise

using std::begin;
begin(someWinrtType);

Would give conflicting overload errors, and I could not get ranges to work with cppwinrt's ADL begin...

We could either say that not using IIterable is not supported here and hope WinUI 3 adapts or apply the same special case to the WinUI 3 IBindableIterable than we do to system XAML (which doesn't seem too bad, it's fairly simple). I would vote for the former because it follows precedent (IE not supporting WinUI 3 DispatcherQueue after they broke the API on us once) but could also whip up a quick PR of the latter.

@sylveon
Copy link

sylveon commented Nov 8, 2022

Note that just adding those two methods back wouldn't work in some cases (e.g. trying to use IBindableIterator as a normal iterator wouldn't work).

@kennykerr
Copy link
Contributor

Right, this was never supported. It just happened to work by coincidence. Since these types don't derive from Windows.Foundation.Collections types they are not supported. But WinUI is now undocked so this should be an easy fix for them. 😜

@kennykerr
Copy link
Contributor

@manodasanW you can trivially work around this by providing your own begin/end free functions, strongly-typed for the necessary collection types. Something like (off the top of my head):

inline auto begin(IBindableIterable const& collection) -> decltype(collection.First())
{
    auto result = collection.First();

    if (!result.HasCurrent())
    {
        return {};
    }

    return result;
}

inline auto end([[maybe_unused]] IBindableIterable const& collection) noexcept -> decltype(collection.First())
{
    return {};
}

@sylveon
Copy link

sylveon commented Nov 8, 2022

This is the part where using IBindableIterator as a normal iterator won't work.

@sylveon
Copy link

sylveon commented Nov 8, 2022

Though if you're okay with reaching into winrt::impl, you can directly make it return fast_iterator and should be okay

@kennykerr
Copy link
Contributor

Right, that's where Xaml needs to fix their API if they want this to work.

@manodasanW
Copy link
Member

Thanks @kennykerr and @sylveon. @AtariDreams looking at the test, I think to unblock this PR you can remove the for loop from here as we already test the other functions like First individually.

@sylveon
Copy link

sylveon commented Nov 8, 2022

Filled microsoft/microsoft-ui-xaml#7891

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.

None yet

4 participants