Skip to content
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

feat: drop support for .NET 6 and 7 #361

Merged
merged 1 commit into from
Jan 28, 2025
Merged

feat: drop support for .NET 6 and 7 #361

merged 1 commit into from
Jan 28, 2025

Conversation

naomi-lgbt
Copy link
Contributor

@naomi-lgbt naomi-lgbt commented Jan 28, 2025

Proposed changes

Types of changes

What types of changes does your code introduce to the community .NET SDK?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update or tests (if none of the other choices apply)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc
  • I have lint'ed all of my code using repo standards
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

Summary by CodeRabbit

  • Framework Update

    • Upgraded project target frameworks from .NET 6.0 to .NET 8.0 across multiple projects
    • Removed support for .NET 6.0 and .NET 7.0 versions
    • Updated README and documentation to reflect new framework support
  • Dependency Management

    • Added Microsoft.Extensions.Http package reference (version 8.0.0) to many example and test projects
    • Updated package references to version 8.* for various dependencies
  • Documentation

    • Updated project documentation to focus on .NET 8.0 support
    • Removed references to older .NET framework versions in README files

Copy link
Contributor

coderabbitai bot commented Jan 28, 2025

Walkthrough

This pull request represents a comprehensive upgrade of the Deepgram SDK to .NET 8.0. The changes systematically update the project's target frameworks, dependencies, and configuration files across multiple projects, removing support for .NET 6.0 and .NET 7.0. The upgrade involves modifying Dockerfiles, project files (.csproj), README documentation, and example projects to align with the latest .NET framework version.

Changes

