You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Finally I can do bazel test //dotnet/test/common:AlertsTest-chrome on Windows, and use IDE.
💥 What does this PR do?
Use Runtimes dependency managed by nuget
Determine test web server binary properly on Windows under bazel
🔧 Implementation Notes
💡 Additional Considerations
🔄 Types of changes
Cleanup (formatting, renaming)
Bug fix (backwards compatible)
New feature (non-breaking change which adds functionality and tests!)
Breaking change (fix or feature that would cause existing functionality to change)
PR Type
Bug fix
Description
• Add Windows support for bazel test execution in .NET
• Fix test web server binary path resolution on Windows
• Update dependency management to use nuget Runfiles
Changes walkthrough 📝
Relevant files
Bug fix
TestWebServer.cs
Add Windows executable path resolution
dotnet/test/common/Environment/TestWebServer.cs
• Add Windows-specific path resolution for appserver binary • Use .exe extension for Windows executable path • Maintain cross-platform compatibility with OS detection
Using backslash path separator in Rlocation call may cause issues on non-Windows systems or when paths are processed by cross-platform tools. Consider using forward slashes which work universally in most contexts.
The new Windows-specific path resolution logic is not wrapped in the existing try-catch block, potentially causing unhandled exceptions if the Windows path resolution fails.
✅ Reduce code duplication in pathsSuggestion Impact:The suggestion was implemented with a slightly different approach - the commit extracts the base path into a variable and modifies it conditionally, then uses it once in a single Rlocation call, effectively eliminating the code duplication
Consider storing the base path in a variable to avoid code duplication and make the path easier to maintain. This reduces the risk of typos and makes future path changes simpler.
Why: The suggestion correctly identifies a duplicated string literal for the application path and proposes a valid refactoring. Extracting the common base path into a variable improves code readability and maintainability, which is a good practice.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
Finally I can do
bazel test //dotnet/test/common:AlertsTest-chromeon Windows, and use IDE.💥 What does this PR do?
Runtimesdependency managed by nuget🔧 Implementation Notes
💡 Additional Considerations
🔄 Types of changes
PR Type
Bug fix
Description
• Add Windows support for bazel test execution in .NET
• Fix test web server binary path resolution on Windows
• Update dependency management to use nuget Runfiles
Changes walkthrough 📝
TestWebServer.cs
Add Windows executable path resolutiondotnet/test/common/Environment/TestWebServer.cs
• Add Windows-specific path resolution for appserver binary
• Use .exe
extension for Windows executable path
• Maintain cross-platform
compatibility with OS detection
BUILD.bazel
Update Runfiles dependency managementdotnet/test/common/BUILD.bazel
• Replace rules_dotnet runfiles with nuget Runfiles dependency
• Add
Runfiles framework dependency to test suite
• Update dependency
management approach