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

Flatten Folder Structure (MAX_PATH) #332

Closed
1 of 20 tasks
michael-hawker opened this issue Dec 8, 2022 · 2 comments · Fixed by #369
Closed
1 of 20 tasks

Flatten Folder Structure (MAX_PATH) #332

michael-hawker opened this issue Dec 8, 2022 · 2 comments · Fixed by #369
Assignees
Labels
build 🔥 enhancement Improvement to an existing feature templating

Comments

@michael-hawker
Copy link
Member

Describe the bug

We're hitting an issue with MAX_PATH again for some reason, even after having tested prior fixes if the repo is checked out too deep on a machine:

Severity Code Description Project File Line Suppression State Error DEP1000: Cannot copy file "C:\Users\...\source\uwp\Labs-Windows\labs\StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehaviorCustomSample.xaml.cs" to layout "C:\Users\...\source\uwp\Labs-Windows\platforms\CommunityToolkit.Labs.WinAppSdk\bin\x86\Debug\net6.0-windows10.0.19041.0\AppX\SourceAssets/StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehaviorCustomSample.xaml.cs.dat". DirectoryNotFoundException - Could not find a part of the path 'C:\Users\...\source\uwp\Labs-Windows\platforms\CommunityToolkit.Labs.WinAppSdk\bin\x86\Debug\net6.0-windows10.0.19041.0\AppX\SourceAssets/StackedNotificationsBehavior\samples\StackedNotificationsBehavior.Samples\StackedNotificationsBehaviorCustomSample.xaml.cs.dat'. [0x80070003] CommunityToolkit.Labs.WinAppSdk

(Incidentally, this is also related to CommunityToolkit/Tooling-Windows-Submodule#18, #88, #37 and fixing not needing to copy the assets for Uno.)

Looking at our setup, we duplicate the experiment name in a lot of folders:

image

  1. For instance in the samples folder we're already in the ProjectTemplate\samples folder, so we should have our subfolders be:
  • Content
  • Uwp
  • Wasm
  • WinAppSdk

For tests we could do similar:

  • Shared (or maybe Cases?)
  • Uwp
  • WinAppSdk

  1. Alternatively, I like even better just the idea of splitting out the runner projects entirely:
  • project template
    • src
    • samples
      • docs/pages just go directly here now
    • tests
      • test pages/cases go directly here now
    • heads (if only we could auto-generate these all on solution opening...)
      • Uwp
      • Wasm
      • WinAppSdk
      • Tests.Uwp
      • Tests.WinAppSdk

Not only does this remove a whole directory layer from our tree, it also makes it immediately clear where everything goes in an experiment and everything that doesn't need to be touched by a contributor and only needed to run the projects is in a single place.

That also makes it easier for us to migrate experiments when we make future infrastructure changes as we should be able to theoretically just wipe and re-create the heads directory of each experiment and not have to reach into so many directories as we would now.

Steps to reproduce

Clone repo through VS to the standard source folder under users off main...
Build, then try and deploy...

Expected behavior

Should be able to run.

Screenshots

No response

Code Platform

  • UWP
  • WinAppSDK / WinUI 3
  • Web Assembly (WASM)
  • Android
  • iOS
  • MacOS
  • Linux / GTK

Windows Build Number

  • Windows 10 1809 (Build 17763)
  • Windows 10 1903 (Build 18362)
  • Windows 10 1909 (Build 18363)
  • Windows 10 2004 (Build 19041)
  • Windows 10 20H2 (Build 19042)
  • Windows 10 21H1 (Build 19043)
  • Windows 11 21H2 (Build 22000)
  • Other (specify)

Other Windows Build number

No response

App minimum and target SDK version

  • Windows 10, version 1809 (Build 17763)
  • Windows 10, version 1903 (Build 18362)
  • Windows 10, version 1909 (Build 18363)
  • Windows 10, version 2004 (Build 19041)
  • Other (specify)

Other SDK version

No response

Visual Studio Version

No response

Visual Studio Build Number

No response

Device form factor

No response

Additional context

No response

Help us help you

Yes, but only if others can assist.

@michael-hawker michael-hawker added the bug 🐛 Something isn't working label Dec 8, 2022
@michael-hawker michael-hawker added this to the Labs Submodule Prep milestone Dec 13, 2022
@michael-hawker
Copy link
Member Author

michael-hawker commented Dec 13, 2022

Let's go with approach 2 and simplify the structure to be more intuitive for folks understanding where to add code too.

We can rename labs to src as well to be consistent when we sub-module the labs infrastructure for WCT.

@Arlodotexe
Copy link
Member

Scripting the migration of relative paths for moved files has been put on pause in favor of #257 / #358. We'll need to put this on pause until that work is done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment