Skip to content

Conversation

@WeihanLi
Copy link
Owner

This pull request upgrades the project to target .NET 10.0 exclusively, updates CI/CD workflows and documentation accordingly, and bumps several package dependencies. It also makes minor code improvements, such as using source-generated regex and removing obsolete code paths. These changes streamline the codebase, modernize dependencies, and ensure consistency across build, test, and documentation environments.

Target framework and documentation updates:

  • The main application (src/HTTPie/HTTPie.csproj) and documentation now require .NET 10.0, dropping support for .NET 8.0. All references to .NET 8.0 in docs, scripts, and comments have been updated to .NET 10.0. ([[1]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-8bff17f2131201163502dcec19289f4495adc734b43dc6d16b82f451ff473e4bL4-R4), [[2]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-227c2c26cb2ee0ce0f46a320fc48fbcbdf21801a57f59161b1d0861e8aad55f5L72-R72), [[3]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-227c2c26cb2ee0ce0f46a320fc48fbcbdf21801a57f59161b1d0861e8aad55f5L90-R90), [[4]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-582c4ab536367db733f7b7aabfc7bfce963b9cfd5dfe3213395baef208d5fa6cL7-R7), [[5]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-582c4ab536367db733f7b7aabfc7bfce963b9cfd5dfe3213395baef208d5fa6cL109-R109), [[6]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-e07635a768df78445382a383db777e92d120f76dfdfc072350e8227f3043b1fdL31-R31), [[7]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-e07635a768df78445382a383db777e92d120f76dfdfc072350e8227f3043b1fdL63-R63), [[8]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-e07635a768df78445382a383db777e92d120f76dfdfc072350e8227f3043b1fdL175-R175), [[9]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-e07635a768df78445382a383db777e92d120f76dfdfc072350e8227f3043b1fdL207-R207), [[10]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-e07635a768df78445382a383db777e92d120f76dfdfc072350e8227f3043b1fdL257-R261), [[11]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-e07635a768df78445382a383db777e92d120f76dfdfc072350e8227f3043b1fdL336-R336), [[12]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-65e13626a132c6aba293eb8057f333cb399753024aea852dab2aeda245a2eae0L377-R381))

CI/CD workflow improvements:

  • All GitHub Actions workflows now use the latest actions/checkout@v6 and actions/setup-dotnet@v5, with .NET version set to 10.0.x. ([[1]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-e056822d796e21174e3de81e3d8a9c0583a268f7ce3fc41f9aee3a9875e707eaL35-R38), [[2]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-e056822d796e21174e3de81e3d8a9c0583a268f7ce3fc41f9aee3a9875e707eaL61-R64), [[3]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-98dad98422cf59793a353f9b6bfe6a129977e92af3d5b4e38f98ae45bcb7560dL29-R33), [[4]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-ca8c2611c79b991c0fbe04fec3c97c14dc83419f5efb1e8a7a96dd51e7df3e2aL13-R15), [[5]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-dc76c78cc67af170fe67a85394624f571af709d9928b2362b7d1cbfb1db5f918L15-L20), [[6]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-d5a2cea578a0446aad66faf31bf1076ae94c9916b1a3374e342272a6300e8344L18-R20), [[7]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-d5a2cea578a0446aad66faf31bf1076ae94c9916b1a3374e342272a6300e8344L31-R33), [[8]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-d5a2cea578a0446aad66faf31bf1076ae94c9916b1a3374e342272a6300e8344L44-R46), [[9]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34L33-R36), [[10]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34L61-R63))

Dependency updates:

  • Several NuGet package dependencies have been updated to their latest versions in Directory.Packages.props, including JsonPath.Net, JsonSchema.Net, System.CommandLine, and xunit.v3. ([Directory.Packages.propsL7-R17](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-5baf5f9e448ad54ab25a091adee0da05d4d228481c9200518fcb1b53a65d4156L7-R17))

