Skip to content

Commit

Permalink
Upgrade to Roslyn 4.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aelij committed Aug 22, 2023
1 parent 57227ce commit fd7fd3a
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 18 deletions.
9 changes: 4 additions & 5 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,28 @@
<PropertyGroup>
<RepoRoot>$(MSBuildThisFileDirectory)</RepoRoot>
<DefaultTargetFramework>net7.0</DefaultTargetFramework>
<LtsTargetFramework>net6.0</LtsTargetFramework>
<LtsTargetFramework>net7.0</LtsTargetFramework>
<UseWPF Condition=" $(MSBuildProjectName.Contains('Windows')) ">true</UseWPF>
<TargetFramework Condition=" '$(UseWPF)' == 'true' ">$(LtsTargetFramework)-windows</TargetFramework>
<TargetFramework Condition=" '$(TargetFramework)' == '' and '$(TargetFrameworks)' == '' ">$(DefaultTargetFramework)</TargetFramework>
<Features>strict</Features>
<Deterministic>True</Deterministic>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<Version>4.7.0-1.final</Version>
<RoslynPadVersion>18.0.0</RoslynPadVersion>
<Version>4.7.0</Version>
<RoslynPadVersion>19.0.0</RoslynPadVersion>
<LangVersion>latest</LangVersion>
<Nullable>Enable</Nullable>
<IsPackable>false</IsPackable>
<Authors>Eli Arbel</Authors>
<PackageProjectUrl>https://roslynpad.net</PackageProjectUrl>
<RepositoryUrl>https://github.com/roslynpad/roslynpad</RepositoryUrl>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageTags>Roslyn;RoslynPad</PackageTags>
<PackageIcon>RoslynPad.png</PackageIcon>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<IncludePackageReferencesDuringMarkupCompilation>true</IncludePackageReferencesDuringMarkupCompilation>
</PropertyGroup>
Expand Down
14 changes: 7 additions & 7 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@
</PropertyGroup>
<PropertyGroup>
<DotNetExtensionsVersion>7.0.0</DotNetExtensionsVersion>
<RoslynVersion>4.7.0-2.final</RoslynVersion>
<RoslynPrivateVersion>4.7.0-2.23280.4</RoslynPrivateVersion>
<AvaloniaVersion>11.0.0</AvaloniaVersion>
<RoslynVersion>4.7.0</RoslynVersion>
<RoslynPrivateVersion>4.7.0-3.23416.9</RoslynPrivateVersion>
<AvaloniaVersion>11.0.4</AvaloniaVersion>
<RxVersion>6.0.0</RxVersion>
<NuGetVersion>6.6.1</NuGetVersion>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="AvalonEdit" Version="6.3.0.90" />
<PackageVersion Include="Avalonia.AvaloniaEdit" Version="11.0.0" />
<PackageVersion Include="Avalonia.AvaloniaEdit" Version="11.0.1" />
<PackageVersion Include="Avalonia.Desktop" Version="$(AvaloniaVersion)" />
<PackageVersion Include="Avalonia.ThemeManager" Version="$(AvaloniaVersion)" />
<PackageVersion Include="Avalonia.ThemeManager" Version="11.0.0" />
<PackageVersion Include="Avalonia" Version="$(AvaloniaVersion)" />
<PackageVersion Include="AvalonLibrary" Version="3.0.0" />
<PackageVersion Include="DialogHost.Avalonia" Version="0.7.5" />
<PackageVersion Include="DialogHost.Avalonia" Version="0.7.6" />
<PackageVersion Include="Dirkster.AvalonDock" Version="4.70.3" />
<PackageVersion Include="Dock.Avalonia" Version="11.0.0" />
<PackageVersion Include="Dock.Model.Avalonia" Version="11.0.0" />
Expand Down Expand Up @@ -50,4 +50,4 @@
<PackageVersion Include="Xunit.StaFact" Version="1.1.11" />
<PackageVersion Include="xunit" Version="2.5.0" />
</ItemGroup>
</Project>
</Project>
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"sdk": {
"version": "7.0.306"
"version": "7.0.400"
},
"msbuild-sdks": {
"Microsoft.Build.NoTargets": "3.4.0"
Expand Down
2 changes: 1 addition & 1 deletion src/RestoreHelper/RestoreHelper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
</ItemGroup>
<Target Name="GetLibReferences" Outputs="@(Reference)">
<ItemGroup>
<Reference Include="$(PkgMicrosoft_CodeAnalysis_LanguageServer_Protocol)/lib/net6.0/*.dll" />
<Reference Include="$(PkgMicrosoft_CodeAnalysis_LanguageServer_Protocol)/lib/net7.0/*.dll" />
<Reference Include="$(PkgMicrosoft_CodeAnalysis_CSharp_EditorFeatures)/lib/net6.0/*.dll" />
</ItemGroup>
</Target>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal abstract class AbstractDirectiveTriviaBraceMatcher<TDirectiveTriviaSynt
where TEndIfDirectiveTriviaSyntax : TDirectiveTriviaSyntax
{
internal abstract List<TDirectiveTriviaSyntax> GetMatchingConditionalDirectives(TDirectiveTriviaSyntax directive, CancellationToken cancellationToken);
internal abstract TDirectiveTriviaSyntax GetMatchingDirective(TDirectiveTriviaSyntax directive, CancellationToken cancellationToken);
internal abstract TDirectiveTriviaSyntax? GetMatchingDirective(TDirectiveTriviaSyntax directive, CancellationToken cancellationToken);
internal abstract TextSpan GetSpanForTagging(TDirectiveTriviaSyntax directive);

public async Task<BraceMatchingResult?> FindBracesAsync(Document document, int position, CancellationToken cancellationToken)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ namespace RoslynPad.Roslyn.BraceMatching;
internal class CSharpDirectiveTriviaBraceMatcher : AbstractDirectiveTriviaBraceMatcher<DirectiveTriviaSyntax, IfDirectiveTriviaSyntax, ElifDirectiveTriviaSyntax, ElseDirectiveTriviaSyntax, EndIfDirectiveTriviaSyntax>
{
internal override List<DirectiveTriviaSyntax> GetMatchingConditionalDirectives(DirectiveTriviaSyntax directive, CancellationToken cancellationToken)
=> directive.GetMatchingConditionalDirectives(cancellationToken)?.ToList()!;
=> directive.GetMatchingConditionalDirectives(cancellationToken).ToList();

internal override DirectiveTriviaSyntax GetMatchingDirective(DirectiveTriviaSyntax directive, CancellationToken cancellationToken)
internal override DirectiveTriviaSyntax? GetMatchingDirective(DirectiveTriviaSyntax directive, CancellationToken cancellationToken)
=> directive.GetMatchingDirective(cancellationToken);

internal override TextSpan GetSpanForTagging(DirectiveTriviaSyntax directive)
Expand Down
14 changes: 14 additions & 0 deletions src/RoslynPad.Roslyn/Diagnostics/NullDiagnosticsRefresher.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System.Composition;
using Microsoft.CodeAnalysis.Diagnostics;

namespace RoslynPad.Roslyn.Diagnostics;

[Export(typeof(IDiagnosticsRefresher))]
internal class NullDiagnosticsRefresher : IDiagnosticsRefresher
{
public int GlobalStateVersion { get; }

public void RequestWorkspaceRefresh()
{
}
}
3 changes: 2 additions & 1 deletion src/RoslynPad.Runtime/RoslynPad.Runtime.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(LtsTargetFramework);$(DefaultTargetFramework);netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(DefaultTargetFramework)' == '$(LtsTargetFramework)' ">$(DefaultTargetFramework);netstandard2.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(DefaultTargetFramework)' != '$(LtsTargetFramework)' ">$(LtsTargetFramework);$(DefaultTargetFramework);netstandard2.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<NoWarn>$(NoWarn);1591</NoWarn>
</PropertyGroup>
Expand Down

0 comments on commit fd7fd3a

Please sign in to comment.