-
Notifications
You must be signed in to change notification settings - Fork 85
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
Enable nullable? #191
Comments
No. I don't think current Typography's API structures and code quality are good enough to be refactored to enable nullable. Typography should be refactored thoroughly to clean up APIs first, then start migrate to nullable reference.
|
I would say that code quality is independent of nullable annotations. Nullable annotations require little to no refactors. It is just adding |
@Happypig375 Emm.. I think you can just have a try. There will be And if nullable reference warnings are ignored, then there is no point to enable that. |
Normally |
Thank you @Happypig375 , I agree with @zwcloud. The library needs some (many) arrangements. see also: https://devblogs.microsoft.com/dotnet/embracing-nullable-reference-types/ |
@Happypig375 when you implemented this what did you find? How much is safety improved, or is it that only the unsafe places have been identified? Did everything get ?s and !s or was the compiler identifying a lot of safe paths? @zwcloud @prepare do you still maintain that other cleanup tasks have to be done first? I don't see why that argument holds; these seem independent. Do you have a suggested path to get NRTs in? Is the difficulty the need to test, or that the changes have been too extensive to review? The official .Net guidance is that NRTs should become ubiquitous with in the .Net 5 timeframe, i.e. by Nov, but of course there are parts of .Net that have historically been slow to update. |
Yes, This week task=> Typography.TextServices is under development and refactoring. and I need to test with these too (#192 (comment)) |
Legacy-style projects (non-SDK projects) do not support nullable reference types: dotnet/project-system#5551 I had to include refactors to merge the .NET Framework 2.0 projects with the .NET Standard 2.0 projects into multi-targeting SDK-style projects.
Yes. However, initialization subroutines called by constructors which initializes fields to non-nullable states were not tracked, leading to the constructor not being recognized as initializing all non-nullable fields. This can be directly solved by
I avoided the use of |
Why I need to use Typography's source code? => Because it is not stable enough and often ran into exceptions. |
Just add another project with nullable enabled containing Typography and reference it by your existing project. |
@prepare I see that not all projects here have been updated to sdk/netstandard2.0. Is the change to netstandard still in progress? |
Yes, not all projects have been updated to sdk/netstandard2.0 I support .net framework 2.0 and netstandard2.0 projects (https://github.com/LayoutFarm/Typography/tree/master/Build). Both set have active maintenance. |
That is crazy! |
If you accept incorporating nullable reference types then I will start working on an annotation PR 😃
The text was updated successfully, but these errors were encountered: