-
-
Notifications
You must be signed in to change notification settings - Fork 887
Merge SixLabors.Core sources into ImageSharp [first attempt] #1086
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
Conversation
This reverts commit bdd54d3.
doing this to be consistent with System.Drawing.Primitives
… to make sure they can be used.
Added guards from the ImageSharp project
Codecov Report
@@ Coverage Diff @@
## master #1086 +/- ##
==========================================
+ Coverage 83.71% 83.77% +0.05%
==========================================
Files 688 705 +17
Lines 28853 29312 +459
==========================================
+ Hits 24155 24555 +400
- Misses 4698 4757 +59
Continue to review full report at Codecov.
|
JimBobSquarePants
left a comment
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.
I think we should go all in and merge the code under the collective SixLabors.ImageSharp namespace with folder structure.
It seems very odd to me not to have that as the default and developers will expect things like Point to be under the same root namespace as Image since System.Drawing groups objects like that together.
| /// <summary> | ||
| /// Utility class for common geometric functions. | ||
| /// </summary> | ||
| public static class GeometryUtilities |
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.
This is a naming convention I want to adopt throughout the codebase. Currently we've also got Utils and Helper(s)
| <PackageId>SixLabors.ImageSharp</PackageId> | ||
| <PackageTags>Image Resize Crop Gif Jpg Jpeg Bitmap Png Core</PackageTags> | ||
| <RootNamespace>SixLabors.ImageSharp</RootNamespace> | ||
| <RootNamespace>SixLabors</RootNamespace> |
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.
You'll have to sell this change to me. Was it to reduce breaking changes?
| <s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=common/@EntryIndexedValue">True</s:Boolean> | ||
| <s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=common_005Cexceptions/@EntryIndexedValue">True</s:Boolean> | ||
| <s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=imagesharp_005Cpixelformats_005Cpixelimplementations/@EntryIndexedValue">True</s:Boolean> | ||
| <s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=imagesharp_005Cpixelformats_005Cutils/@EntryIndexedValue">True</s:Boolean> |
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.
I really don't want to keep dotsettings files, Resharper is a nightmare or performance. We should use .editorconfig + ruleset.
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.
The other "toy IDE" 😆, Rider is also using this, and it's somewhat faster.
Still unsure what will be my IDE of choice in long term, but for now I'm pretty much addicted to JetBrains features, so I need .DotSettings.
"NamespaceProvider" is one of the features I really like btw.
| } | ||
|
|
||
| [Fact] | ||
| public void AllStaticMethodsOnOnDebugGuardHaveDEBUGConditional() |
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.
We don't need these tests. The shared code is already tested, though I should add a simple workflow to that repo.
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.
Previously we used to test them in Core. If you setup an action in SharedInfrastructure, I'm happy to delete them here.
| namespace SixLabors.Memory.Tests | ||
| { | ||
| // TODO: Re-enable memory-intensive tests with arcade RemoteExecutor: | ||
| // https://github.com/dotnet/runtime/blob/master/docs/project/writing-tests.md#remoteexecutor |
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.
👍
|
@JimBobSquarePants if we move the types, we should also do I don't have a strong opinion apart from the fact that our decision should be user and business-focused now. So the question is: Does this worth the breaking changes (again) in |
|
I agree it should be user focused. That’s why I’m opting for creating the long term expected result over immediate upgrade. I don’t think it’s too painful an upgrade anyway. The reference will remain and the user will be able to bulk delete the old namespace. |
OK 👍. Just to double check: this means that you also agree with the changes in Drawing, right? That one will have a bigger impact (on drawing users). |
|
@anton changing the namespaces seems fine as an idea to me but I agree with @JimBobSquarePants and we should just totally drop the re: drawing & shapes not sure exactly how to cut that namespace but as that project is not a target for our RC we can worry about cleaning us the structure over there at a later date. |
|
Closing in favor of #1087. |
Prerequisites
Description
Merge sources and tests from SixLabors.Core, resolve #1002.
src.ArrayPoolMemoryAllocatorTestshave been disabled temporarily. The safest way to run such tests would be arcane's RemoteExecutorDo not squash-merge!