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

chore: Remove non-working caching unmodified xaml files #11452

Conversation

Youssef1313
Copy link
Member

GitHub Issue (If applicable): closes #

PR Type

What kind of change does this PR introduce?

What is the current behavior?

What is the new behavior?

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

@github-actions github-actions bot added the area/code-generation Categorizes an issue or PR as relevant to code generation label Feb 24, 2023
Comment on lines -341 to -279
var outputFile = Path.Combine(
_targetPath,
$@"g\{typeof(XamlCodeGenerator).Name}\{_fileDefinition.UniqueID}.g.cs"
);
Copy link
Member Author

Choose a reason for hiding this comment

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

By default, the files are not written to disk. So, in most cases this code does nothing.

The code isn't correct anyway. The fact that XAML file didn't change doesn't mean that the generated code will remain the same.

@@ -202,11 +201,6 @@ public XamlCodeGeneration(GeneratorExecutionContext context)
_enableFuzzyMatching = true;
}

_targetPath = Path.Combine(
Copy link
Member

Choose a reason for hiding this comment

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

We may still need that part for the uno.sourcegeneration side. We'll remove it when we remove Xamarin.

Copy link
Member Author

Choose a reason for hiding this comment

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

@jeromelaban The comment was referring specifically to Roslyn, and the logic is not correct anyway. Do we still need to wait if the caching isn't guaranteed to be correct?

If we still want to keep it, should it be conditioned on !NETSTANDARD2_0?

Copy link
Member

Choose a reason for hiding this comment

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

Yes let's keep it for !NETSTANDARD2_0 for now.

@jeromelaban jeromelaban marked this pull request as draft March 22, 2023 14:32
@Youssef1313 Youssef1313 changed the base branch from master to feature/breaking-changes May 5, 2023 10:58
@jeromelaban jeromelaban deleted the branch unoplatform:feature/breaking-changes June 9, 2023 17:39
@jeromelaban jeromelaban closed this Jun 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/code-generation Categorizes an issue or PR as relevant to code generation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants