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

Add .NET package search to Cake scripts #4320

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Commits on Jun 26, 2024

  1. Add .NET package search to Cake scripts

    This commit introduces a significant enhancement to the Cake build automation system by adding support for .NET package search directly within Cake build scripts. The implementation includes the introduction of a new method `DotNetSearchPackage` along with several new classes (`DotNetPackageSearcher`, `DotNetPackageSearchItem`, `DotNetPackageSearchSettings`) designed to facilitate the search for .NET packages using various settings and parameters.
    
    Additionally, this update includes the creation of unit tests and fixtures (`DotNetPackageSearcherFixture`, `DotNetPackageSearcherTests`, `DotNetPackageSearchSettingsTests`) to ensure the reliability and correctness of the package search functionality. A new configuration file (`Cake.lutconfig`) has been added to support live unit testing within the project, optimizing the development workflow.
    
    The changes also encompass updates to the namespace and using directives, specifically adding `using Cake.Common.Tools.DotNet.Package.Search;` in `DotNetAliases.cs` and introducing a new namespace `Cake.Common.Tools.DotNet.Package.Search` for better organization of the new functionality.
    
    Comprehensive XML documentation comments have been included to provide clear examples and guidance on how to utilize the new package search feature within Cake build scripts, aiming to enhance the developer experience by making it easier to find and reference .NET packages during the build process.
    paulomorgado committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    c845b9f View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2024

  1. Refactor output handling and parsing

    - Added `System.IO` and `System.Text` usings in `DotNetPackageSearcher.cs` for improved I/O and text encoding operations.
    - Refactored process output handling to use `MemoryStream` and `StreamWriter` for enhanced memory management and efficiency.
    - Updated `Parse` method signature from `IEnumerable<string>` to `ReadOnlyMemory<byte>` and optimized implementation for direct JSON deserialization from byte arrays, reducing memory allocations and string manipulation overhead.
    - Removed unnecessary null check and string concatenation in `Parse` method, streamlining data processing.
    - Streamlined command execution and output capture process, leveraging `MemoryStream` for more concise and performant code.
    - Optimized result parsing by utilizing `MemoryStream` buffer directly, minimizing the need for intermediate data handling steps.
    
    These changes aim to improve data handling efficiency, particularly for large data volumes, by leveraging stream and byte manipulation over traditional string operations.
    paulomorgado committed Jul 3, 2024
    Configuration menu
    Copy the full SHA
    cba527d View commit details
    Browse the repository at this point in the history