From af304b1ca2a5b3a31791172f353e44e112df89d4 Mon Sep 17 00:00:00 2001 From: Jon Skeet Date: Mon, 28 Sep 2020 12:37:32 +0100 Subject: [PATCH] Revert "Take account of the gRPC constructor changes when releasing" This reverts commit 95dd872474d33cd46a91b16baa514e8637ba90b5. (We don't need the tooling because we should not be generating backward-compatible releases.) --- .../History/GitCommit.cs | 2 +- .../History/HistoryFile.cs | 15 --------------- .../Assemblies.cs | 8 +------- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/tools/Google.Cloud.Tools.ReleaseManager/History/GitCommit.cs b/tools/Google.Cloud.Tools.ReleaseManager/History/GitCommit.cs index d3c69e0308fb..054590dba3c0 100644 --- a/tools/Google.Cloud.Tools.ReleaseManager/History/GitCommit.cs +++ b/tools/Google.Cloud.Tools.ReleaseManager/History/GitCommit.cs @@ -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) diff --git a/tools/Google.Cloud.Tools.ReleaseManager/History/HistoryFile.cs b/tools/Google.Cloud.Tools.ReleaseManager/History/HistoryFile.cs index acaece747b58..a59a70137285 100644 --- a/tools/Google.Cloud.Tools.ReleaseManager/History/HistoryFile.cs +++ b/tools/Google.Cloud.Tools.ReleaseManager/History/HistoryFile.cs @@ -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(""); } } diff --git a/tools/Google.Cloud.Tools.VersionCompat/Assemblies.cs b/tools/Google.Cloud.Tools.VersionCompat/Assemblies.cs index 8a68eff7c5f5..adfee1a7be18 100644 --- a/tools/Google.Cloud.Tools.VersionCompat/Assemblies.cs +++ b/tools/Google.Cloud.Tools.VersionCompat/Assemblies.cs @@ -36,15 +36,9 @@ private static DiffResult Compare(IReadOnlyList 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)