Codebase modernization and cleanup:

  • Source-generated regex is now used in ExecuteCommand.cs, and obsolete code paths for .NET 8.0 have been removed from HttpParser.cs and RequestExecutor.cs. ([[1]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-c13d1c9418b546e407c49caba29893fc3db8f0b0e0c3b5098c8a48c319de4e56L19-R19), [[2]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-c13d1c9418b546e407c49caba29893fc3db8f0b0e0c3b5098c8a48c319de4e56L162-L166), [[3]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-c13d1c9418b546e407c49caba29893fc3db8f0b0e0c3b5098c8a48c319de4e56R308-R310), [[4]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-d1602720e36823e69f23eef7bd8a684ff3897554bf4bf786c81585ac387c44c1L47-L50), [[5]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-e84bcaa7dc914dcc821036c6bfeb8320e1c1f04e0d39fb9745cdf17d95aabd7cL26-L30))
  • Minor improvements such as using JsonElement.Parse for schema validation and removing unnecessary usings. ([[1]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-6e3980b26c56098ff40cae15fa281d40937cf751570ba3016cd26378699d6435R10), [[2]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-6e3980b26c56098ff40cae15fa281d40937cf751570ba3016cd26378699d6435L75-R77), [[3]](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-f4d416690eb9926f18bc78ab4be03d6d3fb3b9618cd513b908071e3fda6f65bbL8))

Other improvements:

  • Minor documentation fixes and consolidation of issue links in the README.md. ([README.mdL308-R308](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L308-R308))
  • Version bump to 0.16.0 in build/version.props. ([build/version.propsL4-R4](https://github.com/WeihanLi/dotnet-httpie/pull/130/files#diff-b239f49e3a9bbfba2c871517dae3af9071d49f69645ac44376fbd1812e4bb527L4-R4))

WeihanLi and others added 10 commits November 23, 2025 00:15
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Removed  duplicate bash code block markers from examples.
…ibutes

Co-authored-by: WeihanLi <7604648+WeihanLi@users.noreply.github.com>
Make RequestDataMiddleware AOT-friendly
Copilot AI review requested due to automatic review settings December 16, 2025 13:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR upgrades the project to exclusively target .NET 10.0, modernizes the codebase by removing obsolete .NET 8.0 code paths and implementing source-generated regex, updates CI/CD workflows to use the latest GitHub Actions versions, and bumps several NuGet package dependencies to their latest versions.

Key Changes:

  • Dropped .NET 8.0 support - project now targets only net10.0 (previously multi-targeted net8.0;net10.0)
  • Implemented source-generated regex in ExecuteCommand.cs and removed conditional compilation blocks for .NET 8.0 from HttpParser.cs and RequestExecutor.cs
  • Updated all GitHub Actions workflows to use actions/checkout@v6 and actions/setup-dotnet@v5 with .NET 10.0.x

Reviewed changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/HTTPie/HTTPie.csproj Changed from multi-targeting to single target framework (net10.0 only)
src/HTTPie/Commands/ExecuteCommand.cs Converted to partial class and implemented source-generated regex property pattern
src/HTTPie/Implement/HttpParser.cs Removed NET8_0 conditional compilation code for logger field
src/HTTPie/Implement/RequestExecutor.cs Removed NET8_0 conditional compilation code for logger field
src/HTTPie/Middleware/RequestDataMiddleware.cs Removed RequiresDynamicCode/RequiresUnreferencedCode attributes and added explicit (JsonNode?) casts for .NET 10 compatibility
src/HTTPie/Middleware/JsonSchemaValidationMiddleware.cs Changed to use JsonElement.Parse for schema validation instead of passing string directly
Directory.Packages.props Updated JsonPath.Net (2.1.1→2.2.0), JsonSchema.Net (7.4.0→8.0.3), System.CommandLine (2.0.0→2.0.1), xunit.v3 (3.2.0→3.2.1)
build/version.props Bumped minor version from 15 to 16
docs/articles/installation.md Updated .NET SDK requirement from 8.0 to 10.0
docs/articles/http-requests.md Removed duplicate code block markers
docs/articles/file-execution.md Updated GitHub Actions example to use checkout@v6, setup-dotnet@v5, and dotnet-version 10.0.x
docs/articles/ci-cd-integration.md Updated all .NET version references from 8.0 to 10.0 throughout CI/CD examples
README.md Consolidated duplicate issue links into single entry
.github/workflows/*.yml Updated all workflows to use actions/checkout@v6 and actions/setup-dotnet@v5
.github/workflows/dotnet-outdated.yml Removed .NET 9.0.x from multi-version setup, now only uses 10.0.x
.github/workflows/copilot-setup-steps.yml Simplified to use single .NET version (10.0.x) instead of multi-version setup
.github/copilot-instructions.md Updated documentation to reflect single target framework (net10.0)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@WeihanLi WeihanLi merged commit 74df53b into preview Dec 17, 2025
7 checks passed
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.

2 participants