Skip to content

ruby: .owlbot.rb workarounds for Spurious Links to Google::Cloud::Location are obsolete #7444

Description

@suztomo

The replacement targets of .owlbot.rb's content.gsub for Google::Cloud::Location cross-references do not exist anymore after the upstream generator bug fix in gapic-generator-ruby#1211 (included in gapic-generator-cloud >= 0.51.0). Consequently, these .owlbot.rb scripts are obsolete and no longer needed when onboarding libraries to Librarian.

Background

Historically, gapic-generator-ruby converted markdown links to Google::Cloud::Location classes (such as [google.cloud.location.Location][google.cloud.location.Location]) into YARD cross-reference links ({::Google::Cloud::Location::Location google.cloud.location.Location}). Because Google::Cloud::Location is defined in an external dependency gem (google-cloud-location), YARD could not resolve the link within the gem's local docs, causing YARD doc builds to fail (gapic-generator-ruby#824).

To work around this, multiple gems maintained custom .owlbot.rb modifiers using content.gsub to replace {::Google::Cloud::Location...} with `::Google::Cloud::Location...`.

Current Generator & Librarian Behavior

  1. In gapic-generator-ruby PR #1211, Gapic::Model::Mixins.mixin_message_field_address? was introduced in gapic-generator/lib/gapic/formatting_utils.rb to prevent emitting invalid YARD {...} links for cross-package mixin objects.
  2. The generator no longer outputs {::Google::Cloud::Location::Location ...}. Instead, it leaves the proto reference without invalid YARD formatting.
  3. When regenerating libraries with librarian generate, toys ci --test --rubocop --doctest and bundle exec yard doc --fail-on-warning pass cleanly without needing any .owlbot.rb post-processing.
  4. As part of Librarian onboarding, these .owlbot.rb files, along with .OwlBot.yaml and .owlbot-manifest.json, are removed.

Affected Gem Folders

The following 14 gems have .owlbot.rb workarounds for Google::Cloud::Location (Issue 824):

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions