-
Notifications
You must be signed in to change notification settings - Fork 481
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
Migrate to supported .NET Core versions #787
Migrate to supported .NET Core versions #787
Conversation
I think adding |
I will fix later samples, there are some breaking changes in https://docs.microsoft.com/en-us/dotnet/core/compatibility/winforms |
This reverts commit b7f8d87.
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.
Looks good to me, and makes sense in my opinion, though I would like to hear from @tebjan about this (regarding removing support for unsupported versions).
I got an initial GH Actions workflow running based on this branch, though one test is failing both in .NetCore 3.1 and .Net 5 (__issue-084-01
comparison test). I have not looked into this, but would probably handle this in a separate issue, if this is not a false positive (which happens with the comparison tests).
Well I am and moving netcoreapp2.2 to netcoreapp2.1 so it's is event better, netcoreapp3.0 to netcoreapp3.1 is not that bad as we have netcoreapp2.1, so I think in terms of compatibility we are pretty good. The net5.0 is pretty important as it is becoming new standard target.
I have checked the test (quickly) and it seems that issue is with saving and reloading the svg, not sure what is wrong, maybe I need to update System.Drawing package. |
I think it makes sense for @tebjan to make a release with the old supported versions, and merge this afterwards. I would make a PR for GitHub actions after this is merged (with the current version, the tests for .NetCore 2.2 fail because it is not supported). As for the failing test - if you don't find the problem right away, I would create a new issue for this and temproraily remove this image from the tests. It still works with the older versions, so this is not a regression. |
That's fine with me.
You need to install:
The new issue would be good. |
Testing the failing test: [Test]
public void Test_Issue_084_01()
{
var svgPath = Path.Combine(AssemblyDirectory, "..", "..", "..", "..", "W3CTestSuite", "svg");
var file = Directory.GetFiles(svgPath, "__issue-084-01.svg").FirstOrDefault();
var doc1 = SvgDocument.Open<SvgDocument>(file);
using (var memStream = new MemoryStream())
{
var targetFrameworkAttribute = Assembly.GetExecutingAssembly()
.GetCustomAttributes(typeof(System.Runtime.Versioning.TargetFrameworkAttribute), false)
.SingleOrDefault() as System.Runtime.Versioning.TargetFrameworkAttribute;
doc1.Write(memStream);
memStream.Position = 0;
var streamReader = new StreamReader(memStream);
var str = streamReader.ReadToEnd();
File.WriteAllText($"c:\\DOWNLOADS\\__issue-084-01_{targetFrameworkAttribute.FrameworkName}.svg", str);
memStream.Position = 0;
var baseUri = doc1.BaseUri;
var doc2 = SvgDocument.Open<SvgDocument>(memStream);
doc2.BaseUri = baseUri;
} |
Cannot download this file, as it supposedly contains a virus. |
It contains only svg's. __issue-084-01.svg.txt |
@mrbean-bremen I will add float extension method for ToString, so we have one place for all conversion from float to string and can control output. |
Here is the test result for this branch (with the failing test removed, Windows only). |
This is great, I think I have smaller repro for failing issue. |
Do you think it makes sense to add all or some benchmark tests to the CI build? Currently only the unittests are run. |
I don't think they will be comparable, probably by limited CI machine resources and will increase the build times. Maybe we can add separate job only for benchmarks, the cpu performance will vary but memory usage can be useful. |
Yes, this is what I have been thinking. |
I would start we this benchmark:
|
Yeah, this increases the build times a bit, but that is still acceptable. Could further parallelize the tests, if needed, and probably add an option to show less output. |
Yes that looks acceptable. |
@wieslawsoltes - I'm going to merge this now, if you don't object - the release is out! |
@mrbean-bremen No objections, ready to merge. |
Reference Issue
What does this implement/fix? Explain your changes.
.NET Core 2.1 and 3.1 are LTS (Long-term support) releases, .NET 5.0 is basically basically new version of netstandard.
https://dotnet.microsoft.com/download/dotnet-core
Any other comments?