Skip to content

Fix document link gem paths when to_spec returns nil#4060

Open
vinistock wants to merge 1 commit intomainfrom
04-13-fix_document_link_gem_paths_when_to_spec_returns_nil
Open

Fix document link gem paths when to_spec returns nil#4060
vinistock wants to merge 1 commit intomainfrom
04-13-fix_document_link_gem_paths_when_to_spec_returns_nil

Conversation

@vinistock
Copy link
Copy Markdown
Member

@vinistock vinistock commented Apr 13, 2026

Motivation

Gem::Specification#to_spec may return nil under certain situations. For example, if the gem installation is missing because the current platform is not supported. We had a few cases of this happening in telemetry.

Implementation

We just need to skip if to_spec returns nil since we have no way of inspecting any other information about that gem.

Automated Tests

Added a test using a simple stub. Creating a super realistic test scenario involves a lot of setup.

Copy link
Copy Markdown
Member Author


How to use the Graphite Merge Queue

Add the label graphite-merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@vinistock vinistock self-assigned this Apr 13, 2026
@vinistock vinistock added bugfix This PR will fix an existing bug server This pull request should be included in the server gem's release notes labels Apr 13, 2026
@vinistock vinistock requested review from alexcrocha and st0012 April 13, 2026 14:50
@vinistock vinistock marked this pull request as ready for review April 13, 2026 14:50
@vinistock vinistock requested a review from a team as a code owner April 13, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix This PR will fix an existing bug server This pull request should be included in the server gem's release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant