Skip to content

Commit

Permalink
Revert "Take account of the gRPC constructor changes when releasing"
Browse files Browse the repository at this point in the history
This reverts commit 95dd872.

(We don't need the tooling because we should not be generating backward-compatible releases.)
  • Loading branch information
jskeet committed Sep 28, 2020
1 parent ad52a3d commit af304b1
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ internal class GitCommit

private readonly Commit _libGit2Commit;

internal string Hash { get; }
private string Hash { get; }
private string Url { get; }

internal GitCommit(Commit libGit2Commit)
Expand Down
15 changes: 0 additions & 15 deletions tools/Google.Cloud.Tools.ReleaseManager/History/HistoryFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,25 +112,10 @@ internal Section(Release release)

Lines.Add($"# Version {Version}, released {release.ReleaseDate:yyyy-MM-dd}");
Lines.Add("");
// TODO(early 2021): Remove this hack (gRPC constructors) once everything has been released with new tooling.
bool addGrpcConstructorFaqEntryLink = false;
foreach (var commit in release.Commits)
{
if (commit.Hash == "0ca05f5")
{
addGrpcConstructorFaqEntryLink = true;
continue;
}
Lines.AddRange(commit.GetHistoryLines());
}
if (addGrpcConstructorFaqEntryLink)
{
Lines.Add("");
Lines.Add("Additionally, this release included the regeneration of protobuf and gRPC types using new tooling.");
Lines.Add("This introduces a change that has a very small chance of breaking customers. Please see");
Lines.Add("the [FAQ entry](https://googleapis.github.io/google-cloud-dotnet/docs/faq.html#why-have-the generated-grpc-client-constructors-changed)");
Lines.Add("for more details.");
}
Lines.Add("");
}
}
Expand Down
8 changes: 1 addition & 7 deletions tools/Google.Cloud.Tools.VersionCompat/Assemblies.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,9 @@ private static DiffResult Compare(IReadOnlyList<TypeDefinition> olderTypes, IRea
var oWithNested = olderTypes.WithNested().ToImmutableList();
var nWithNested = newerTypes.WithNested().ToImmutableList();

var diffs = TopLevel.Diffs(oWithNested, nWithNested).Where(diff => !IsGrpcConstructorRemoval(diff)).ToImmutableList();
var diffs = TopLevel.Diffs(oWithNested, nWithNested).ToImmutableList();

return new DiffResult(diffs);

// Ignore the gRPC constructor parameter Channel -> ChannelBase change. We're treating it as non-breaking.
// TODO(early 2021): When we've released all APIs that have this change, we can remove this hack.
bool IsGrpcConstructorRemoval(Diff diff) =>
diff.Cause == Cause.CtorRemoved &&
diff.ToString(FormatDetail.Brief).Contains("'void .ctor(Channel channel)'");
}

public static DiffResult Compare(AssemblyDefinition older, AssemblyDefinition newer, string testNamespace)
Expand Down

0 comments on commit af304b1

Please sign in to comment.