Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

Use a Source Generator to extract the Version information #73

Merged
merged 1 commit into from
Jan 16, 2023

Conversation

andreaTP
Copy link
Contributor

Ref: microsoft/kiota#2149 (comment) by @baywet

Opening as Draft as I'm not sure if the extracted version is the desired one(haven't checked).

Also, since we are re-using almost the same code it might be worth exploring how to make this Source Generator generic enough and publish it as a NuGet package, I think there are two improvements required:

  • if a file .csproj doesn't exist in the directory containing the mainSyntaxTree explore the Parent until you find one
  • Export the entire .csproj content, possibly generating the fluent API to programmatically access the elements

Copy link
Member

@baywet baywet left a comment

Choose a reason for hiding this comment

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

Thanks for fixing that!

@andreaTP
Copy link
Contributor Author

if this is good enough for you, happy to move forward 🙂

@andreaTP andreaTP marked this pull request as ready for review January 16, 2023 09:52
@baywet baywet merged commit 73e4fc3 into microsoft:main Jan 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants