Skip to content

Extract shared helpers for visibility-call processing#783

Merged
alexcrocha merged 1 commit into
mainfrom
05-04-extract_shared_helpers_for_visibility-call_processing
Jul 16, 2026
Merged

Extract shared helpers for visibility-call processing#783
alexcrocha merged 1 commit into
mainfrom
05-04-extract_shared_helpers_for_visibility-call_processing

Conversation

@alexcrocha

@alexcrocha alexcrocha commented May 5, 2026

Copy link
Copy Markdown
Contributor

The preceding stack (#780, #781, #782) built up the visibility-call repeated the same symbol and string argument parsing across the visibility-call handlers and each_string_or_symbol_arg. This PR extracts that parsing into extract_literal_name. The visibility handlers call it directly when they need custom handling for non-literal arguments, while each_string_or_symbol_arg now builds on it. No behaviour change.

Both indexer backends (RubyIndexer and RubyOperationBuilder) carry the duplication and get their own copy of the helper.

alexcrocha commented May 5, 2026

Copy link
Copy Markdown
Contributor Author

@alexcrocha
alexcrocha force-pushed the 05-04-support_array_and_inline-def_arguments_to_private_class_method branch from d041f67 to e17bd05 Compare May 6, 2026 00:59
@alexcrocha
alexcrocha force-pushed the 05-04-extract_shared_helpers_for_visibility-call_processing branch 2 times, most recently from 0cd2420 to da316e5 Compare May 7, 2026 04:11
@alexcrocha
alexcrocha force-pushed the 05-04-support_array_and_inline-def_arguments_to_private_class_method branch from e17bd05 to cd8c5c3 Compare May 7, 2026 04:11
@alexcrocha
alexcrocha force-pushed the 05-04-extract_shared_helpers_for_visibility-call_processing branch 2 times, most recently from 3cc7896 to c668800 Compare May 7, 2026 04:45
@alexcrocha
alexcrocha force-pushed the 05-04-support_array_and_inline-def_arguments_to_private_class_method branch 2 times, most recently from 48f55ed to aa3c92e Compare May 7, 2026 22:45
@alexcrocha
alexcrocha force-pushed the 05-04-extract_shared_helpers_for_visibility-call_processing branch from c668800 to 361d340 Compare May 7, 2026 22:45
@alexcrocha
alexcrocha changed the base branch from 05-04-support_array_and_inline-def_arguments_to_private_class_method to graphite-base/783 May 8, 2026 00:11
Each indexer backend parsed symbol and string arguments into a (name, location) pair in three places. The two visibility call sites can't reuse each_string_or_symbol_arg because they diagnose non-literal arguments instead of skipping them, so extract_literal_name returns an Option and lets each caller decide, and each_string_or_symbol_arg now builds on it.
@alexcrocha
alexcrocha force-pushed the 05-04-extract_shared_helpers_for_visibility-call_processing branch from 361d340 to 45edf22 Compare July 14, 2026 23:35
@alexcrocha
alexcrocha changed the base branch from graphite-base/783 to main July 14, 2026 23:35
@alexcrocha alexcrocha added the chore Something that should not be included in release notes label Jul 14, 2026
@alexcrocha
alexcrocha marked this pull request as ready for review July 14, 2026 23:45
@alexcrocha
alexcrocha requested a review from a team as a code owner July 14, 2026 23:45
Comment thread rust/rubydex/src/indexing/ruby_indexer.rs
Comment thread rust/rubydex/src/operation/ruby_builder.rs
@alexcrocha
alexcrocha merged commit cd0a169 into main Jul 16, 2026
17 checks passed
@alexcrocha
alexcrocha deleted the 05-04-extract_shared_helpers_for_visibility-call_processing branch July 16, 2026 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Something that should not be included in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants