-
Notifications
You must be signed in to change notification settings - Fork 475
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
fixed CS8352 in net8 #1121
fixed CS8352 in net8 #1121
Conversation
@RomanKalachik Thanks for the contribution. Still do not understand why |
Net8.0 support in this whole project is a long story because of System.Drawing. |
Not tried it yet, but was thinking it should succeed with |
@RomanKalachik Please can you share the issues you have with the .NET 8 support? I tested all on command-lines: dotnet test --framework net8.0 Tests/Svg.UnitTests/Svg.UnitTests.csproj
dotnet test --framework net6.0 Tests/Svg.UnitTests/Svg.UnitTests.csproj
dotnet test --framework netcoreapp3.1 Tests/Svg.UnitTests/Svg.UnitTests.csproj
dotnet test --framework net462 Tests/Svg.UnitTests/Svg.UnitTests.csproj All tests succeeded except 1, and it is due to difference in line ending. Still do not know why this fails with your source code (I downloaded it, not a git clone). |
Why does your PR excludes cases as shown below for the Svg.Helpers.StringParser public static float ToFloat(ref ReadOnlySpan<char> value)
{
#if NETSTANDARD2_1 || NETCOREAPP2_1_OR_GREATER
return float.Parse(value, NumberStyles.Float, Format);
#else
return float.Parse(value.ToString(), NumberStyles.Float, Format);
#endif
} Svg.CoordinateParserpublic static bool TryGetFloat(out float result, ref ReadOnlySpan<char> chars, ref CoordinateParserState state)
{
var charsLength = chars.Length;
while (state.CharsPosition < charsLength && state.HasMore)
{
var currentChar = chars[state.CharsPosition];
// NOTE: Deleted for simplicity
}
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add an entry in the release notes?
Issues raised here are fixed in #1137 |
if you try to compile this project in net8, it will show some
SvgPointCollection.cs(66,89,66,94): error CS8352: Cannot use variable 'state' in this context because it may expose referenced variables outside of their declaration scope
This MR fixes that errors.
Reference Issue
What does this implement/fix? Explain your changes.
Any other comments?