Skip to content

Commit

Permalink
Fix use of C# 12 features when we're compiling under .NET 6
Browse files Browse the repository at this point in the history
  • Loading branch information
desplesda committed Dec 4, 2024
1 parent d231615 commit f2c6840
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 55 deletions.
108 changes: 54 additions & 54 deletions YarnSpinner.LanguageServer/YarnLanguageServer.csproj
Original file line number Diff line number Diff line change
@@ -1,65 +1,65 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>latest</LangVersion>
<StartupObject></StartupObject>
<ApplicationIcon />
<GenerateDocumentationFile>False</GenerateDocumentationFile>
<UseAppHost>False</UseAppHost>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>10.0</LangVersion>
<StartupObject></StartupObject>
<ApplicationIcon />
<GenerateDocumentationFile>False</GenerateDocumentationFile>
<UseAppHost>False</UseAppHost>
<Nullable>enable</Nullable>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="ClosedXML" Version="0.96.0" />
<PackageReference Include="Fastenshtein" Version="1.0.0.7" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.0-3.final" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="*" />
<PackageReference Include="morelinq" Version="3.3.2" />
<PackageReference Include="OmniSharp.Extensions.LanguageServer" Version="0.19.7" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.IO.FileSystem.Primitives" Version="4.3.0" />
<PackageReference Include="System.IO" Version="4.3.0" />
<PackageReference Include="System.Runtime.Handles" Version="4.3.0" />
<PackageReference Include="System.Text.Encoding" Version="4.3.0" />
<PackageReference Include="System.Text.Encoding.Extensions" Version="4.3.0" />
<PackageReference Include="System.Threading.Tasks" Version="4.3.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ClosedXML" Version="0.96.0" />
<PackageReference Include="Fastenshtein" Version="1.0.0.7" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.0.0-3.final" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="*" />
<PackageReference Include="morelinq" Version="3.3.2" />
<PackageReference Include="OmniSharp.Extensions.LanguageServer" Version="0.19.7" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="System.IO.FileSystem.Primitives" Version="4.3.0" />
<PackageReference Include="System.IO" Version="4.3.0" />
<PackageReference Include="System.Runtime.Handles" Version="4.3.0" />
<PackageReference Include="System.Text.Encoding" Version="4.3.0" />
<PackageReference Include="System.Text.Encoding.Extensions" Version="4.3.0" />
<PackageReference Include="System.Threading.Tasks" Version="4.3.0" />
</ItemGroup>

<ItemGroup>
<ItemGroup>
<ProjectReference Include="../YarnSpinner/YarnSpinner.csproj" />
<ProjectReference Include="../YarnSpinner.Compiler/YarnSpinner.Compiler.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="src\Server\Documentation\BuiltInFunctionsAndCommands.ysls.json" />
<None Include="src\Server\Documentation\ysls.schema.json" />
</ItemGroup>
</ItemGroup>

<ItemGroup>
<ContentWithTargetPath Include="src\Server\Documentation\ysls.schema.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>ysls.schema.json</TargetPath>
</ContentWithTargetPath>
</ItemGroup>
<ItemGroup>
<None Include="src\Server\Documentation\BuiltInFunctionsAndCommands.ysls.json" />
<None Include="src\Server\Documentation\ysls.schema.json" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Include="src\Server\Documentation\BuiltInFunctionsAndCommands.ysls.json">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ContentWithTargetPath Include="src\Server\Documentation\ysls.schema.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<TargetPath>ysls.schema.json</TargetPath>
</ContentWithTargetPath>
</ItemGroup>

</Project>
<ItemGroup>
<EmbeddedResource Include="src\Server\Documentation\BuiltInFunctionsAndCommands.ysls.json">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</EmbeddedResource>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public Task<CodeLensContainer> Handle(CodeLensParams request, CancellationToken
// This is an error token - the node doesn't actually
// have a valid title. Return an empty collection of code
// lenses.
return [];
return Enumerable.Empty<CodeLens>();
}

var referenceLocations = ReferencesHandler.GetReferences(project, titleToken.Text, YarnSymbolType.Node);
Expand Down

0 comments on commit f2c6840

Please sign in to comment.