Clean up obsolete net7 test conditionals while preserving Classic compatibility#1720
Clean up obsolete net7 test conditionals while preserving Classic compatibility#1720
Conversation
Co-authored-by: tg123 <170430+tg123@users.noreply.github.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: Copilot The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
@copilot will Classic work? |
Co-authored-by: tg123 <170430+tg123@users.noreply.github.com>
Yes — Classic still works after the latest fix. I restored the required framework guards in the shared files compiled by Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
The codebase contained framework-conditional branches that no longer affect currently targeted test frameworks, but some shared runtime files are also compiled by
KubernetesClient.Classic(netstandard2.0;net48) and must keep their guards.This PR now focuses on safe dead-code cleanup without breaking Classic.
Framework-conditional cleanup in tests
#if NET7_0_OR_GREATERwrappers in:tests/KubernetesClient.Tests/KubernetesJsonTests.cstests/KubernetesClient.Tests/KubernetesYamlTests.csClassic compatibility correction (follow-up feedback)
src/KubernetesClient/KubernetesJson.cssrc/KubernetesClient/Models/V1Status.ObjectView.cssrc/KubernetesClient/Watcher.csKubernetesClient.Classicbuildable while retaining the test-side cleanup.Validation
KubernetesClient.Classicsuccessfully.SimpleTests) successfully.KubernetesClient.TestsJSON/YAML datetime tests successfully.> [!WARNING]
>
>
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.