Skip to content

Add #:property-based configuration#88

Merged
jjonescz merged 30 commits intomainfrom
tfm
Jul 18, 2025
Merged

Add #:property-based configuration#88
jjonescz merged 30 commits intomainfrom
tfm

Conversation

@jjonescz
Copy link
Owner

No description provided.

@jjonescz jjonescz requested a review from Copilot July 18, 2025 18:04
@jjonescz jjonescz added the enhancement New feature or request label Jul 18, 2025
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 adds support for #:property-based configuration, allowing users to configure C# compilation options directly within source code using special directive comments. The changes include a new file-level directive parser, property-based configuration system, improved NuGet package handling with range request support, and comprehensive test coverage for the new functionality.

  • Introduces a file-level directive system with #:property support for configuring compilation options like Configuration, LangVersion, and TargetFramework
  • Enhances NuGet package downloading with optimized range request handling and better metadata extraction
  • Refactors compiler infrastructure to support async compilation and improved reference assembly management

Reviewed Changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Compiler/FileLevelDirectiveParser.cs New comprehensive parser for #:property directives with completion support
src/Worker/Lab/NuGetDownloader.cs Major refactoring with range request optimization and improved package handling
src/Compiler/Compiler.cs Updated to support async compilation and directive processing
test/UnitTests/CompilerProxyTests.cs Added extensive tests for new directive functionality
src/Worker/Lab/RefAssemblyDownloader.cs New service for downloading reference assemblies by target framework
Comments suppressed due to low confidence (10)

src/Worker/Utils/ZipUtil.cs:8

  • The extension method syntax 'extension(ZipDirectoryReader reader)' appears to be non-standard C# syntax. Consider using the standard extension method syntax with 'static' modifier and 'this' parameter.
    extension(ZipDirectoryReader reader)

src/Worker/Lab/NuGetDownloader.cs:18

  • The extension method syntax 'extension(PackageSource packageSource)' appears to be non-standard C# syntax. Consider using the standard extension method syntax with 'static' modifier and 'this' parameter.
    extension(PackageSource packageSource)

src/Worker/Lab/NuGetDownloader.cs:23

  • The extension method syntax 'extension(VersionRange range)' appears to be non-standard C# syntax. Consider using the standard extension method syntax with 'static' modifier and 'this' parameter.
    extension(VersionRange range)

test/UnitTests/CompilerProxyTests.cs:279

  • [nitpick] The variable name 'assert' is ambiguous and could be confused with the Assert class. Consider renaming to 'assertAction' or 'assertMethod'.
        Action<string, string> assert = debug ? Assert.Contains : Assert.DoesNotContain;

src/Shared/Util.cs:22

  • The extension method syntax 'extension<TKey, TValue>(IDictionary<TKey, TValue> dictionary)' appears to be non-standard C# syntax. Consider using the standard extension method syntax with 'static' modifier and 'this' parameter.
    extension<TKey, TValue>(IDictionary<TKey, TValue> dictionary)

src/Shared/Util.cs:33

  • The extension method syntax 'extension(IEnumerable collection)' appears to be non-standard C# syntax. Consider using the standard extension method syntax with 'static' modifier and 'this' parameter.
    extension<T>(IEnumerable<T> collection)

src/Shared/Util.cs:61

  • The extension method syntax 'extension(ReadOnlySpan span)' appears to be non-standard C# syntax. Consider using the standard extension method syntax with 'static' modifier and 'this' parameter.
    extension(ReadOnlySpan<char> span)

src/Compiler/Utils/Utils.cs:17

  • The extension method syntax 'extension(RoslynCompletionItem item)' appears to be non-standard C# syntax. Consider using the standard extension method syntax with 'static' modifier and 'this' parameter.
    extension(RoslynCompletionItem item)

src/Compiler/Utils/Utils.cs:32

  • The extension method syntax 'extension(EmitOptions)' appears to be non-standard C# syntax. Consider using the standard extension method syntax with 'static' modifier and 'this' parameter.
    extension(EmitOptions)

src/Compiler/Utils/Utils.cs:37

  • The extension method syntax 'extension(SourceText text)' appears to be non-standard C# syntax. Consider using the standard extension method syntax with 'static' modifier and 'this' parameter.
    extension(SourceText text)

@jjonescz jjonescz marked this pull request as ready for review July 18, 2025 18:42
@jjonescz jjonescz merged commit cdb1446 into main Jul 18, 2025
3 checks passed
@jjonescz jjonescz deleted the tfm branch July 18, 2025 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants