-
-
Notifications
You must be signed in to change notification settings - Fork 445
Remove unnecessary runtime files #3886
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
Conversation
Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX. |
📝 WalkthroughWalkthroughThe project file was updated to include two new MSBuild targets that automatically remove unnecessary runtime-specific directories from the build and publish outputs after the respective processes complete. This cleanup targets directories for various non-required platforms and architectures. Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant MSBuild
participant FileSystem
Developer->>MSBuild: Build or Publish project
MSBuild->>MSBuild: Execute Build/Publish
MSBuild->>MSBuild: Run RemoveUnnecessaryRuntimesAfterBuild/AfterPublish
MSBuild->>FileSystem: Delete unnecessary runtime directories
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested reviewers
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (5)
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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.
Actionable comments posted: 1
🧹 Nitpick comments (1)
Flow.Launcher/Flow.Launcher.csproj (1)
63-82
: Duplication & maintainability: share logic with the build target
RemoveUnnecessaryRuntimesAfterPublish
repeats the entire directory list. Any future tweak must be made in two places, risking drift.Consider:
- Define the list once:
<PropertyGroup> <RuntimeDirsToRemove> browser-wasm; linux-arm; …; osx-x64 </RuntimeDirsToRemove> </PropertyGroup>
- Use a single helper target that receives either
$(OutputPath)
or$(PublishDir)
as a parameter and runs the guardedRemoveDir
logic shown above, then call that helper from bothAfterTargets="Build"
andAfterTargets="Publish"
.This eliminates duplication and centralises the risky path list.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
Flow.Launcher/Flow.Launcher.csproj
(1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: taooceros
PR: Flow-Launcher/Flow.Launcher#2616
File: Flow.Launcher/Flow.Launcher.csproj:7-7
Timestamp: 2024-10-08T15:52:58.573Z
Learning: In the Flow Launcher project, the version number in the `Flow.Launcher.csproj` file is dynamically updated during the CI/CD process.
📚 Learning: in the flow launcher project, the version number in the `flow.launcher.csproj` file is dynamically u...
Learnt from: taooceros
PR: Flow-Launcher/Flow.Launcher#2616
File: Flow.Launcher/Flow.Launcher.csproj:7-7
Timestamp: 2024-10-08T15:52:58.573Z
Learning: In the Flow Launcher project, the version number in the `Flow.Launcher.csproj` file is dynamically updated during the CI/CD process.
Applied to files:
Flow.Launcher/Flow.Launcher.csproj
📚 Learning: when implementing collection item removal operations in flow launcher, always handle index boundarie...
Learnt from: Jack251970
PR: Flow-Launcher/Flow.Launcher#3561
File: Flow.Launcher/ViewModel/SelectBrowserViewModel.cs:53-58
Timestamp: 2025-05-21T10:37:07.696Z
Learning: When implementing collection item removal operations in Flow Launcher, always handle index boundaries carefully. After removing an item from a collection, ensure the updated index remains within valid bounds (>= 0 and < collection.Count) to prevent IndexOutOfRangeExceptions, especially when decrementing indexes.
Applied to files:
Flow.Launcher/Flow.Launcher.csproj
📚 Learning: the `$flowversion` parameter in the `post_build.ps1` script is intentionally left unset for dynamic ...
Learnt from: taooceros
PR: Flow-Launcher/Flow.Launcher#2616
File: Scripts/post_build.ps1:2-5
Timestamp: 2024-10-12T22:14:51.524Z
Learning: The `$flowVersion` parameter in the `post_build.ps1` script is intentionally left unset for dynamic assignment during script execution. The script contains logic to handle cases where this parameter remains unset.
Applied to files:
Flow.Launcher/Flow.Launcher.csproj
📚 Learning: in flow launcher, the updatepluginmanifestasync method in pluginsmanifest.cs already has comprehensi...
Learnt from: Jack251970
PR: Flow-Launcher/Flow.Launcher#3572
File: Flow.Launcher/App.xaml.cs:214-216
Timestamp: 2025-07-06T12:21:37.947Z
Learning: In Flow Launcher, the UpdatePluginManifestAsync method in PluginsManifest.cs already has comprehensive internal try-catch handling that logs exceptions and returns false on failure rather than throwing, making external try-catch wrappers unnecessary.
Applied to files:
Flow.Launcher/Flow.Launcher.csproj
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: gitStream workflow automation
- GitHub Check: gitStream.cm
- GitHub Check: build
This reverts commit 9f5d578.
🥷 Code experts: no user but you matched threshold 10 Jack251970, VictoriousRaptor have most 👩💻 activity in the files. See details
Activity based on git-commit:
Knowledge based on git-blame: ✨ Comment |
Are these unnecessary files introduced by the .Net upgrade? |
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.
Is there a better way to have the project not build these files than to remove them post-build?
Not sure. I noticed this when I was checking another package size issue. |
As far as I know, one another way is to set specific |
Setting |
I remember that this is problematic |
…me_files Remove unnecessary runtime files
Changes
Remove unnecessary runtime files for Flow.Launcher
Size Change
Original:
After: