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

Generated code needs to be with the same nullability context as defined by the user #155

Closed
egvijayanand opened this issue Mar 15, 2022 · 4 comments · Fixed by #160
Closed
Assignees
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior mvvm-toolkit 🧰 Issues/PRs for the MVVM Toolkit next preview ✈️ This changes will be available in the upcoming preview priority 🚩 An issue or change that has priority

Comments

@egvijayanand
Copy link

Using v8.0.0-preview2 NuGet package.

Have defined property of type List<string?> and decorated it with [ObservableProperty] attribute.

MvvmToolkit-User-Code

But the generated code is not nullable enabled, because of which getting warnings in other places.

MvvmToolkit-Generated-Code

Nullability context needs to be taken care in the source generator.

@Sergio0694 Sergio0694 added bug 🐛 An unexpected issue that highlights incorrect behavior next preview ✈️ This changes will be available in the upcoming preview priority 🚩 An issue or change that has priority mvvm-toolkit 🧰 Issues/PRs for the MVVM Toolkit labels Mar 15, 2022
@Sergio0694
Copy link
Member

Thank you for the bug report! We are tracking nullability already (eg. if you define a string? field, you'll see the generated property respects that), but I guess we're not doing that correctly for nullability within type arguments. We should fix that 🙂

@Sergio0694 Sergio0694 self-assigned this Mar 15, 2022
@egvijayanand
Copy link
Author

Yes, the issue is with Generic types. Primitive nullable types work as expected.

@egvijayanand
Copy link
Author

When is the next preview release planned?

@Sergio0694
Copy link
Member

There is no fixed release date, but we're trying to get it published in a week or two. We mostly just need to complete #181 and #169, and then it should be good to go 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An unexpected issue that highlights incorrect behavior mvvm-toolkit 🧰 Issues/PRs for the MVVM Toolkit next preview ✈️ This changes will be available in the upcoming preview priority 🚩 An issue or change that has priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants