Skip to content

Conversation

@angularsen
Copy link
Owner

This refactoring improves the build system's cross-platform compatibility by separating Windows-only NanoFramework builds from the main dotnet CLI builds.

Changes:

  • Split Start-Build into Start-Build (dotnet CLI) and Start-BuildNanoFramework (MSBuild)
  • Split Start-PackNugets into Start-PackNugets (dotnet pack) and Start-PackNugetsNanoFramework (NuGet.exe)
  • Made Start-Build and Start-PackNugets use only dotnet CLI for cross-platform support
  • Updated build.ps1 to conditionally call NanoFramework functions with -IncludeNanoFramework flag
  • Added Visual Studio/MSBuild prerequisite checks to NanoFramework functions
  • Export new functions from build-functions module

This allows the main build to work on any platform with .NET SDK installed, while NanoFramework builds remain optional and Windows-only.

🤖 Generated with Claude Code

This refactoring improves the build system's cross-platform compatibility
by separating Windows-only NanoFramework builds from the main dotnet CLI builds.

Changes:
- Split Start-Build into Start-Build (dotnet CLI) and Start-BuildNanoFramework (MSBuild)
- Split Start-PackNugets into Start-PackNugets (dotnet pack) and Start-PackNugetsNanoFramework (NuGet.exe)
- Made Start-Build and Start-PackNugets use only dotnet CLI for cross-platform support
- Updated build.ps1 to conditionally call NanoFramework functions with -IncludeNanoFramework flag
- Added Visual Studio/MSBuild prerequisite checks to NanoFramework functions
- Export new functions from build-functions module

This allows the main build to work on any platform with .NET SDK installed,
while NanoFramework builds remain optional and Windows-only.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@claude
Copy link

claude bot commented Sep 21, 2025

Code Review

Summary

This refactoring improves cross-platform build support by cleanly separating Windows-specific NanoFramework builds from the main dotnet CLI builds. The changes are well-structured and maintain backward compatibility.

✅ Positive Changes

  • Improved cross-platform support: Main builds now work on any platform with .NET SDK
  • Clear separation of concerns: NanoFramework builds are properly isolated with prerequisite checks
  • Better error handling: Added explicit checks for MSBuild and NuGet.exe availability
  • Maintains backward compatibility: Existing -IncludeNanoFramework flag behavior is preserved

📝 Observations & Suggestions

1. Local settings file included

The PR includes .claude/settings.local.json which appears to be a local configuration file. Consider adding this to .gitignore if it's user-specific.

2. Function export cleanup

Good catch removing the unused Start-NugetRestore from the module exports in Build/build-functions.psm1:185.

3. Enhanced error messages

The new error messages clearly guide users when prerequisites are missing (Visual Studio/MSBuild for NanoFramework builds), which improves developer experience.

✅ No Breaking Changes Detected

  • All existing functionality is preserved
  • The -IncludeNanoFramework parameter still works as before
  • Default behavior (building without NanoFramework) remains unchanged

✅ Code Quality

  • Follows PowerShell conventions consistently
  • Clear function names that indicate their purpose
  • Proper error handling with meaningful exit codes
  • Good use of colored output for user feedback

Performance Considerations

No performance concerns - the refactoring maintains the same build operations, just reorganizes them for better maintainability.

Test Coverage

The changes are to build scripts which are validated through CI/CD pipeline execution. No additional test coverage needed.

Security

No security concerns identified.

Conclusion

This is a well-executed refactoring that improves the build system's maintainability and cross-platform compatibility without introducing breaking changes. The only minor suggestion is to review whether the .claude/settings.local.json file should be committed.

Recommendation: Approve

@angularsen angularsen enabled auto-merge (squash) September 21, 2025 17:29
@angularsen angularsen disabled auto-merge September 21, 2025 17:31
@TekuSP
Copy link
Contributor

TekuSP commented Sep 21, 2025

This should be completed with #1625 as it is right now not publishing all packages.

@codecov
Copy link

codecov bot commented Sep 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96%. Comparing base (ff9acd7) to head (ca44667).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@          Coverage Diff           @@
##           master   #1627   +/-   ##
======================================
  Coverage      96%     96%           
======================================
  Files         322     322           
  Lines       27531   27531           
======================================
  Hits        26488   26488           
  Misses       1043    1043           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@angularsen angularsen merged commit 9ceac5b into master Sep 21, 2025
2 of 3 checks passed
@angularsen angularsen deleted the agl/split-nano branch September 21, 2025 17:36
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.

3 participants