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

🧪 Bring over StackedNotificationsBehavior from Toolkit #211

Merged
merged 21 commits into from
Nov 18, 2022

Conversation

michael-hawker
Copy link
Member

@michael-hawker michael-hawker commented Jul 20, 2022

Importing from Toolkit

See Details in #210

Been using as my test/demo for presentation, so been working alright. Want to get initial version in.

Made some additional small tweaks:

  • Make links in Markdown clickable
  • Remove close buttons from Tabs in experiment mode
  • Remove empty data at end of docs (think was causing the rogue 'FrontMatter' to showup)
  • tweak template to add blank line needed to render list in documentation
  • rev packages to check that working with all updates

@michael-hawker michael-hawker added the experiment 🧪 Used to track issues that are experiments (or their linked discussions) label Jul 20, 2022
@michael-hawker michael-hawker added this to the Initial Release milestone Jul 20, 2022
Copy link
Collaborator

@niels9001 niels9001 left a comment

Choose a reason for hiding this comment

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

Lgtm!

@michael-hawker michael-hawker force-pushed the llama/port-notifications branch from c8cc172 to 425adcd Compare July 20, 2022 06:30
Title = "Windows Community Toolkit Labs Sample App",
Content = $"Link {e.Link} was malformed.",
CloseButtonText = "Close",
XamlRoot = XamlRoot
Copy link
Member Author

Choose a reason for hiding this comment

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

Apparently, this only works on UWP for 1903+, so we'll need to figure out something for 1809 in the future, won't worry about it now.

@michael-hawker michael-hawker force-pushed the llama/port-notifications branch 3 times, most recently from df5f789 to 09f4713 Compare July 20, 2022 08:54
@michael-hawker michael-hawker changed the title Bring over StackedNotificationsBehavior from Toolkit 🧪 Bring over StackedNotificationsBehavior from Toolkit Jul 20, 2022
@michael-hawker
Copy link
Member Author

Bubbling up the CI Uno error here:

"D:\a\Labs-Windows\Labs-Windows\Toolkit.Labs.All.sln" (default target) (1:2) ->
"D:\a\Labs-Windows\Labs-Windows\platforms\CommunityToolkit.Labs.Droid\CommunityToolkit.Labs.Droid.csproj" (default target) (6:6) ->
"D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj" (default target) (21:73) ->
(_UnoSourceGenerator target) -> 
  MSBUILD : error : Generation failed: System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\obj\Release\monoandroid11.0\g\NativeCtorsGenerator\StackedNotificationsBehaviorExperiment_Samples_StackedNotificationsBehaviorCustomSample_3aca12002872ed9de2d15c6b3ebbd506.g.cs'. [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
MSBUILD : error :    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
MSBUILD : error :    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
MSBUILD : error :    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
MSBUILD : error :    at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost) [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
MSBUILD : error :    at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost) [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
MSBUILD : error :    at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost) [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
MSBUILD : error :    at Uno.SourceGeneration.Host.SourceGeneratorEngine.Generate() in D:\a\1\s\src\Uno.SourceGeneration.Engine.Shared\SourceGeneratorEngine.cs:line 285 [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
MSBUILD : error :    at Uno.SourceGeneration.Host.Program.RunGeneration(String generatedFilesOutputPath, String binlogOutputPath, BuildEnvironment environment, Boolean enableConsole) in D:\a\1\s\src\Uno.SourceGeneration.Host\Program.SingleUse.cs:line 68 [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
  C:\Users\runneradmin\.nuget\packages\uno.sourcegenerationtasks\4.0.2\build\netstandard1.0\Uno.SourceGenerationTasks.targets(134,2): error : Generation failed, error code 3 [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
"D:\a\Labs-Windows\Labs-Windows\Toolkit.Labs.All.sln" (default target) (1:2) ->
"D:\a\Labs-Windows\Labs-Windows\platforms\CommunityToolkit.Labs.iOS\CommunityToolkit.Labs.iOS.csproj" (default target) (7:6) ->
"D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj" (default target) (21:75) ->
  MSBUILD : error : Generation failed: System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\obj\Release\xamarinios10\g\NativeCtorsGenerator\StackedNotificationsBehaviorExperiment_Samples_StackedNotificationsBehaviorCustomSample_3aca12002872ed9de2d15c6b3ebbd506.g.cs'. [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
MSBUILD : error :    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
MSBUILD : error :    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
MSBUILD : error :    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
MSBUILD : error :    at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost) [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
MSBUILD : error :    at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost) [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
MSBUILD : error :    at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost) [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
MSBUILD : error :    at Uno.SourceGeneration.Host.SourceGeneratorEngine.Generate() in D:\a\1\s\src\Uno.SourceGeneration.Engine.Shared\SourceGeneratorEngine.cs:line 285 [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
MSBUILD : error :    at Uno.SourceGeneration.Host.Program.RunGeneration(String generatedFilesOutputPath, String binlogOutputPath, BuildEnvironment environment, Boolean enableConsole) in D:\a\1\s\src\Uno.SourceGeneration.Host\Program.SingleUse.cs:line 68 [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
  C:\Users\runneradmin\.nuget\packages\uno.sourcegenerationtasks\4.0.2\build\netstandard1.0\Uno.SourceGenerationTasks.targets(134,2): error : Generation failed, error code 3 [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
"D:\a\Labs-Windows\Labs-Windows\Toolkit.Labs.All.sln" (default target) (1:2) ->
"D:\a\Labs-Windows\Labs-Windows\platforms\CommunityToolkit.Labs.macOS\CommunityToolkit.Labs.macOS.csproj" (default target) (8:6) ->
"D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj" (default target) (21:77) ->
  MSBUILD : error : Generation failed: System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\obj\Release\xamarinmac20\g\NativeCtorsGenerator\StackedNotificationsBehaviorExperiment_Samples_StackedNotificationsBehaviorCustomSample_3aca12002872ed9de2d15c6b3ebbd506.g.cs'. [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
MSBUILD : error :    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
MSBUILD : error :    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
MSBUILD : error :    at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
MSBUILD : error :    at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost) [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
MSBUILD : error :    at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost) [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
MSBUILD : error :    at System.IO.File.InternalWriteAllText(String path, String contents, Encoding encoding, Boolean checkHost) [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
MSBUILD : error :    at Uno.SourceGeneration.Host.SourceGeneratorEngine.Generate() in D:\a\1\s\src\Uno.SourceGeneration.Engine.Shared\SourceGeneratorEngine.cs:line 285 [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
MSBUILD : error :    at Uno.SourceGeneration.Host.Program.RunGeneration(String generatedFilesOutputPath, String binlogOutputPath, BuildEnvironment environment, Boolean enableConsole) in D:\a\1\s\src\Uno.SourceGeneration.Host\Program.SingleUse.cs:line 68 [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]
  C:\Users\runneradmin\.nuget\packages\uno.sourcegenerationtasks\4.0.2\build\netstandard1.0\Uno.SourceGenerationTasks.targets(134,2): error : Generation failed, error code 3 [D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehavior.Samples.csproj]

Seems internal, but also going to rebase the branch and try rebuilding now that we fixed the SG test issue.

@michael-hawker michael-hawker force-pushed the llama/port-notifications branch from 09f4713 to 137df39 Compare July 20, 2022 22:28
@michael-hawker
Copy link
Member Author

Rebased, we'll see what happens now.

@michael-hawker
Copy link
Member Author

Hmm, just checked the path specified here: D:\a\Labs-Windows\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\obj\Release\xamarinios10\g\NativeCtorsGenerator\StackedNotificationsBehaviorExperiment_Samples_StackedNotificationsBehaviorCustomSample_3aca12002872ed9de2d15c6b3ebbd506.g.cs is 283 characters. I think the regular path limit is 260? So we might have to configure this in the CI?

@michael-hawker
Copy link
Member Author

Uno folks pointed us to this issue: dotnet/msbuild#53 (comment)

I'm wondering if we can set the Reg key for the VM in powershell and run the git command as we did locally in our workflow, from our template doc here: https://github.com/CommunityToolkit/Labs-Windows/tree/main/template#long-paths

@Arlodotexe maybe something to try quick and see what happens? Otherwise, we can try and sort out later when we sync with the Uno folks in August.

@Arlodotexe
Copy link
Member

Arlodotexe commented Jul 26, 2022

I'm wondering if we can set the Reg key for the VM in powershell and run the git command as we did locally in our workflow, from our template doc here: https://github.com/CommunityToolkit/Labs-Windows/tree/main/template#long-paths

In addition to the Git command, it looks like there's a PowerShell command for this too. We should be able to use a similar command to read the value and see if it's enabled already.

Set-ItemProperty 'HKLM:\System\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -value 1

There's 2 considerations to hash out still:

  • It takes a full restart to take effect. We'd have to interrupt the user's workflow completely for a restart if they don't already have this enabled.
  • Where would we run this script from? Do we try to integrate the check into MSBuild and fail the build when not enabled?

Update: Will open a separate issue for this and continue discussion there.

@Arlodotexe
Copy link
Member

Before we can merge this, we need to manually add in changes done for #226

@michael-hawker michael-hawker force-pushed the llama/port-notifications branch from 572ba36 to 4205f6e Compare August 8, 2022 20:54
@michael-hawker
Copy link
Member Author

michael-hawker commented Aug 8, 2022

Well at least we're getting another error now? (And it worked on the WinUI 3 build!)

Seems .NET Native related now:

"D:\a\Labs-Windows\Labs-Windows\Toolkit.Labs.All.sln" (default target) (1:2) ->
"D:\a\Labs-Windows\Labs-Windows\platforms\CommunityToolkit.Labs.Uwp\CommunityToolkit.Labs.Uwp.csproj" (default target) (12:6) ->
(BuildNativePackage target) -> 
  C:\Users\runneradmin\.nuget\packages\microsoft.net.native.compiler\2.2.10-rel-29722-00\tools\Microsoft.NetNative.targets(805,5): error : ILT0005: 'C:\Users\runneradmin\.nuget\packages\runtime.win10-x64.microsoft.net.native.compiler\2.2.10-rel-29722-00\tools\x64\ilc\Tools\nutc_driver.exe @"D:\a\Labs-Windows\Labs-Windows\platforms\CommunityToolkit.Labs.Uwp\obj\x64\Release\ilc\intermediate\MDIL\CommunityToolkit.Labs.Uwp.rsp"' returned exit code 1 [D:\a\Labs-Windows\Labs-Windows\platforms\CommunityToolkit.Labs.Uwp\CommunityToolkit.Labs.Uwp.csproj]

Going to try the fix suggested here and see what happens: https://dev.to/mhmd_azeez/solving-nutcdriver-exe-returned-code-1-error-while-building-uwp-app-in-release-mode-2mc6 - Related: dotnet/corert#5604

(And the test space changes seem to work, think there may be more we can do hear in the future, but them being connected in the GitHub commit check is the first step.)

@Arlodotexe
Copy link
Member

@michael-hawker michael-hawker linked an issue Nov 2, 2022 that may be closed by this pull request
22 tasks
@michael-hawker
Copy link
Member Author

@Arlodotexe think we discovered something. Reran the failed job, but appears that there's something in the test projects (maybe related to XML) that's tripping up the .NET Native compiler more consistently?

When we abstracted running the tests from the .NET Native compiler, then things were fine.

Maybe we do go back and not run tests through .NET Native, and add smoke tests later that use .NET Native...? 🤔

FYI @tommcdon, have you heard or aware of any of these issues with MSTest and .NET Native?

@Arlodotexe
Copy link
Member

This branch is now on par with main in terms of the ILT0005 error. We should be good to merge.

I've added details in CommunityToolkit/Tooling-Windows-Submodule#9, let's continue the discussion there

@Arlodotexe Arlodotexe merged commit 3882ace into main Nov 18, 2022
@delete-merged-branch delete-merged-branch bot deleted the llama/port-notifications branch November 18, 2022 18:05
Martin1994 pushed a commit to Martin1994/Labs-Windows that referenced this pull request Sep 2, 2023
…ort-notifications

🧪 Bring over StackedNotificationsBehavior from Toolkit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experiment 🧪 Used to track issues that are experiments (or their linked discussions)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🧪 [Experiment] StackedNotificationsBehavior for InfoBar
4 participants