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

Switch from MSBuild properties to an AdditionalFiles json file #1667

Merged
merged 2 commits into from
Aug 15, 2023

Conversation

AArnott
Copy link
Collaborator

@AArnott AArnott commented Aug 13, 2023

This allows unity (which has no msbuild properties) to configure the source generator via a JSON file passed to the compiler via AdditionalFiles.

Closes #1650

Copy link
Member

@neuecc neuecc left a comment

Choose a reason for hiding this comment

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

It's wonderful!

Would the URL for the example schema in the ReadMe be
https://raw.githubusercontent.com/MessagePack-CSharp/MessagePack-CSharp/master/MessagePackAnalyzer.schema.json ?
Also, I think it's fine that the schema.json serves as the document, but it might be nice to have a link to it.

@AArnott
Copy link
Collaborator Author

AArnott commented Aug 14, 2023

Would the URL for the example schema in the ReadMe be
https://raw.githubusercontent.com/MessagePack-CSharp/MessagePack-CSharp/master/MessagePackAnalyzer.schema.json ?

Yes, I should have used MessagePack-CSharp as the account name. I'll fix that.
As for master instead of develop, that would delay its actual correctness to when develop finally merges into master (could be months away). So at least for now I think develop is better so folks can follow the README and get a working schema.

Also, I think it's fine that the schema.json serves as the document, but it might be nice to have a link to it.

I don't understand. Can you explain more about what you mean?

@neuecc
Copy link
Member

neuecc commented Aug 15, 2023

So at least for now I think develop is better so folks can follow the README and get a working schema.

OK!

Can you explain more about what you mean?

For example

The above example mostly sets defaults. You can discover all the available settings in MessagePackAnalyzer.schema.json, their defaults and meanings in a JSON editor that supports JSON schema.

This allows unity (which has no msbuild properties) to configure the source generator.

Closes #1650
@AArnott AArnott enabled auto-merge August 15, 2023 12:54
@AArnott AArnott merged commit 3b8428e into develop Aug 15, 2023
5 checks passed
@AArnott AArnott deleted the fix1650 branch August 15, 2023 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provides SourceGenerator option from AdditionalFiles
2 participants