File/Path Change Summary
.devcontainer/Dockerfile Updated .NET version from 6.0-bullseye-slim to 8.0
.github/CODE_CONTRIBUTIONS_GUIDE.md Updated framework migration instructions
Deepgram.Microphone/Deepgram.Microphone.csproj Removed .NET 6.0 and 7.0 support, updated package references to version 8.*
Deepgram.Tests/Deepgram.Tests.csproj Updated target framework to .NET 8.0
Deepgram/Deepgram.csproj Removed .NET 6.0 and 7.0 support, updated package references to version 8.*
README.md Removed support for .NET 6.0 and 7.0
examples/* Updated target frameworks to .NET 8.0, added Microsoft.Extensions.Http package reference
tests/* Updated target frameworks to .NET 8.0

Possibly related PRs


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a 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 (3)
examples/manage/balances/Manage.csproj (1)

5-5: LGTM! Changes align with the .NET 8.0 upgrade pattern.

The target framework upgrade and package reference addition are consistent with other projects in this PR.

Important: Consider these aspects of the .NET 8.0 upgrade:

  1. Update CI/CD pipelines to use .NET 8.0 SDK
  2. Review and update any GitHub Actions workflows
  3. Update Docker base images to .NET 8.0
  4. Document breaking changes and migration steps in README
  5. Update minimum requirements in documentation

Would you like me to help generate the necessary updates for any of these items?

Also applies to: 11-11

examples/speech-to-text/websocket/http/Streaming.csproj (1)

Line range hint 11-13: Consider adding Microsoft.Extensions.Http package.

Since this is an HTTP-based example, consider adding the Microsoft.Extensions.Http package that's being used in other projects:

  <ItemGroup>
    <ProjectReference Include="..\..\..\..\Deepgram\Deepgram.csproj" />
+   <PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
  </ItemGroup>
examples/speech-to-text/rest/sentiment/PreRecorded.csproj (1)

Line range hint 11-11: Consider using version ranges for package references

The exact version 8.0.0 might be too restrictive. Consider using version ranges (e.g., 8.0.*) to automatically get bug fixes while staying within the same minor version.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4c9955d and 1d30f53.

⛔ Files ignored due to path filters (4)
  • .devcontainer/devcontainer.json is excluded by !**/*.json
  • .github/workflows/CD-dev.yml is excluded by !**/*.yml
  • .github/workflows/CD.yml is excluded by !**/*.yml
  • .github/workflows/CI.yml is excluded by !**/*.yml
📒 Files selected for processing (40)
  • .devcontainer/Dockerfile (1 hunks)
  • .github/CODE_CONTRIBUTIONS_GUIDE.md (2 hunks)
  • Deepgram.Microphone/Deepgram.Microphone.csproj (2 hunks)
  • Deepgram.Tests/Deepgram.Tests.csproj (1 hunks)
  • Deepgram/Deepgram.csproj (2 hunks)
  • Deepgram/README.md (0 hunks)
  • README.md (0 hunks)
  • examples/analyze/intent/Analyze.csproj (1 hunks)
  • examples/analyze/sentiment/Analyze.csproj (1 hunks)
  • examples/analyze/summary/Analyze.csproj (1 hunks)
  • examples/analyze/topic/Analyze.csproj (1 hunks)
  • examples/manage/balances/Manage.csproj (1 hunks)
  • examples/manage/invitations/Manage.csproj (1 hunks)
  • examples/manage/keys/Manage.csproj (1 hunks)
  • examples/manage/members/Manage.csproj (1 hunks)
  • examples/manage/models/Models.csproj (1 hunks)
  • examples/manage/projects/Manage.csproj (1 hunks)
  • examples/manage/scopes/Manage.csproj (1 hunks)
  • examples/manage/usage/Manage.csproj (1 hunks)
  • examples/speech-to-text/rest/file/PreRecorded.csproj (1 hunks)
  • examples/speech-to-text/rest/intent/PreRecorded.csproj (1 hunks)
  • examples/speech-to-text/rest/sentiment/PreRecorded.csproj (1 hunks)
  • examples/speech-to-text/rest/summary/PreRecorded.csproj (1 hunks)
  • examples/speech-to-text/rest/topic/PreRecorded.csproj (1 hunks)
  • examples/speech-to-text/rest/url/PreRecorded.csproj (1 hunks)
  • examples/speech-to-text/websocket/file/Streaming.csproj (1 hunks)
  • examples/speech-to-text/websocket/http/Streaming.csproj (1 hunks)
  • examples/speech-to-text/websocket/microphone/Streaming.csproj (1 hunks)
  • examples/text-to-speech/rest/file/hello-world/Speak.csproj (1 hunks)
  • examples/text-to-speech/rest/file/woodchuck/Speak.csproj (1 hunks)
  • examples/text-to-speech/websocket/simple/Speak.csproj (1 hunks)
  • tests/edge_cases/keepalive/KeepAlive.csproj (1 hunks)
  • tests/edge_cases/reconnect_same_object/ReconnectStreaming.csproj (1 hunks)
  • tests/edge_cases/string_parsing/StringParsing.csproj (1 hunks)
  • tests/edge_cases/stt_v1_client_example/Streaming.csproj (1 hunks)
  • tests/edge_cases/tts_v1_client_example/Speak.csproj (1 hunks)
  • tests/expected_failures/rest/bad_host/BadHost.csproj (1 hunks)
  • tests/expected_failures/rest/throw_exception/ThrowException.csproj (1 hunks)
  • tests/expected_failures/rest/trigger_cancel/TriggerCancel.csproj (1 hunks)
  • tests/expected_failures/websocket/exercise_timeout/ExerciseTimeout.csproj (1 hunks)
💤 Files with no reviewable changes (2)
  • README.md
  • Deepgram/README.md
✅ Files skipped from review due to trivial changes (3)
  • tests/expected_failures/rest/bad_host/BadHost.csproj
  • .github/CODE_CONTRIBUTIONS_GUIDE.md
  • tests/edge_cases/keepalive/KeepAlive.csproj
🔇 Additional comments (40)
examples/text-to-speech/rest/file/woodchuck/Speak.csproj (1)

5-5: Verify compatibility with dependent packages and runtime requirements.

The upgrade to .NET 8.0 is a breaking change that requires users to have the .NET 8.0 SDK installed. This should be clearly documented in the README and release notes.

Consider:

  1. Adding minimum SDK version requirements to the README
  2. Documenting the migration path for users
  3. Testing with all dependent packages to ensure compatibility
tests/expected_failures/websocket/exercise_timeout/ExerciseTimeout.csproj (1)

5-5: Validate timeout behavior in .NET 8.0.

Since this is a test for expected failures, ensure that the timeout behavior remains consistent with .NET 8.0's networking stack changes.

Run the following script to check for any timeout-related changes in .NET 8.0:

✅ Verification successful

Test remains valid after .NET 8.0 upgrade

The timeout test is version-agnostic as it relies on server-side timeout behavior and uses stable .NET APIs (WebSocket, Task.Delay). The upgrade to .NET 8.0 won't affect the test's validity.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for timeout-related code and tests
rg -l "timeout|Timer|CancellationToken" --type cs

Length of output: 1964


Script:

#!/bin/bash
# Examine the timeout test implementation
cat tests/expected_failures/websocket/exercise_timeout/Program.cs

Length of output: 2679

tests/expected_failures/rest/trigger_cancel/TriggerCancel.csproj (1)

5-5: Verify cancellation behavior in .NET 8.0.

Ensure that the cancellation test coverage remains valid with .NET 8.0's task and cancellation token handling.

Run the following script to analyze cancellation-related code:

✅ Verification successful

Cancellation test remains valid in .NET 8.0

The test uses standard .NET cancellation patterns (CancellationTokenSource and OperationCanceledException) that are stable across .NET versions. The implementation doesn't rely on version-specific features, ensuring compatibility with .NET 8.0.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for cancellation-related code and tests
rg -l "Cancel|CancellationToken|TaskCanceledException" --type cs

Length of output: 1687


Script:

#!/bin/bash
# Examine the cancellation test
cat tests/expected_failures/rest/trigger_cancel/Program.cs

Length of output: 1728

tests/edge_cases/string_parsing/StringParsing.csproj (1)

5-5: Review string handling changes in .NET 8.0.

Verify that the string parsing edge cases remain valid, considering any changes to string handling in .NET 8.0.

Run the following script to analyze string parsing tests:

✅ Verification successful

String parsing tests remain valid for .NET 8.0

The string parsing edge cases in this test focus on basic string operations that are stable across .NET versions. The test validates text-to-speech input handling using standard string features that haven't changed in .NET 8.0.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for string parsing related code and tests
rg -l "Parse|ToString|Encoding|Decode" --type cs

Length of output: 8853


Script:

#!/bin/bash
# Examine string parsing test implementation
cat tests/edge_cases/string_parsing/Program.cs

Length of output: 7126

tests/edge_cases/reconnect_same_object/ReconnectStreaming.csproj (1)

5-5: Verify connection handling in .NET 8.0.

Ensure that the reconnection test coverage remains valid with .NET 8.0's networking stack changes.

Run the following script to analyze connection-related code:

✅ Verification successful

Reconnection test remains valid with .NET 8.0

The test implementation uses standard WebSocket patterns and basic async/await functionality that are stable across .NET versions. No .NET 8.0-specific networking features are utilized that would affect the test's behavior.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for connection-related code and tests
rg -l "Connect|Disconnect|WebSocket|HttpClient" --type cs

Length of output: 7931


Script:

#!/bin/bash
# Examine the reconnection test implementation
cat tests/edge_cases/reconnect_same_object/Program.cs

Length of output: 4725

examples/speech-to-text/websocket/microphone/Streaming.csproj (2)

5-5: Verify .NET 8.0 compatibility across project references.

The target framework upgrade looks good, but please ensure that the referenced projects (Deepgram.Microphone and Deepgram) are also compatible with .NET 8.0 to avoid runtime issues.

✅ Verification successful

Framework compatibility verified successfully

Both referenced projects (Deepgram.Microphone and Deepgram) explicitly support .NET 8.0, ensuring full compatibility across the solution.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check target frameworks of referenced projects
echo "Checking Deepgram.Microphone.csproj:"
rg "<TargetFramework" "Deepgram.Microphone/Deepgram.Microphone.csproj"
echo -e "\nChecking Deepgram.csproj:"
rg "<TargetFramework" "Deepgram/Deepgram.csproj"

Length of output: 395


Line range hint 11-13: Consider adding Microsoft.Extensions.Http package for consistency.

Other projects in this PR include the Microsoft.Extensions.Http package. Consider adding it here for consistency if HTTP functionality is needed.

tests/expected_failures/rest/throw_exception/ThrowException.csproj (1)

5-5: Verify test framework compatibility with .NET 8.0.

The upgrade to .NET 8.0 and Microsoft.Extensions.Http 8.0.0 looks good. However, since this is a test project, please ensure all test frameworks and testing packages are also compatible with .NET 8.0.

Also applies to: 11-11

examples/speech-to-text/rest/url/PreRecorded.csproj (1)

5-5: LGTM! Changes align with the .NET 8.0 upgrade pattern.

The target framework upgrade and package reference addition are consistent with other projects in this PR.

Also applies to: 11-11

examples/manage/scopes/Manage.csproj (1)

5-5: LGTM! Changes align with the .NET 8.0 upgrade pattern.

The target framework upgrade and package reference addition are consistent with other projects in this PR.

Also applies to: 11-11

examples/manage/models/Models.csproj (2)

5-5: Breaking Change: Upgrade to .NET 8.0

The target framework upgrade from .NET 6.0 to .NET 8.0 is a breaking change that drops support for older .NET versions. While .NET 8.0 is the latest LTS release, this change requires users to upgrade their runtime environment.

Consider:

  1. Documenting this breaking change in CHANGELOG.md
  2. Updating the minimum requirements in README.md
  3. Adding migration guides for users

Line range hint 11-11: Package version aligns with target framework

The Microsoft.Extensions.Http package version 8.0.0 correctly aligns with the .NET 8.0 target framework.

tests/edge_cases/tts_v1_client_example/Speak.csproj (1)

5-5: LGTM: Consistent with SDK upgrade

The changes align with the SDK-wide upgrade to .NET 8.0.

Also applies to: 11-11

examples/manage/invitations/Manage.csproj (1)

5-5: LGTM: Consistent with SDK upgrade

The changes align with the SDK-wide upgrade to .NET 8.0.

Also applies to: 11-11

examples/manage/members/Manage.csproj (1)

5-5: LGTM: Consistent with SDK upgrade

The changes align with the SDK-wide upgrade to .NET 8.0.

Also applies to: 11-11

examples/manage/projects/Manage.csproj (1)

5-5: LGTM: Consistent with SDK upgrade

The changes align with the SDK-wide upgrade to .NET 8.0.

Let's verify the broader impact of this upgrade:

Also applies to: 11-11

✅ Verification successful

Framework upgrade verification successful

All projects are properly configured for .NET 8.0, and package references are compatible with the new framework version. The dual targeting (net8.0;netstandard2.0) in some projects maintains backward compatibility while supporting .NET 8.0.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify consistency of .NET 8.0 upgrade across all project files

# Check if any project files still target older frameworks
echo "Checking for inconsistent target frameworks..."
fd -e csproj -x grep -l "TargetFramework.*net[67]\.0"

# Check if any package references use incompatible versions
echo "Checking for incompatible package versions..."
fd -e csproj -x grep -l "PackageReference.*Version=\"[0-7]\."

Length of output: 437


Script:

#!/bin/bash
# Description: Examine package references in the identified projects
echo "Package references in Deepgram.Tests.csproj:"
cat Deepgram.Tests/Deepgram.Tests.csproj

echo -e "\nPackage references in Deepgram.Microphone.csproj:"
cat Deepgram.Microphone/Deepgram.Microphone.csproj

echo -e "\nPackage references in Deepgram.csproj:"
cat Deepgram/Deepgram.csproj

Length of output: 12616

examples/manage/keys/Manage.csproj (2)

5-5: Framework upgrade looks good.

The upgrade to .NET 8.0 is consistent with the SDK-wide upgrade initiative.


Line range hint 11-11: Verify package compatibility with referenced projects.

The Microsoft.Extensions.Http package version 8.0.0 aligns with the framework version. However, we should verify compatibility with the referenced Deepgram project.

✅ Verification successful

✓ Package version 8.0.0 is compatible with referenced projects

The Microsoft.Extensions.Http package version 8.0.0 is compatible with the Deepgram project, which accepts any 8.x version. All projects are consistently targeting .NET 8.0.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check target frameworks in referenced projects
rg -l "<TargetFramework.*net8.0.*</TargetFramework>" Deepgram/

Length of output: 64


Script:

#!/bin/bash
# Find all .csproj files
echo "=== Finding .csproj files ==="
fd -e csproj

# Check target frameworks in all project files
echo -e "\n=== Checking target frameworks ==="
fd -e csproj -x cat {}

# Check package references
echo -e "\n=== Checking package references ==="
fd -e csproj -x grep -l "PackageReference.*Microsoft.Extensions.Http" {}

Length of output: 32909

examples/manage/usage/Manage.csproj (1)

5-5: Changes match the upgrade pattern.

The framework and package updates are consistent with the SDK-wide upgrade.

Also applies to: 11-11

examples/text-to-speech/websocket/simple/Speak.csproj (1)

5-5: Framework and package updates are consistent.

The changes align with the SDK-wide upgrade to .NET 8.0.

Also applies to: 11-11

✅ Verification successful

All project references are compatible with .NET 8.0

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify all project references are compatible
find . -name "*.csproj" -exec grep -l "<ProjectReference.*Deepgram.csproj" {} \; | while read proj; do
  echo "Checking $proj..."
  grep -A1 "<TargetFramework" "$proj"
done

Length of output: 10919

examples/text-to-speech/rest/file/hello-world/Speak.csproj (1)

5-5: Consistent upgrade pattern continues.

The changes maintain consistency with the SDK-wide upgrade to .NET 8.0.

Since this is a major framework upgrade, we should verify breaking changes:

Also applies to: 11-11

✅ Verification successful

No breaking changes found in the hello-world example.

The upgrade to .NET 8.0 in this example project is clean with no compatibility issues. The code and its dependencies are properly aligned with .NET 8.0.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for potential breaking changes in code
rg -l "ObsoleteAttribute|[Deprecated]|// TODO:|// FIXME:" --type csharp

Length of output: 17855


Script:

#!/bin/bash
# Check for breaking changes specifically in the hello-world example
rg "ObsoleteAttribute|[Deprecated]|// TODO:|// FIXME:" "examples/text-to-speech/rest/file/hello-world/" -A 2

# Check for .NET 8.0 specific warnings or breaking changes
rg "net8\.0|netcoreapp" -g "*.cs*" "examples/text-to-speech/rest/file/hello-world/" -A 2

Length of output: 5399

tests/edge_cases/stt_v1_client_example/Streaming.csproj (1)

5-5: Verify if Microsoft.Extensions.Http package is needed.

While the framework upgrade is consistent, this project doesn't include the Microsoft.Extensions.Http package that was added to other projects. Please verify if this package is required for consistency.

examples/speech-to-text/websocket/http/Streaming.csproj (1)

5-5: Framework upgrade looks good.

The update to .NET 8.0 aligns with the SDK-wide upgrade initiative.

examples/speech-to-text/websocket/file/Streaming.csproj (1)

5-5: Framework upgrade looks good.

The update to .NET 8.0 aligns with the SDK-wide upgrade initiative.

examples/analyze/sentiment/Analyze.csproj (1)

5-5: Framework and package updates look good.

The update to .NET 8.0 and addition of Microsoft.Extensions.Http 8.0.0 are consistent with the SDK-wide upgrade.

Also applies to: 11-11

examples/analyze/intent/Analyze.csproj (1)

5-5: Framework and package updates look good.

The update to .NET 8.0 and addition of Microsoft.Extensions.Http 8.0.0 are consistent with the SDK-wide upgrade.

Also applies to: 11-11

examples/analyze/summary/Analyze.csproj (2)

5-5: Framework and package updates look good.

The update to .NET 8.0 and addition of Microsoft.Extensions.Http 8.0.0 are consistent with the SDK-wide upgrade.

Also applies to: 11-11


Line range hint 1-30: Verify broader upgrade implications.

Since this is a major framework upgrade, please ensure:

  1. Breaking changes are documented in README
  2. CI/CD pipelines are updated for .NET 8.0
  3. Minimum requirements are updated in documentation

Let's verify the documentation and pipeline updates:

✅ Verification successful

All upgrade requirements are properly addressed

The upgrade to .NET 8.0 has been properly implemented across the codebase:

  • Documentation lists .NET 8.0.x under supported frameworks
  • All CI/CD pipelines are configured for .NET 8.0
  • Build and test environments are properly set up
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for .NET version updates in documentation and workflows
echo "Checking documentation updates..."
rg -l "net6\.0|net7\.0" . --type md

echo "Checking workflow updates..."
rg -l "net6\.0|net7\.0" .github/workflows/

Length of output: 247


Script:

#!/bin/bash
# Check README content and look for additional documentation
echo "=== README.md content ==="
cat ./Deepgram/README.md

echo -e "\n=== Checking for workflow files ==="
ls -la .github/workflows/

echo -e "\n=== Looking for additional documentation files ==="
fd -e md -e txt --exclude node_modules

Length of output: 29079


Script:

#!/bin/bash
# Check workflow files content
echo "=== CD-dev.yml ==="
cat .github/workflows/CD-dev.yml

echo -e "\n=== CD.yml ==="
cat .github/workflows/CD.yml

echo -e "\n=== CI.yml ==="
cat .github/workflows/CI.yml

Length of output: 4760

examples/analyze/topic/Analyze.csproj (2)

5-5: Verify .NET 8.0 upgrade impact.

The upgrade to .NET 8.0 is a breaking change that drops support for .NET 6.0. Ensure all consumers of this example are aware of the minimum framework requirement.

Consider documenting the minimum .NET version requirement in the README and any breaking changes in the upgrade guide.


Line range hint 11-11: LGTM! Package version aligns with target framework.

The Microsoft.Extensions.Http package version (8.0.0) correctly matches the target framework version.

examples/speech-to-text/rest/summary/PreRecorded.csproj (2)

5-5: Consistent framework upgrade across example projects.

The target framework upgrade to .NET 8.0 is consistently applied across all PreRecorded.csproj files, which is good for maintaining parity.

Run this script to verify framework consistency across all project files:

✅ Verification successful

Framework version consistency verified across all projects

All .csproj files in the repository consistently target .NET 8.0, confirming proper framework version alignment across the entire codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify target framework consistency across all .csproj files
# Expected: All projects should target net8.0

echo "Checking target framework versions..."
find . -name "*.csproj" -exec grep -l "<TargetFramework>" {} \; | while read -r file; do
    echo "File: $file"
    grep "<TargetFramework>" "$file"
done

Length of output: 9131


Line range hint 11-11: LGTM! Consistent HTTP package reference.

The Microsoft.Extensions.Http package (v8.0.0) is consistently added across all example projects, which is good for maintaining dependency parity.

Run this script to verify package reference consistency:

✅ Verification successful

✅ Package reference consistency verified

All example projects consistently use Microsoft.Extensions.Http v8.0.0, while core libraries appropriately use Microsoft.Extensions.Http.Polly v8.* for enhanced resilience features. This maintains both functional and version consistency across the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify Microsoft.Extensions.Http package version consistency
# Expected: All projects should reference version 8.0.0

echo "Checking Microsoft.Extensions.Http versions..."
find . -name "*.csproj" -exec grep -l "Microsoft.Extensions.Http" {} \; | while read -r file; do
    echo "File: $file"
    grep "Microsoft.Extensions.Http" "$file"
done

Length of output: 7261

Deepgram/Deepgram.csproj (2)

4-4: Breaking Change: Removal of .NET 6.0 and 7.0 support

This change drops support for .NET 6.0 and 7.0, keeping only .NET 8.0 and .NET Standard 2.0. This is a breaking change that needs to be clearly communicated in:

  1. Release notes
  2. Documentation
  3. Migration guide

Would you like me to help draft the migration guide and update the documentation?


60-70: Verify package compatibility with .NET Standard 2.0

The package versions have been updated to 8.*, which might introduce compatibility issues with .NET Standard 2.0 targets. Let's verify the compatibility.

✅ Verification successful

Package updates are compatible with .NET Standard 2.0

All packages with version 8.* explicitly support .NET Standard 2.0, maintaining backward compatibility. The update is safe to proceed.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check package compatibility with .NET Standard 2.0
# Install nuget.exe if needed and verify package compatibility

echo "Checking package compatibility..."
for package in \
  "Microsoft.CodeAnalysis.NetAnalyzers" \
  "Microsoft.Extensions.DependencyInjection.Abstractions" \
  "Microsoft.Extensions.Logging" \
  "Microsoft.Extensions.Logging.Abstractions" \
  "Microsoft.Extensions.Http.Polly" \
  "System.Text.Json" \
  "System.Threading.Channels"; do
  curl -s "https://api.nuget.org/v3/registration5-semver1/$package/index.json" | \
    jq -r '.items[0].items[].catalogEntry | select(.version | startswith("8.")) | {version: .version, dependencies: .dependencyGroups[].targetFramework}'
done

Length of output: 4120


Script:

#!/bin/bash
# Install required Python package
pip install requests

python << 'EOF'
import requests
import json

packages = [
    "Microsoft.CodeAnalysis.NetAnalyzers",
    "Microsoft.Extensions.DependencyInjection.Abstractions",
    "Microsoft.Extensions.Logging",
    "Microsoft.Extensions.Logging.Abstractions",
    "Microsoft.Extensions.Http.Polly",
    "System.Text.Json",
    "System.Threading.Channels"
]

def check_package(package):
    url = f"https://api.nuget.org/v3/registration5-gz-semver2/{package.lower()}/index.json"
    try:
        response = requests.get(url)
        if response.status_code == 200:
            data = response.json()
            # Get the latest 8.x version
            versions = [item for page in data['items'] for item in page['items']]
            v8_versions = [v for v in versions if v['catalogEntry']['version'].startswith('8.')]
            if v8_versions:
                latest = v8_versions[-1]['catalogEntry']
                frameworks = [group['targetFramework'] for group in latest.get('dependencyGroups', [])]
                print(f"\nPackage: {package}")
                print(f"Version: {latest['version']}")
                print(f"Supported frameworks: {frameworks}")
    except Exception as e:
        print(f"Error checking {package}: {str(e)}")

for package in packages:
    check_package(package)
EOF

Length of output: 1331


Script:

#!/bin/bash
# Install required Python package
pip install requests

python << 'EOF'
import requests
import json

packages = [
    "Microsoft.Extensions.Logging",
    "Microsoft.Extensions.Logging.Abstractions",
    "Microsoft.Extensions.Http.Polly",
    "System.Text.Json"
]

def check_package(package):
    # Using index.json from v3-flatcontainer
    url = f"https://api.nuget.org/v3-flatcontainer/{package.lower()}/index.json"
    try:
        response = requests.get(url)
        if response.status_code == 200:
            versions = response.json()['versions']
            v8_versions = [v for v in versions if v.startswith('8.')]
            if v8_versions:
                latest_v8 = v8_versions[-1]
                # Get nuspec for the latest version
                nuspec_url = f"https://api.nuget.org/v3-flatcontainer/{package.lower()}/{latest_v8}/{package.lower()}.nuspec"
                nuspec_response = requests.get(nuspec_url)
                if nuspec_response.status_code == 200:
                    print(f"\nPackage: {package}")
                    print(f"Version: {latest_v8}")
                    print("Raw nuspec content (check for framework dependencies):")
                    print(nuspec_response.text[:500])  # Print first 500 chars to check framework info
    except Exception as e:
        print(f"Error checking {package}: {str(e)}")

for package in packages:
    check_package(package)
EOF

Length of output: 3118


Script:

#!/bin/bash
pip install requests lxml

python << 'EOF'
import requests
from lxml import etree

packages = [
    "Microsoft.Extensions.Logging",
    "Microsoft.Extensions.Logging.Abstractions",
    "Microsoft.Extensions.Http.Polly",
    "System.Text.Json"
]

def check_package(package):
    try:
        # Get latest 8.x version
        index_url = f"https://api.nuget.org/v3-flatcontainer/{package.lower()}/index.json"
        versions = requests.get(index_url).json()['versions']
        latest_v8 = [v for v in versions if v.startswith('8.')][-1]
        
        # Get and parse nuspec
        nuspec_url = f"https://api.nuget.org/v3-flatcontainer/{package.lower()}/{latest_v8}/{package.lower()}.nuspec"
        nuspec_content = requests.get(nuspec_url).content
        
        # Parse XML
        root = etree.fromstring(nuspec_content)
        ns = {'ns': 'http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd'}
        
        print(f"\nPackage: {package}")
        print(f"Version: {latest_v8}")
        
        # Find dependencies and framework groups
        dep_groups = root.findall('.//ns:dependencies/ns:group', ns)
        if dep_groups:
            print("Target Frameworks:")
            for group in dep_groups:
                tf = group.get('targetFramework')
                if tf:
                    print(f"- {tf}")
        
    except Exception as e:
        print(f"Error checking {package}: {str(e)}")

for package in packages:
    check_package(package)
EOF

Length of output: 1447

Deepgram.Tests/Deepgram.Tests.csproj (1)

4-4: LGTM: Test project successfully upgraded to .NET 8.0

The test project has been correctly upgraded to target .NET 8.0. All test package references are compatible with the new target framework.

Deepgram.Microphone/Deepgram.Microphone.csproj (1)

4-4: LGTM: Consistent with main project changes

The changes in this project file mirror those in the main Deepgram.csproj, maintaining consistency across the solution.

Also applies to: 60-70

examples/speech-to-text/rest/file/PreRecorded.csproj (1)

5-5: Verify example project functionality

The example project has been upgraded to .NET 8.0. Please ensure:

  1. The example still works as expected
  2. The README is updated to reflect the new .NET version requirement
  3. The new Microsoft.Extensions.Http package dependency is documented
.devcontainer/Dockerfile (1)

4-4: Verify development container configuration

The base image has been updated to .NET 8.0, but the specific variant designation (bullseye-slim) has been removed. Please verify:

  1. If removing the variant designation is intentional
  2. If the development container still builds and works as expected
  3. If any development workflow documentation needs updating
✅ Verification successful

Base image configuration is correct and follows best practices

Using 8.0 without a specific variant designation is actually preferred as it:

  • Automatically uses the default tag maintained by the .NET team
  • Allows seamless updates to newer base OS versions
  • Follows Docker best practices for development containers
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify if the base image exists and supports development features
curl -s "https://mcr.microsoft.com/v2/vscode/devcontainers/dotnet/tags/list" | jq '.tags[] | select(contains("8.0"))'

Length of output: 2075

examples/speech-to-text/rest/intent/PreRecorded.csproj (1)

Line range hint 5-11: Verify consistency across all example projects

Changes match the sentiment example. Let's verify that all example projects are consistently upgraded.

✅ Verification successful

All example projects show consistent configuration

All projects are correctly targeting .NET 8.0, and the Microsoft.Extensions.Http package is consistently versioned at 8.0.0 where it's used. The websocket-based projects naturally don't include this package as they use different dependencies for real-time communication.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check target framework and package references in all example projects
echo "Checking target frameworks in example projects:"
find examples -name "*.csproj" -exec grep -H "TargetFramework" {} \;

echo -e "\nChecking Microsoft.Extensions.Http package references:"
find examples -name "*.csproj" -exec grep -H "Microsoft.Extensions.Http" {} \;

Length of output: 4984

examples/speech-to-text/rest/topic/PreRecorded.csproj (1)

Line range hint 5-11: Review overall SDK upgrade strategy

Given that this PR is marked as "DO NOT MERGE" and involves a major framework upgrade, consider:

  1. Phased Approach:

    • Consider maintaining dual support for both .NET 6.0 and 8.0 temporarily
    • Use conditional compilation or multi-targeting
    • Plan deprecation timeline for .NET 6.0 support
  2. Documentation:

    • Update installation instructions
    • Add upgrade guide
    • Document breaking changes
  3. Testing:

    • Ensure all examples are tested with .NET 8.0
    • Add integration tests
    • Update CI/CD pipelines

@@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

⚠️ Document Breaking Change: .NET 8.0 Upgrade

While the README mentions .NET 8.0 requirement, additional documentation is needed:

  • Create a CHANGELOG.md to track breaking changes
  • Add migration guide with upgrade instructions from .NET 6.0
  • Include any API changes or behavioral differences introduced by .NET 8.0
🔗 Analysis chain

⚠️ Breaking Change: Upgrade to .NET 8.0

This change drops support for .NET 6.0. Users will need to upgrade their runtime to .NET 8.0. Consider:

  1. Documenting this breaking change in release notes
  2. Updating SDK's minimum requirements in README
  3. Adding migration guide for users
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if README mentions .NET 8.0 requirement
rg -i "net.*8.0|dotnet.*8" README.md

Length of output: 49


Script:

#!/bin/bash
# Check for migration/upgrade guide
rg -i "migrat|upgrad" -g "!{node_modules,dist,build}/*" --type md

Length of output: 67


Script:

#!/bin/bash
# Look for changelog or release notes files
fd -i "changelog|release.*notes|breaking.*changes" --type f

Length of output: 61

@naomi-lgbt naomi-lgbt changed the title DO NOT MERGE feat: drop support for .NET 6 and 7 Jan 28, 2025
Copy link
Contributor

@jpvajda jpvajda left a comment

Choose a reason for hiding this comment

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

LGTM

@naomi-lgbt naomi-lgbt merged commit 7fc1b22 into main Jan 28, 2025
3 checks passed
@naomi-lgbt naomi-lgbt deleted the feat/no-6 branch January 28, 2025 22:54
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