Skip to content

Conversation

@Sicos1977
Copy link
Contributor

Updated to the final 4.12 version

Kees and others added 7 commits December 11, 2024 08:44
The project has been updated to target .NET 8.0, replacing .NET Core 3.1 and .NET Framework 4.6.x across multiple project files.

Dependencies in `packages.lock.json` have been updated to their latest versions, including changes to `contentHash` values. The `MirrorSharp.AspNetCore` and `MirrorSharp.Owin` projects have had their dependencies streamlined, with some removed and others added, such as `Microsoft.IO.Redist` and `System.Diagnostics.EventLog`.

Additionally, `System.Security.Cryptography` packages have been updated, and `System.IO.Pipelines` has been upgraded to version 9.0.0. The `System.Buffers` and `System.Memory` packages have also been updated to newer versions, ensuring compatibility with the updated target framework.
Introduces the `MirrorSharp.Internal.Roslyn414` namespace to support version 4.14 of internal Roslyn components. Updates assembly loading logic in `RoslynInternals.cs` and adds a new project file `Internal.Roslyn414.csproj` with dependencies on Microsoft.CodeAnalysis 4.14.0.

New classes for code actions, diagnostics, and signature help have been added, enhancing functionality. The `packages.lock.json` and solution file `MirrorSharp.sln` have been updated to include the new project and its dependencies, improving overall maintainability.
Corrected the variable name `SingatureHelpProviderResolver` to `SignatureHelpProviderResolver` in the `RoslynInternals` class. This change was applied in the constructor, property declaration, and usage in the `RoslynLanguageBase` class to ensure consistency and maintainability.
This commit changes the target framework from `net8.0` to `net6.0` across multiple files, including `packages.lock.json` and `AspNetCore.csproj`. New dependencies have been added, such as `MirrorSharp.Common` with a version constraint of `[3.0.10, )`, while several existing dependencies, including `System.Text.Json` and `System.IO.Pipelines`, have been downgraded from `9.0.5` to `9.0.2`.

Additionally, the `Tests.csproj` file has been updated to target `net48`, and nullable reference types have been enabled in the `PublicAPI.Shipped.txt` file. Comments in `SignatureHelpProviderWrapper.cs` have been clarified without changing functionality.

These changes aim to improve compatibility and address issues with newer library versions.
@Sicos1977 Sicos1977 changed the title Update to final 4.12 version Update to final 4.14 version May 19, 2025
@Sicos1977 Sicos1977 changed the title Update to final 4.14 version Update to 4.14 version May 19, 2025
Upgraded key dependencies, including `System.Text.Json` (9.0.0 → 10.0.0), `Newtonsoft.Json` (13.0.3 → 13.0.4), and `xUnit` (2.4.1 → 2.9.3). Addressed vulnerabilities in older versions and ensured compatibility with the latest .NET ecosystem.

Refactored several classes to use C# primary constructors, reducing boilerplate and improving readability. Updated `packages.lock.json` to reflect dependency changes and added `Microsoft.TestPlatform.ObjectModel` as a transitive dependency.

Simplified dependency injection patterns, improved resource management, and modernized syntax with features like `readonly struct` and expression-bodied members. Enhanced testing infrastructure and added `coverlet.collector` for code coverage.

Aligned project files with updated dependencies, added metadata for scoped assets, and ensured consistency across the solution. Addressed potential security vulnerabilities and improved maintainability.
Refactored code for better readability and maintainability:
- Introduced `#region` directives to group related code.
- Standardized formatting and added braces for consistency.
- Simplified property initialization and method expressions.

Enhanced exception handling and fallback logic:
- Improved `LoadInternalsAssemblyWithDependenciesSlowUncached` to handle older Roslyn versions gracefully.

Updated `SignatureHelpProviderWrapper`:
- Used `MemberDisplayOptions.Default` for initialization.
- Refactored `SignatureHelpItemsData` construction with named parameters.
- Simplified `IsRetriggerCharacter` and `IsTriggerCharacter`.

Streamlined namespaces and dependencies:
- Added `System.Runtime.Loader` and updated `using` directives.

Performed general cleanup:
- Removed redundant comments and unused code.
- Ensured consistency across `Roslyn414` and `Roslyn50` namespaces.
Refactored RoslynInternals.cs by removing deprecated fallback logic and commenting out unused methods. Updated assembly name resolution with modern C# pattern matching for clarity. Enhanced exception messages for unsupported Roslyn versions.

Reformatted MirrorSharpDiagnosticAnalyzerService.cs for consistent brace placement, improving readability without functional changes.

Refactored SignatureHelpProviderWrapperResolver.cs to make dependency injection explicit with `[ImportingConstructor]` and moved field initialization to the constructor body.

Added ReSharper directives in WorkspaceAnalyzerOptionsInternals.cs to suppress unused member warnings.

General improvements include better readability, maintainability, and debugging context.
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.

1 participant