-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Code Quality: Use SourceGenerator to simplify DependencyProperty
#11587
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
It's awesome. Let's go one step further and use nameof to avoid typing or editing errors. [DependencyProperty("ViewModel")] |
Thank you. But the property |
Yes you are right. |
DependencyProperty
DependencyProperty
Can this PR be approved, or does it need to be modified or something? |
The changes should be discussed with the other contributors first, we started discussing it on Discord but there wasn't a definite conclusion yet. |
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'm on board this introduction.
Probably you need to split up changes into adding Files.SourceGenerator and applying changes because making changes to Files.App will cause file conflists when it takes a lot time to be merged. Can you revert changes in Files.App for the time being(I don't want you to waste)?
Creating a new PR for this and copying files or merging upstream with GitHub Desktop will help you.
Ok, I will fix this. |
Great! I’m sorry for inconvenient. The second I confirm beneficial effect, then I will approve the PR |
Sure |
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. Thank you!!
I think we can move forward with this until CommunityToolkit adds their own implementation 🙂 |
Could you also add license info to each file? |
OK. |
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.
LGTM!
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.
LGTM
@Poker-sang Thank you for contributing to the community! We investigated further and discovered that the app will fail to compile using the x86 & ARM64 configurations. In order to continue releasing updates, it seems that we'll have to revert these changes. We apologize for the inconvenience and we'll be happy to merge the changes once a solution is found. |
@0x5bfa I'm sorry that my PR took up your time to troubleshoot the problem. But I don't encounter such problem when I use it myself (same with the source generator in CommunityToolkit.Mvvm). Can you tell me how to reproduce this kind of problem for my further improvement? |
Building with x86 configuration in Visual Studio. You can see also the build log here: https://dev.azure.com/filescommunity/Files/_build/results?buildId=19041&view=results |
Build with Azure Pipeline log https://dev.azure.com/filescommunity/Files/_build/results?buildId=19041&view=results |
@Poker-sang what happens if you change the build configuration from |
@yaira2 I can still successfully build and deploy it (I am using VS2022) |
Looks like an error occurred with the loaded DLL. Maybe we loaded x64 dll (but we used AnyCPU config)? |
Probably. Alghough I added configurations respectively instead of Any CPU and added configuration and pubxml file configuration to the SourceGenerator project, I couldn't make it. Probably, this is referencing issue. |
@0x5bfa I appreciate that you can help me so much. My source generator in another project can be build successfully by Github Action. I'm comparing if there was any differences that caused the failure. |
@yaira2 @0x5bfa The problem is solved. It seems that this is because the solution's platform map is not followed by GitHub action. Thanks for Huo Yaoyuan guidance. |
Use Source Generator to simplify
DependencyProperty
Validation
How did you test these changes?