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

Add nullable support #5166

Open
kenkendk opened this issue Apr 30, 2024 · 3 comments
Open

Add nullable support #5166

kenkendk opened this issue Apr 30, 2024 · 3 comments

Comments

@kenkendk
Copy link
Member

After the update to a modern C# version, the libraries should be updated one-by-one to support nullable notation.

To avoid long-standing PRs, there should be one or two libraries in each PR.
Simply add:

<PropertyGroup>
  <Nullable>enable</Nullable>
</PropertyGroup>

To the .csproj file and fix the type annotations to correctly support null-able.

@bigboybamo
Copy link

Hi @kenkendk If this is still open, I'd like to pick this up

@kenkendk
Copy link
Member Author

@bigboybamo Awesome!

I am not aware of any progress on the issue, so you can start where you like :)
I would recommend not trying to take on the whole codebase, but start with some of the core libraries (Duplicati.Library.Utility, Duplicati.Library.AutoUpdater, Duplicati.Library.License, Duplicati.Library.Localization) and get a PR merged with these first.

Starting "bottom-up" will make less back-trips to fix things once the libraries are nullable enabled.

@bigboybamo
Copy link

Hi @kenkendk I started with the Utility Library. I have the type annotations in a few files but I want to be sure I am on the right track (and its what you want) Can I open a small PR so you look at the changes? Then, maybe if its fine I can continue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants