Conversation
There was a problem hiding this comment.
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
#:propertysupport for configuring compilation options likeConfiguration,LangVersion, andTargetFramework - 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)
No description provided.