Skip to content

Generation of references will generate several changes #67784

@tlakollo

Description

@tlakollo

Description

This document provides the steps you need to take to update the reference assembly when adding new public APIs to an implementation assembly. The problem with executing the commands currently (no changes added to the API surface) will generate the following info

1 file changed, 1849 insertions(+), 1863 deletions(-)

They are three things that I think could be happening:

  • The command generates the wrong code, and the command needs to be changed
  • The command generated some code, but intentionally we want to override that behavior (maybe we could use an exception list to avoid changing that code)
  • The generated code is correct and was just wrongfully added (they just need to be fixed)

Reproduction Steps

Go to runtime\src\libraries\System.Runtime\src and execute dotnet build --no-incremental /t:GenerateReferenceSource

Expected behavior

The experience should be:

  • Someone changes an API
  • Run the command to update the ref file
  • Verify the change and commit

Actual behavior

The experience now is:

  • Someone changes an API
  • Run the command to update the ref file
  • Look for his changes between the ~1800 lines
  • Cherry-picks those changes
  • Revert the command execution to get the original reference file
  • Add the changes from the script manually
  • Commit

Notice that every added step is prone to add something that is wrong in the reference, they are several diffs that are flagged because they were added manually and contain some sort of error.

Regression?

No response

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions