From 28e871aa25de36fc0f39dbbc8ea327de5db8c28e Mon Sep 17 00:00:00 2001 From: Masataka Pocke Kuwabara Date: Mon, 7 Sep 2026 18:43:22 +0900 Subject: [PATCH] Remove the resolved TODO from Sources::Local `Sources::Local#initialize` carries a TODO asking to resolve a relative source path from the directory of `rbs_collection.yaml`. That was done three and a half years ago and the comment was left behind. The TODO arrived in 61dd0e44, a force-push of #854 dated 2022-02-11, where the constructor was: def initialize(source_entry) # TODO: resolve relative path from dir of rbs_collection.yaml @path = Pathname(source_entry['path']) end There the path really was taken as written and resolved against the working directory, so the TODO described the code accurately. 86f4ec5f, pushed to the same PR on 2023-02-08, added the `base_directory:` keyword to `Sources.from_config_entry` and changed the body to `base_directory / path`. `Config#sources` passes `@config_path.dirname` and `Lockfile.from_lockfile` passes `lockfile_path.dirname`, so from that point a relative path has been resolved from the directory holding the configuration -- exactly what the TODO asked for. Only the code was updated; the comment stayed. #854 ran from 2021-12-23 to 2023-02-17 and its commits were squashed into 718997e8, so the TODO and the change that answered it landed in one commit and the leftover was invisible in the history. Close #3124 https://github.com/ruby/rbs/pull/854 Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01HSq3kKMB8ULhZrnL5urD7y --- lib/rbs/collection/sources/local.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/rbs/collection/sources/local.rb b/lib/rbs/collection/sources/local.rb index 1afde557d7..6ce004f42b 100644 --- a/lib/rbs/collection/sources/local.rb +++ b/lib/rbs/collection/sources/local.rb @@ -9,7 +9,6 @@ class Local attr_reader :path, :full_path def initialize(path:, base_directory:) - # TODO: resolve relative path from dir of rbs_collection.yaml @path = Pathname(path) @full_path = base_directory / path end