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

Upgrade to net8.0 #167

Merged
merged 1 commit into from
Jun 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/generator/SerdeGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<TargetFramework>netstandard2.0</TargetFramework>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<Version>0.6.0</Version>

<PackFolder>analyzers/dotnet/cs</PackFolder>
<PackSymbols>false</PackSymbols>
Expand Down
2 changes: 1 addition & 1 deletion src/serde-xml/Serde.Xml.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn);CS3021</NoWarn>
</PropertyGroup>
Expand Down
3 changes: 2 additions & 1 deletion src/serde/Serde.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<IsPackable>false</IsPackable>
<DebugType>embedded</DebugType>
Expand All @@ -11,6 +11,7 @@
<!-- Suppress warnings about missing documentation. -->
<NoWarn>$(NoWarn);CS1591</NoWarn>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<Version>0.6.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down
30 changes: 0 additions & 30 deletions src/serde/json/reader/JsonException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,41 +77,11 @@ public JsonException(string? message) : base(message)
/// </summary>
public JsonException() : base() { }

/// <summary>
/// Creates a new exception object with serialized data.
/// </summary>
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual information about the source or destination.</param>
/// <exception cref="ArgumentNullException">
/// Thrown when <paramref name="info"/> is <see langword="null" />.
/// </exception>
protected JsonException(SerializationInfo info, StreamingContext context) : base(info, context)
{
LineNumber = (long?)info.GetValue("LineNumber", typeof(long?));
BytePositionInLine = (long?)info.GetValue("BytePositionInLine", typeof(long?));
Path = info.GetString("Path");
SetMessage(info.GetString("ActualMessage"));
}

/// <summary>
/// Specifies that 'try' logic should append Path information to the exception message.
/// </summary>
internal bool AppendPathInformation { get; set; }

/// <summary>
/// Sets the <see cref="SerializationInfo"/> with information about the exception.
/// </summary>
/// <param name="info">The <see cref="SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
/// <param name="context">The <see cref="StreamingContext"/> that contains contextual information about the source or destination.</param>
public override void GetObjectData(SerializationInfo info, StreamingContext context)
{
base.GetObjectData(info, context);
info.AddValue("LineNumber", LineNumber, typeof(long?));
info.AddValue("BytePositionInLine", BytePositionInLine, typeof(long?));
info.AddValue("Path", Path, typeof(string));
info.AddValue("ActualMessage", Message, typeof(string));
}

/// <summary>
/// The number of lines read so far before the exception (starting at 0).
/// </summary>
Expand Down
4 changes: 0 additions & 4 deletions src/serde/json/reader/JsonReaderException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,5 @@ internal sealed class JsonReaderException : JsonException
public JsonReaderException(string message, long lineNumber, long bytePositionInLine) : base(message, path: null, lineNumber, bytePositionInLine)
{
}

private JsonReaderException(SerializationInfo info, StreamingContext context) : base(info, context)
{
}
}
}
6 changes: 3 additions & 3 deletions test/Serde.Generation.Test/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ internal static class Config
{
public static ReferenceAssemblies LatestTfRefs =>
new ReferenceAssemblies (
"net7.0",
new PackageIdentity ("Microsoft.NETCore.App.Ref", "7.0.0-preview.4.22229.4"),
Path.Combine ("ref", "net7.0"))
"net8.0",
new PackageIdentity ("Microsoft.NETCore.App.Ref", "8.0.6"),
Path.Combine ("ref", "net8.0"))
.WithNuGetConfigFilePath (Path.Combine (
GetDirectoryPath(),
"..",
Expand Down
Loading