-
Notifications
You must be signed in to change notification settings - Fork 51
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
Fixed data from other samples being pulled into single-experiment solutions #130
Conversation
@Arlodotexe looks like some build issues. There's an overload to |
Thank goodness for CI! I'll get that fixed up :) |
Weird, I've seen this error locally (usually re-building/deploying fixes it), but never in the CI...
I've re-run that job and we'll see if it happens again. But if that can randomly fail in the CI, that'll be a bit concerning. Imagine we'd want to open an Uno/.NET issue or something for that? @Arlodotexe? |
That isn't a valid path.... This might be related to the changes in this PR. Will investigate |
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.
I'm a bit concerned we're just digging a whole deeper here. Can we step-back and evaluate if we can change our approach or look for alternatives to simplify this?
I mean part of this is a workaround for Uno with #37, #88, and #90. Part of this is the structure of our projects.
Can we document where each type of source file we need access to lives in the repo structure from the root and where it's looked for in each of the scenarios (all samples, single experiment, template)? And then decide a single desired path we want those to be in?
As ideally the sample app just gets the same path to SourceAssets\ExperimentName\csorxamlordocfilename
regardless of what mode the app is running in or how it was built... that'd solve a lot of issues now and in the future, right?
common/CommunityToolkit.Labs.Shared/Renderers/ToolkitDocumentationRenderer.xaml.cs
Show resolved
Hide resolved
common/CommunityToolkit.Labs.Shared/Renderers/ToolkitSampleRenderer.xaml.cs
Show resolved
Hide resolved
Hey @jeromelaban, we're getting bit again more by the unoplatform/uno#2502 (comment) as we're running into issues trying to wildcard this globally vs. just being able to grab things from the assemblies as we're building things in multiple modes/locations depending on the scenario. It bleeds into our source/generator/app logic now to try and figure out where our assets area going to be. Any update or other suggestions? Thanks! |
@Arlodotexe talked to Jerome. He suggested instead of the glob we could use an inline task to help us with our desired copying heuristic: https://github.com/unoplatform/uno/blob/43efd99f67daade2e663e317989c3ab324a2c443/src/SolutionTemplate/Uno.ProjectTemplates.Dotnet/Uno.ProjectTemplates.Dotnet.csproj#L244 That way we can use the proper globs to grab the input files from the proper locations, but then have the task make sure the extra parent/relative path parts don't matter as it'll copy it to a consistent |
@Arlodotexe I opened CommunityToolkit/Tooling-Windows-Submodule#18 to track improving the workaround later (if we need to if the Uno issue remains unfixed). Can we just add comments in the cs/csproj to point to our Labs issue and then we can merge this in? |
…tiple-tabs-in-single-sample Fixed data from other samples being pulled into single-experiment solutions
Closes #120
Summary
This PR corrects an issue where, in a single-sample solution, data from other samples could appear.
The cause
This was caused by the use of absolute paths + wildcards, which picked up all samples with no regard for the current running experiment.
The solution
Instead of using absolute paths for including source and markdown in single-experiment heads, we're using relative paths exclusively.
This has the side effect of changing where content placed in the application package when running in "All" vs "Single" mode, which is compensated for manually when building the path at runtime.
This PR has been tested against the CanvasLayout solution, Generated "All" solution, and ProjectTemplate solution. UWP, WebAssembly and WinAppSDK were all tested.