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

Adds type summary to the generation pipeline #785

Merged
merged 5 commits into from
Sep 3, 2020
Merged

Conversation

zengin
Copy link
Contributor

@zengin zengin commented Sep 3, 2020

  • Adds a Powershell script to generate a type summary
  • Adds a pipeline step to add typeSummary.txt file at the root of the repo, so that we can watch the type changes in a cleaner format together with the code changes
  • What that diff looks like can be found here: ffeeec4
    • check the typeSummary.txt file

@zengin
Copy link
Contributor Author

zengin commented Sep 3, 2020

Perf note: The script took 43 seconds to run on the V1 repo, which should be OK to have for the added benefit.

Copy link
Contributor

@MIchaelMainer MIchaelMainer left a comment

Choose a reason for hiding this comment

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

This will really help on the messy metadata changes.

$writer.WriteLine($twoSpaces + "method " + $method.Name)
$writer.WriteLine($fourSpaces + "return type " + (normalize $method.ReturnType.FullName))

foreach($param in $method.GetParameters())
Copy link
Contributor

Choose a reason for hiding this comment

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

Does GetParameters() return the parameters in the order that they are defined? I'd imagine it does but I want to check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have the same assumption given that Reflection is used in places where people can create Invoke methods by following the parameter order.

I couldn't find documentation confirming this, but a quick look revealed that I always get the same order from the definition. I also swapped orders in one of the methods, rebuilt the dll and the only diff was on that parameter order.

So I am fairly confident that this is a deterministic order and it will raise diffs if someone changes the order.

@zengin zengin merged commit bdf764a into dev Sep 3, 2020
@zengin zengin deleted the zengin/typeSummary branch December 19, 2020 05:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants