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

[AOT compatible] Clean up some AOT build issue in PowerAccent.Core #36264

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

moooyo
Copy link
Contributor

@moooyo moooyo commented Dec 9, 2024

Summary of the Pull Request

PR Checklist

  • Closes: #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
    manual test passed in my local env
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

@moooyo moooyo marked this pull request as ready for review December 9, 2024 07:48
@moooyo
Copy link
Contributor Author

moooyo commented Dec 9, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@moooyo
Copy link
Contributor Author

moooyo commented Dec 9, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@crutkas crutkas added Needs-Review This Pull Request awaits the review of a maintainer. In for .88 labels Dec 10, 2024
@jaimecbernardo jaimecbernardo added the Don't merge - Hold for release Hold off on merging this PR, even if it's approved. label Dec 11, 2024
@jaimecbernardo
Copy link
Collaborator

Hi, we've added the "Don't Merge" tag to the PR, since we're trying to keep the repo stable for the release and possible hotfix if necessary. Please don't merge the PR while the tag is still in here. This allows people to review the PR and approve with less fear that it'll get merged 😄

@jaimecbernardo jaimecbernardo removed the Don't merge - Hold for release Hold off on merging this PR, even if it's approved. label Dec 18, 2024
{
[JsonSourceGenerationOptions(WriteIndented = true)]
[JsonSerializable(typeof(SettingsService))]
public partial class SourceGenerationContext : JsonSerializerContext
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we should use a common Helpers or Contexts folder to put these JsonSerializerContext classes underneath, as there may ones that encompass multiple JsonSerializable types.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@moooyo - Other than this, change, it LGTM.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree. any suggestion? How about move to ManagedCommon? @snickler

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one confuse, It seems that we cannot centrailize it? Let me explain why I think that.

Consider we have a sub-project named JsonContextCommon, which include all the jsonSerializerContext we need.
Then, if we add a new jsonSerializerContext, we also need to add the [JsonSerializeable(typeof(T))]. Which require us to ref the Type T sub-project in the JsonContextCommon sub-project.
Now, we need to use this context. So, we need to ref JsonContextCommon sub-project in the project which we want to use it. We will necounter cycle reference error.

Only if we move all Type T to a independent sub-project such as ModelCommon, can we move the JsonSerializerContext to the same centralized location.

@snickler

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
In for .88 Needs-Review This Pull Request awaits the review of a maintainer.
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

4 participants