rigortype 0.3.8 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/data/capability_roles/capability_roles.rbs +36 -0
- data/data/core_overlay/enumerable.rbs +51 -0
- data/data/core_overlay/enumerator.rbs +84 -0
- data/data/core_overlay/hash_rbs3.rbs +41 -0
- data/data/core_overlay/process.rbs +40 -0
- data/data/core_overlay/string_io.rbs +33 -0
- data/data/effects/core.yml +3 -3
- data/data/gem_overlay/activesupport/core_ext.rbs +236 -17
- data/docs/handbook/02-everyday-types.md +17 -14
- data/docs/handbook/03-narrowing.md +132 -14
- data/docs/handbook/04-tuples-and-shapes.md +8 -6
- data/docs/handbook/05-methods-and-blocks.md +1 -1
- data/docs/handbook/06-classes.md +2 -2
- data/docs/handbook/07-rbs-and-extended.md +19 -1
- data/docs/handbook/10-sorbet.md +9 -10
- data/docs/handbook/11-sig-gen.md +525 -13
- data/docs/handbook/README.md +1 -1
- data/docs/handbook/appendix-elixir.md +2 -2
- data/docs/handbook/appendix-go.md +2 -2
- data/docs/handbook/appendix-java-csharp.md +2 -2
- data/docs/handbook/appendix-mypy.md +2 -2
- data/docs/handbook/appendix-phpstan.md +1 -1
- data/docs/handbook/appendix-rust.md +1 -1
- data/docs/handbook/appendix-type-theory.md +4 -4
- data/docs/handbook/appendix-typescript.md +1 -1
- data/docs/llms.txt +2 -0
- data/docs/manual/02-cli-reference.md +95 -6
- data/docs/manual/03-configuration.md +18 -0
- data/docs/manual/04-diagnostics.md +15 -0
- data/docs/manual/07-plugins.md +15 -5
- data/docs/manual/08-skills.md +23 -2
- data/docs/manual/10-mcp-server.md +3 -2
- data/docs/manual/11-ci.md +9 -0
- data/docs/manual/15-type-protection-coverage.md +8 -0
- data/docs/manual/16-rbs-extended-annotations.md +46 -8
- data/docs/manual/18-removing-dead-code.md +10 -8
- data/docs/manual/19-effect-labels.md +10 -0
- data/docs/manual/plugins/README.md +7 -0
- data/docs/manual/plugins/rigor-actioncable.md +8 -1
- data/docs/manual/plugins/rigor-actionmailer.md +7 -0
- data/docs/manual/plugins/rigor-actionpack.md +261 -0
- data/docs/manual/plugins/rigor-active-model-serializers.md +153 -0
- data/docs/manual/plugins/rigor-activejob.md +7 -0
- data/docs/manual/plugins/rigor-activerecord.md +138 -4
- data/docs/manual/plugins/rigor-activestorage.md +8 -1
- data/docs/manual/plugins/rigor-activesupport-core-ext.md +43 -7
- data/docs/manual/plugins/rigor-grape.md +106 -0
- data/docs/manual/plugins/rigor-graphql.md +23 -2
- data/docs/manual/plugins/rigor-pundit.md +8 -1
- data/docs/manual/plugins/rigor-rails-i18n.md +10 -5
- data/docs/manual/plugins/rigor-rails-routes.md +7 -0
- data/docs/manual/plugins/rigor-rbs-inline.md +229 -1
- data/docs/manual/plugins/rigor-sidekiq.md +8 -1
- data/docs/manual/plugins/rigor-sorbet.md +21 -5
- data/exe/rigor +19 -4
- data/lib/rigor/analysis/baseline.rb +3 -3
- data/lib/rigor/analysis/check_rules/always_truthy_condition_collector.rb +1 -1
- data/lib/rigor/analysis/check_rules/dead_version_guard_arms.rb +1 -5
- data/lib/rigor/analysis/check_rules/declaration_sourced_guard.rb +167 -2
- data/lib/rigor/analysis/check_rules/ivar_write_collector.rb +10 -2
- data/lib/rigor/analysis/check_rules/lexical_method_sites.rb +189 -0
- data/lib/rigor/analysis/check_rules/main_pass_collector.rb +6 -4
- data/lib/rigor/analysis/check_rules/published_constant_guard.rb +15 -6
- data/lib/rigor/analysis/check_rules/rule_ids.rb +21 -6
- data/lib/rigor/analysis/check_rules/rule_walk.rb +41 -5
- data/lib/rigor/analysis/check_rules/self_closedness_scanner.rb +1 -1
- data/lib/rigor/analysis/check_rules/shadowed_rescue_collector.rb +1 -1
- data/lib/rigor/analysis/check_rules/source_arity.rb +323 -0
- data/lib/rigor/analysis/check_rules/special_global_setters.rb +146 -0
- data/lib/rigor/analysis/check_rules/unreachable_clause_collector.rb +38 -4
- data/lib/rigor/analysis/check_rules/void_value_use_collector.rb +0 -1
- data/lib/rigor/analysis/check_rules.rb +718 -79
- data/lib/rigor/analysis/crash_signature.rb +8 -24
- data/lib/rigor/analysis/dependency_recorder.rb +23 -0
- data/lib/rigor/analysis/dependency_source_inference/boundary_cross_reporter.rb +1 -1
- data/lib/rigor/analysis/dependency_source_inference/builder.rb +0 -2
- data/lib/rigor/analysis/dependency_source_inference/gem_resolver.rb +0 -2
- data/lib/rigor/analysis/dependency_source_inference/index.rb +5 -5
- data/lib/rigor/analysis/dependency_source_inference/return_type_heuristic.rb +1 -2
- data/lib/rigor/analysis/dependency_source_inference/walker.rb +4 -4
- data/lib/rigor/analysis/effects_cache_probe.rb +3 -4
- data/lib/rigor/analysis/erb_template_detector.rb +1 -2
- data/lib/rigor/analysis/fact_store.rb +15 -1
- data/lib/rigor/analysis/incremental.rb +42 -0
- data/lib/rigor/analysis/incremental_session.rb +117 -26
- data/lib/rigor/analysis/plugin_fact_fingerprint.rb +0 -1
- data/lib/rigor/analysis/project_scan.rb +11 -1
- data/lib/rigor/analysis/reachability/graph.rb +3 -5
- data/lib/rigor/analysis/reachability/plugin_roots.rb +5 -5
- data/lib/rigor/analysis/reachability/project_files.rb +2 -2
- data/lib/rigor/analysis/reachability/scan.rb +5 -5
- data/lib/rigor/analysis/reachability/scan_cache.rb +3 -2
- data/lib/rigor/analysis/reachability/signature_scan.rb +2 -2
- data/lib/rigor/analysis/result.rb +1 -3
- data/lib/rigor/analysis/rule_catalog.rb +131 -1
- data/lib/rigor/analysis/run_cache_key.rb +21 -12
- data/lib/rigor/analysis/run_cache_probe.rb +3 -5
- data/lib/rigor/analysis/runner/buffer_pool_dispatcher.rb +6 -8
- data/lib/rigor/analysis/runner/declaration_position.rb +1 -2
- data/lib/rigor/analysis/runner/diagnostic_aggregator.rb +340 -33
- data/lib/rigor/analysis/runner/effect_annotation_residual_pass.rb +2 -3
- data/lib/rigor/analysis/runner/effect_envelope_pass.rb +18 -14
- data/lib/rigor/analysis/runner/pool_coordinator.rb +357 -97
- data/lib/rigor/analysis/runner/project_pre_passes.rb +38 -13
- data/lib/rigor/analysis/runner/run_snapshots.rb +6 -1
- data/lib/rigor/analysis/runner.rb +407 -51
- data/lib/rigor/analysis/template_unit_collector.rb +303 -0
- data/lib/rigor/analysis/template_unit_paths.rb +91 -0
- data/lib/rigor/analysis/template_unit_positions.rb +293 -0
- data/lib/rigor/analysis/template_units.rb +399 -0
- data/lib/rigor/analysis/worker_session.rb +62 -20
- data/lib/rigor/bleeding_edge.rb +10 -24
- data/lib/rigor/builtins/hkt_builtins.rb +3 -2
- data/lib/rigor/builtins/imported_refinements.rb +159 -21
- data/lib/rigor/builtins/predefined_constant_refinements.rb +5 -7
- data/lib/rigor/builtins/regex_refinement.rb +21 -13
- data/lib/rigor/builtins/static_return_refinements.rb +7 -6
- data/lib/rigor/cache/annotation_location.rb +2 -4
- data/lib/rigor/cache/descriptor.rb +63 -20
- data/lib/rigor/cache/engine_source.rb +33 -5
- data/lib/rigor/cache/file_digest.rb +9 -1
- data/lib/rigor/cache/incremental_snapshot.rb +72 -6
- data/lib/rigor/cache/rbs_cache_producer.rb +4 -0
- data/lib/rigor/cache/rbs_class_ancestor_table.rb +0 -3
- data/lib/rigor/cache/rbs_class_type_param_names.rb +0 -3
- data/lib/rigor/cache/rbs_constant_table.rb +0 -3
- data/lib/rigor/cache/rbs_descriptor.rb +112 -14
- data/lib/rigor/cache/rbs_environment.rb +8 -4
- data/lib/rigor/cache/rbs_known_class_names.rb +0 -3
- data/lib/rigor/cache/store.rb +76 -32
- data/lib/rigor/ci_detector.rb +1 -0
- data/lib/rigor/cli/annotate_command.rb +5 -6
- data/lib/rigor/cli/check_command.rb +57 -10
- data/lib/rigor/cli/check_invocation.rb +6 -11
- data/lib/rigor/cli/check_runner_factory.rb +1 -5
- data/lib/rigor/cli/coverage_command.rb +1 -1
- data/lib/rigor/cli/coverage_mutation.rb +12 -3
- data/lib/rigor/cli/coverage_scan.rb +1 -5
- data/lib/rigor/cli/diff_command.rb +1 -1
- data/lib/rigor/cli/doc_links.rb +4 -4
- data/lib/rigor/cli/docs_command.rb +6 -6
- data/lib/rigor/cli/doctor_command.rb +85 -38
- data/lib/rigor/cli/effects_command.rb +2 -2
- data/lib/rigor/cli/effects_diff_renderer.rb +3 -3
- data/lib/rigor/cli/effects_snapshot_command.rb +1 -1
- data/lib/rigor/cli/explain_command.rb +34 -1
- data/lib/rigor/cli/fused_protection_report.rb +7 -1
- data/lib/rigor/cli/lsp_command.rb +1 -1
- data/lib/rigor/cli/mcp_command.rb +1 -1
- data/lib/rigor/cli/measurement_integrity_warning.rb +4 -5
- data/lib/rigor/cli/mutation_fork_scan.rb +6 -6
- data/lib/rigor/cli/mutation_protection_report.rb +7 -1
- data/lib/rigor/cli/plugin_command.rb +4 -4
- data/lib/rigor/cli/plugins_command.rb +2 -1
- data/lib/rigor/cli/prism_colorizer.rb +1 -2
- data/lib/rigor/cli/protection_fork_scan.rb +6 -6
- data/lib/rigor/cli/show_bleedingedge_command.rb +1 -1
- data/lib/rigor/cli/sig_gen_command.rb +212 -31
- data/lib/rigor/cli/skill_command.rb +2 -2
- data/lib/rigor/cli/skill_deep_probe.rb +4 -4
- data/lib/rigor/cli/skill_describe.rb +35 -35
- data/lib/rigor/cli/trace_command.rb +4 -4
- data/lib/rigor/cli/trace_renderer.rb +5 -6
- data/lib/rigor/cli/triage_command.rb +1 -1
- data/lib/rigor/cli/type_of_command.rb +29 -11
- data/lib/rigor/cli/type_of_renderer.rb +20 -9
- data/lib/rigor/cli/type_of_template_probe.rb +189 -0
- data/lib/rigor/cli/type_scan_command.rb +4 -4
- data/lib/rigor/cli/unused_command.rb +11 -3
- data/lib/rigor/cli/upgrade_command.rb +1 -1
- data/lib/rigor/cli.rb +89 -9
- data/lib/rigor/config_audit.rb +30 -5
- data/lib/rigor/configuration/severity_profile.rb +25 -9
- data/lib/rigor/configuration.rb +109 -7
- data/lib/rigor/effects/ancestry_recorder.rb +191 -0
- data/lib/rigor/effects/attribution.rb +12 -5
- data/lib/rigor/effects/callee_rule.rb +368 -0
- data/lib/rigor/effects/catalog.rb +7 -4
- data/lib/rigor/effects/collector.rb +11 -5
- data/lib/rigor/effects/config_envelopes.rb +15 -10
- data/lib/rigor/effects/definition_context.rb +179 -0
- data/lib/rigor/effects/definition_lines.rb +25 -6
- data/lib/rigor/effects/effect_table.rb +11 -4
- data/lib/rigor/effects/entry_points.rb +0 -2
- data/lib/rigor/effects/envelope_check.rb +9 -9
- data/lib/rigor/effects/envelope_index.rb +20 -8
- data/lib/rigor/effects/file_collection.rb +59 -5
- data/lib/rigor/effects/framework_units.rb +5 -7
- data/lib/rigor/effects/identity.rb +20 -6
- data/lib/rigor/effects/inline_anchor.rb +7 -7
- data/lib/rigor/effects/label_intent.rb +3 -4
- data/lib/rigor/effects/liskov_check.rb +8 -8
- data/lib/rigor/effects/local_ownership.rb +38 -12
- data/lib/rigor/effects/method_key.rb +22 -1
- data/lib/rigor/effects/mutation_classifier.rb +23 -12
- data/lib/rigor/effects/plugin_facts.rb +47 -37
- data/lib/rigor/effects/propagator.rb +297 -19
- data/lib/rigor/effects/registry.rb +1 -1
- data/lib/rigor/effects/scanner.rb +122 -73
- data/lib/rigor/effects/signature_sources.rb +4 -6
- data/lib/rigor/effects/snapshot.rb +12 -11
- data/lib/rigor/effects/snapshot_diff.rb +1 -1
- data/lib/rigor/effects/summary.rb +27 -4
- data/lib/rigor/effects/unit_scan.rb +393 -38
- data/lib/rigor/effects/unknown_label_check.rb +3 -8
- data/lib/rigor/effects/unknown_label_report.rb +3 -4
- data/lib/rigor/effects/visibility.rb +101 -0
- data/lib/rigor/environment/bundle_sig_discovery.rb +6 -6
- data/lib/rigor/environment/class_registry.rb +3 -1
- data/lib/rigor/environment/failure_slot.rb +2 -2
- data/lib/rigor/environment/installed_gem_set.rb +85 -0
- data/lib/rigor/environment/lockfile_resolver.rb +68 -4
- data/lib/rigor/environment/member_consistency/comparator.rb +708 -0
- data/lib/rigor/environment/member_consistency.rb +298 -0
- data/lib/rigor/environment/missing_gem_constant_index.rb +4 -4
- data/lib/rigor/environment/rbs_collection_discovery.rb +5 -5
- data/lib/rigor/environment/rbs_coverage_report.rb +5 -5
- data/lib/rigor/environment/rbs_hierarchy.rb +3 -1
- data/lib/rigor/environment/rbs_loader.rb +674 -79
- data/lib/rigor/environment.rb +174 -24
- data/lib/rigor/flow_contribution/merger.rb +0 -2
- data/lib/rigor/flow_contribution.rb +11 -13
- data/lib/rigor/hashing/xxh3.rb +264 -0
- data/lib/rigor/inference/acceptance.rb +292 -17
- data/lib/rigor/inference/block_auto_splat.rb +216 -0
- data/lib/rigor/inference/block_call_timing.rb +338 -0
- data/lib/rigor/inference/block_parameter_binder.rb +75 -30
- data/lib/rigor/inference/block_repetition.rb +71 -0
- data/lib/rigor/inference/body_fixpoint.rb +7 -6
- data/lib/rigor/inference/budget_trace.rb +3 -6
- data/lib/rigor/inference/builtins/method_catalog.rb +2 -1
- data/lib/rigor/inference/builtins/string_catalog.rb +1 -1
- data/lib/rigor/inference/captured_locals.rb +389 -18
- data/lib/rigor/inference/closure_escape_analyzer.rb +159 -17
- data/lib/rigor/inference/content_join.rb +200 -27
- data/lib/rigor/inference/coverage_scanner.rb +4 -6
- data/lib/rigor/inference/def_return_typer.rb +11 -7
- data/lib/rigor/inference/define_method_block_self.rb +64 -0
- data/lib/rigor/inference/dynamic_origin.rb +1 -1
- data/lib/rigor/inference/element_read_widening.rb +180 -0
- data/lib/rigor/inference/error_info.rb +196 -0
- data/lib/rigor/inference/expression_typer.rb +2124 -468
- data/lib/rigor/inference/external_ancestor_resolution.rb +267 -0
- data/lib/rigor/inference/fork_map.rb +5 -7
- data/lib/rigor/inference/fresh_frame_blocks.rb +127 -0
- data/lib/rigor/inference/global_write_census.rb +239 -0
- data/lib/rigor/inference/guard_rebinding.rb +447 -0
- data/lib/rigor/inference/hash_lookup_mutation.rb +88 -0
- data/lib/rigor/inference/hkt_reducer.rb +2 -3
- data/lib/rigor/inference/hkt_registry.rb +4 -7
- data/lib/rigor/inference/index_write_widening.rb +16 -7
- data/lib/rigor/inference/indexed_narrowing.rb +61 -9
- data/lib/rigor/inference/jump_targets.rb +82 -0
- data/lib/rigor/inference/last_line/implicit_self.rb +210 -0
- data/lib/rigor/inference/last_line/self_evidence.rb +329 -0
- data/lib/rigor/inference/last_line.rb +340 -0
- data/lib/rigor/inference/last_status.rb +144 -0
- data/lib/rigor/inference/macro_block_self_type.rb +168 -21
- data/lib/rigor/inference/match_rebinding/calls.rb +281 -0
- data/lib/rigor/inference/match_rebinding/frame.rb +148 -0
- data/lib/rigor/inference/match_rebinding/operands.rb +236 -0
- data/lib/rigor/inference/match_rebinding/self_calls.rb +83 -0
- data/lib/rigor/inference/match_rebinding.rb +392 -0
- data/lib/rigor/inference/method_dispatcher/alias_strict_nominals.rb +36 -0
- data/lib/rigor/inference/method_dispatcher/block_folding.rb +87 -33
- data/lib/rigor/inference/method_dispatcher/cgi_folding.rb +1 -1
- data/lib/rigor/inference/method_dispatcher/constant_folding.rb +305 -19
- data/lib/rigor/inference/method_dispatcher/data_folding.rb +1 -1
- data/lib/rigor/inference/method_dispatcher/facet_distribution.rb +147 -0
- data/lib/rigor/inference/method_dispatcher/file_folding.rb +1 -1
- data/lib/rigor/inference/method_dispatcher/hash_transform_keys_folding.rb +191 -0
- data/lib/rigor/inference/method_dispatcher/iterator_dispatch.rb +6 -2
- data/lib/rigor/inference/method_dispatcher/json_folding.rb +1 -1
- data/lib/rigor/inference/method_dispatcher/kernel_dispatch.rb +7 -1
- data/lib/rigor/inference/method_dispatcher/match_data_folding.rb +159 -0
- data/lib/rigor/inference/method_dispatcher/math_folding.rb +41 -3
- data/lib/rigor/inference/method_dispatcher/method_folding.rb +2 -5
- data/lib/rigor/inference/method_dispatcher/overload_selector.rb +165 -111
- data/lib/rigor/inference/method_dispatcher/process_folding.rb +56 -0
- data/lib/rigor/inference/method_dispatcher/proven_overload.rb +72 -0
- data/lib/rigor/inference/method_dispatcher/random_folding.rb +82 -0
- data/lib/rigor/inference/method_dispatcher/rbs_dispatch.rb +1046 -69
- data/lib/rigor/inference/method_dispatcher/receiver_affinity.rb +25 -4
- data/lib/rigor/inference/method_dispatcher/reduce_folding.rb +2 -8
- data/lib/rigor/inference/method_dispatcher/regexp_folding.rb +1 -1
- data/lib/rigor/inference/method_dispatcher/self_substitute.rb +142 -0
- data/lib/rigor/inference/method_dispatcher/set_folding.rb +1 -1
- data/lib/rigor/inference/method_dispatcher/shape_dispatch.rb +129 -54
- data/lib/rigor/inference/method_dispatcher/shellwords_folding.rb +1 -1
- data/lib/rigor/inference/method_dispatcher/singleton_mixin_dispatch.rb +1 -2
- data/lib/rigor/inference/method_dispatcher/struct_folding.rb +5 -6
- data/lib/rigor/inference/method_dispatcher/struct_materialization.rb +85 -4
- data/lib/rigor/inference/method_dispatcher/time_folding.rb +1 -1
- data/lib/rigor/inference/method_dispatcher/universal_object_dispatch.rb +1 -2
- data/lib/rigor/inference/method_dispatcher/uri_folding.rb +1 -1
- data/lib/rigor/inference/method_dispatcher.rb +225 -25
- data/lib/rigor/inference/method_parameter_binder.rb +12 -9
- data/lib/rigor/inference/multi_target_binder.rb +341 -55
- data/lib/rigor/inference/mutation_rejoin.rb +171 -0
- data/lib/rigor/inference/mutation_widening.rb +156 -85
- data/lib/rigor/inference/narrowing.rb +835 -162
- data/lib/rigor/inference/operand_effects.rb +167 -0
- data/lib/rigor/inference/operand_walk.rb +88 -0
- data/lib/rigor/inference/optimistic_origin.rb +153 -16
- data/lib/rigor/inference/origin_lookup.rb +2 -3
- data/lib/rigor/inference/parameter_inference_collector.rb +7 -7
- data/lib/rigor/inference/pre_eval_constants.rb +6 -5
- data/lib/rigor/inference/precision_scanner.rb +3 -4
- data/lib/rigor/inference/project_method_ownership.rb +136 -0
- data/lib/rigor/inference/project_patched_methods.rb +9 -4
- data/lib/rigor/inference/project_patched_scanner.rb +10 -6
- data/lib/rigor/inference/protection_scanner.rb +1 -2
- data/lib/rigor/inference/range_constant.rb +57 -0
- data/lib/rigor/inference/rbs_type_translator.rb +49 -11
- data/lib/rigor/inference/receiver_alias.rb +93 -4
- data/lib/rigor/inference/receiver_blind_block.rb +219 -0
- data/lib/rigor/inference/refinement_mutation.rb +76 -0
- data/lib/rigor/inference/repeated_or_writes.rb +463 -0
- data/lib/rigor/inference/return_barrier.rb +54 -0
- data/lib/rigor/inference/rewrite_mutation.rb +120 -0
- data/lib/rigor/inference/scope_indexer.rb +5228 -627
- data/lib/rigor/inference/statement_evaluator.rb +3452 -595
- data/lib/rigor/inference/stored_block_call.rb +54 -0
- data/lib/rigor/inference/string_mutation.rb +97 -0
- data/lib/rigor/inference/struct_fold_safety.rb +6 -7
- data/lib/rigor/inference/synthetic_method_index.rb +1 -2
- data/lib/rigor/inference/synthetic_method_scanner.rb +4 -6
- data/lib/rigor/inference/unknown_store_widening.rb +200 -0
- data/lib/rigor/inference/unthreaded_rebinds.rb +282 -0
- data/lib/rigor/inference/version_guard.rb +28 -21
- data/lib/rigor/inference/void_origin.rb +3 -3
- data/lib/rigor/inference/void_tail_summary.rb +2 -4
- data/lib/rigor/language_server/buffer_table.rb +4 -4
- data/lib/rigor/language_server/completion_provider.rb +1 -1
- data/lib/rigor/language_server/debouncer.rb +0 -1
- data/lib/rigor/language_server/diagnostic_publisher.rb +7 -6
- data/lib/rigor/language_server/document_symbol_provider.rb +1 -1
- data/lib/rigor/language_server/folding_range_provider.rb +1 -1
- data/lib/rigor/language_server/hover_provider.rb +1 -1
- data/lib/rigor/language_server/hover_renderer.rb +4 -4
- data/lib/rigor/language_server/incremental_sync.rb +6 -6
- data/lib/rigor/language_server/project_context.rb +7 -8
- data/lib/rigor/language_server/publish_batcher.rb +2 -2
- data/lib/rigor/language_server/selection_range_provider.rb +2 -2
- data/lib/rigor/language_server/server.rb +9 -9
- data/lib/rigor/language_server/signature_help_provider.rb +1 -1
- data/lib/rigor/language_server/uri.rb +1 -1
- data/lib/rigor/mcp/server.rb +2 -1
- data/lib/rigor/plugin/base.rb +258 -26
- data/lib/rigor/plugin/box_probe.rb +91 -0
- data/lib/rigor/plugin/bundled_catalog.rb +167 -0
- data/lib/rigor/plugin/effect_attribution.rb +65 -11
- data/lib/rigor/plugin/effect_entry_points.rb +3 -3
- data/lib/rigor/plugin/fact_store.rb +6 -6
- data/lib/rigor/plugin/io_boundary.rb +93 -8
- data/lib/rigor/plugin/isolation.rb +29 -6
- data/lib/rigor/plugin/loader.rb +33 -13
- data/lib/rigor/plugin/macro/block_as_method.rb +45 -6
- data/lib/rigor/plugin/macro/heredoc_template.rb +1 -1
- data/lib/rigor/plugin/macro/trait_registry.rb +1 -1
- data/lib/rigor/plugin/manifest.rb +94 -11
- data/lib/rigor/plugin/registry.rb +76 -12
- data/lib/rigor/plugin/source_rbs_synthesis_reporter.rb +21 -4
- data/lib/rigor/plugin/template_unit.rb +196 -0
- data/lib/rigor/plugin/trust_policy.rb +2 -4
- data/lib/rigor/plugin/type_node_resolver.rb +3 -3
- data/lib/rigor/plugin.rb +1 -0
- data/lib/rigor/plugin_gap_advisory.rb +96 -0
- data/lib/rigor/project_environment.rb +138 -0
- data/lib/rigor/protection/analysis_guard.rb +93 -14
- data/lib/rigor/protection/closure_kill_oracle.rb +67 -23
- data/lib/rigor/protection/dependency_closure.rb +5 -8
- data/lib/rigor/protection/diagnostic_oracle.rb +2 -2
- data/lib/rigor/protection/discovery_seed.rb +14 -12
- data/lib/rigor/protection/kill_signature.rb +1 -4
- data/lib/rigor/protection/measurement_integrity.rb +1 -3
- data/lib/rigor/protection/mutation_cache.rb +7 -11
- data/lib/rigor/protection/mutation_scanner.rb +12 -15
- data/lib/rigor/protection/mutator.rb +2 -1
- data/lib/rigor/protection/test_suite_oracle.rb +5 -5
- data/lib/rigor/rbs_extended/conformance_checker.rb +4 -3
- data/lib/rigor/rbs_extended/envelope_scanner.rb +4 -6
- data/lib/rigor/rbs_extended/reporter.rb +36 -10
- data/lib/rigor/rbs_extended.rb +88 -21
- data/lib/rigor/reflection/constant_ancestors.rb +97 -0
- data/lib/rigor/reflection/constant_path.rb +139 -0
- data/lib/rigor/reflection.rb +93 -110
- data/lib/rigor/runtime/jit.rb +6 -8
- data/lib/rigor/scope/discovery_index.rb +165 -2
- data/lib/rigor/scope.rb +1041 -32
- data/lib/rigor/sig_gen/alias_index.rb +289 -0
- data/lib/rigor/sig_gen/classification.rb +22 -5
- data/lib/rigor/sig_gen/declaration_equivalence.rb +127 -0
- data/lib/rigor/sig_gen/effect_annotation.rb +202 -0
- data/lib/rigor/sig_gen/generator.rb +673 -53
- data/lib/rigor/sig_gen/inline_declarations.rb +184 -0
- data/lib/rigor/sig_gen/layout_index.rb +3 -4
- data/lib/rigor/sig_gen/meta_class_shape.rb +3 -5
- data/lib/rigor/sig_gen/method_candidate.rb +47 -3
- data/lib/rigor/sig_gen/observation_collector.rb +18 -16
- data/lib/rigor/sig_gen/path_mapper.rb +4 -6
- data/lib/rigor/sig_gen/rbs_validity.rb +4 -4
- data/lib/rigor/sig_gen/renderer.rb +128 -14
- data/lib/rigor/sig_gen/skip_reason_catalog.rb +154 -0
- data/lib/rigor/sig_gen/superclass_spelling.rb +27 -0
- data/lib/rigor/sig_gen/type_elaborator.rb +1 -3
- data/lib/rigor/sig_gen/write_result.rb +19 -3
- data/lib/rigor/sig_gen/writer.rb +189 -41
- data/lib/rigor/sig_gen.rb +3 -0
- data/lib/rigor/signature_path_audit.rb +153 -6
- data/lib/rigor/source/literals.rb +0 -23
- data/lib/rigor/source/node_children.rb +0 -2
- data/lib/rigor/source/node_locator.rb +5 -11
- data/lib/rigor/source/node_walker.rb +0 -6
- data/lib/rigor/source/parameter_envelope.rb +72 -0
- data/lib/rigor/source.rb +1 -0
- data/lib/rigor/triage/catalogue.rb +1 -3
- data/lib/rigor/triage.rb +3 -5
- data/lib/rigor/type/accepts_result.rb +24 -6
- data/lib/rigor/type/combinator.rb +144 -5
- data/lib/rigor/type/data_class.rb +2 -2
- data/lib/rigor/type/data_instance.rb +4 -4
- data/lib/rigor/type/difference.rb +1 -0
- data/lib/rigor/type/float_range.rb +128 -0
- data/lib/rigor/type/hash_shape.rb +6 -6
- data/lib/rigor/type/integer_range.rb +13 -8
- data/lib/rigor/type/nominal.rb +8 -2
- data/lib/rigor/type/refined.rb +4 -3
- data/lib/rigor/type/struct_class.rb +3 -3
- data/lib/rigor/type/struct_instance.rb +4 -4
- data/lib/rigor/type.rb +1 -0
- data/lib/rigor/type_node/generic.rb +1 -1
- data/lib/rigor/type_node/range_literal.rb +25 -0
- data/lib/rigor/type_node/resolver_chain.rb +1 -1
- data/lib/rigor/type_node.rb +1 -0
- data/lib/rigor/version.rb +1 -1
- data/lib/rigor.rb +1 -0
- data/plugins/rigor-actioncable/lib/rigor/plugin/actioncable/analyzer.rb +0 -4
- data/plugins/rigor-actioncable/lib/rigor/plugin/actioncable/channel_discoverer.rb +0 -1
- data/plugins/rigor-actioncable/lib/rigor/plugin/actioncable/channel_index.rb +0 -2
- data/plugins/rigor-actioncable/lib/rigor/plugin/actioncable/effects.rb +1 -0
- data/plugins/rigor-actioncable/lib/rigor/plugin/actioncable.rb +10 -5
- data/plugins/rigor-actionmailer/lib/rigor/plugin/actionmailer/analyzer.rb +0 -4
- data/plugins/rigor-actionmailer/lib/rigor/plugin/actionmailer/mailer_discoverer.rb +3 -5
- data/plugins/rigor-actionmailer/lib/rigor/plugin/actionmailer/mailer_index.rb +1 -4
- data/plugins/rigor-actionmailer/lib/rigor/plugin/actionmailer.rb +14 -4
- data/plugins/rigor-actionpack/lib/rigor/plugin/actionpack/analyzer.rb +32 -30
- data/plugins/rigor-actionpack/lib/rigor/plugin/actionpack/controller_discoverer.rb +0 -1
- data/plugins/rigor-actionpack/lib/rigor/plugin/actionpack/controller_index.rb +1 -3
- data/plugins/rigor-actionpack/lib/rigor/plugin/actionpack/controller_scan.rb +96 -0
- data/plugins/rigor-actionpack/lib/rigor/plugin/actionpack/effects.rb +65 -8
- data/plugins/rigor-actionpack/lib/rigor/plugin/actionpack/erb_compiler.rb +270 -0
- data/plugins/rigor-actionpack/lib/rigor/plugin/actionpack/render_locals.rb +402 -0
- data/plugins/rigor-actionpack/lib/rigor/plugin/actionpack/view_assigns.rb +370 -0
- data/plugins/rigor-actionpack/lib/rigor/plugin/actionpack/view_units.rb +132 -0
- data/plugins/rigor-actionpack/lib/rigor/plugin/actionpack.rb +264 -3
- data/plugins/rigor-actionpack/sig/action_controller.rbs +71 -0
- data/plugins/rigor-actionpack/sig/action_view.rbs +43 -0
- data/plugins/rigor-active-model-serializers/lib/rigor/plugin/active_model_serializers/serializer_discoverer.rb +220 -0
- data/plugins/rigor-active-model-serializers/lib/rigor/plugin/active_model_serializers/serializer_index.rb +56 -0
- data/plugins/rigor-active-model-serializers/lib/rigor/plugin/active_model_serializers.rb +263 -0
- data/plugins/rigor-active-model-serializers/lib/rigor-active-model-serializers.rb +7 -0
- data/plugins/rigor-active-model-serializers/sig/active_model_serializers.rbs +45 -0
- data/plugins/rigor-activejob/lib/rigor/plugin/activejob/analyzer.rb +0 -4
- data/plugins/rigor-activejob/lib/rigor/plugin/activejob/effects.rb +2 -1
- data/plugins/rigor-activejob/lib/rigor/plugin/activejob/job_discoverer.rb +0 -1
- data/plugins/rigor-activejob/lib/rigor/plugin/activejob/job_index.rb +0 -2
- data/plugins/rigor-activejob/lib/rigor/plugin/activejob/recurring_scan.rb +1 -1
- data/plugins/rigor-activejob/lib/rigor/plugin/activejob.rb +10 -5
- data/plugins/rigor-activerecord/lib/rigor/plugin/activerecord/analyzer.rb +35 -3
- data/plugins/rigor-activerecord/lib/rigor/plugin/activerecord/effects.rb +72 -12
- data/plugins/rigor-activerecord/lib/rigor/plugin/activerecord/model_discoverer.rb +383 -7
- data/plugins/rigor-activerecord/lib/rigor/plugin/activerecord/model_index.rb +14 -6
- data/plugins/rigor-activerecord/lib/rigor/plugin/activerecord/schema_parser.rb +1 -2
- data/plugins/rigor-activerecord/lib/rigor/plugin/activerecord/structure_sql_parser.rb +1 -2
- data/plugins/rigor-activerecord/lib/rigor/plugin/activerecord.rb +322 -41
- data/plugins/rigor-activerecord/sig/active_record/framework.rbs +123 -0
- data/plugins/rigor-activerecord/sig/active_record/relation.rbs +206 -31
- data/plugins/rigor-activestorage/lib/rigor/plugin/activestorage.rb +26 -14
- data/plugins/rigor-activesupport-core-ext/lib/rigor/plugin/activesupport_core_ext/effects.rb +9 -2
- data/plugins/rigor-activesupport-core-ext/lib/rigor/plugin/activesupport_core_ext.rb +9 -2
- data/plugins/rigor-activesupport-core-ext/sig/active_support/core_ext.rbs +290 -19
- data/plugins/rigor-devise/lib/rigor/plugin/devise.rb +1 -0
- data/plugins/rigor-dry-monads/lib/rigor/plugin/dry_monads.rb +3 -0
- data/plugins/rigor-dry-schema/lib/rigor/plugin/dry_schema/schema_scanner.rb +9 -7
- data/plugins/rigor-dry-schema/lib/rigor/plugin/dry_schema.rb +7 -3
- data/plugins/rigor-dry-struct/lib/rigor/plugin/dry_struct.rb +1 -0
- data/plugins/rigor-dry-types/lib/rigor/plugin/dry_types/alias_scanner.rb +8 -6
- data/plugins/rigor-dry-types/lib/rigor/plugin/dry_types.rb +11 -7
- data/plugins/rigor-dry-validation/lib/rigor/plugin/dry_validation/contract_scanner.rb +13 -11
- data/plugins/rigor-dry-validation/lib/rigor/plugin/dry_validation.rb +9 -4
- data/plugins/rigor-ethon/lib/rigor/plugin/ethon.rb +2 -0
- data/plugins/rigor-factorybot/lib/rigor/plugin/factorybot/analyzer.rb +0 -5
- data/plugins/rigor-factorybot/lib/rigor/plugin/factorybot/factory_discoverer.rb +0 -1
- data/plugins/rigor-factorybot/lib/rigor/plugin/factorybot/factory_index.rb +0 -1
- data/plugins/rigor-factorybot/lib/rigor/plugin/factorybot.rb +8 -1
- data/plugins/rigor-ffi/lib/rigor/plugin/ffi/types.rb +1 -1
- data/plugins/rigor-ffi/lib/rigor/plugin/ffi.rb +36 -4
- data/plugins/rigor-ffi-rzmq/lib/rigor/plugin/ffi_rzmq.rb +1 -0
- data/plugins/rigor-grape/lib/rigor/plugin/grape.rb +141 -0
- data/plugins/rigor-grape/lib/rigor-grape.rb +6 -0
- data/plugins/rigor-grape/sig/grape.rbs +263 -0
- data/plugins/rigor-graphql/lib/rigor/plugin/graphql/type_scanner.rb +8 -6
- data/plugins/rigor-graphql/lib/rigor/plugin/graphql.rb +78 -5
- data/plugins/rigor-graphql/sig/graphql.rbs +485 -0
- data/plugins/rigor-hanami/lib/rigor/plugin/hanami.rb +1 -0
- data/plugins/rigor-mangrove/lib/rigor/plugin/mangrove.rb +2 -1
- data/plugins/rigor-minitest/lib/rigor/plugin/minitest/assertion_analyzer.rb +2 -3
- data/plugins/rigor-minitest/lib/rigor/plugin/minitest.rb +1 -0
- data/plugins/rigor-pundit/lib/rigor/plugin/pundit/analyzer.rb +0 -5
- data/plugins/rigor-pundit/lib/rigor/plugin/pundit/authorization_scan.rb +2 -2
- data/plugins/rigor-pundit/lib/rigor/plugin/pundit/policy_discoverer.rb +0 -1
- data/plugins/rigor-pundit/lib/rigor/plugin/pundit/policy_index.rb +0 -1
- data/plugins/rigor-pundit/lib/rigor/plugin/pundit.rb +12 -7
- data/plugins/rigor-rails-i18n/lib/rigor/plugin/rails_i18n/analyzer.rb +0 -12
- data/plugins/rigor-rails-i18n/lib/rigor/plugin/rails_i18n/locale_index.rb +1 -3
- data/plugins/rigor-rails-i18n/lib/rigor/plugin/rails_i18n/locale_loader.rb +0 -1
- data/plugins/rigor-rails-i18n/lib/rigor/plugin/rails_i18n.rb +36 -37
- data/plugins/rigor-rails-routes/lib/rigor/plugin/rails_routes/acronyms.rb +5 -5
- data/plugins/rigor-rails-routes/lib/rigor/plugin/rails_routes/analyzer.rb +0 -10
- data/plugins/rigor-rails-routes/lib/rigor/plugin/rails_routes/devise_routes.rb +5 -3
- data/plugins/rigor-rails-routes/lib/rigor/plugin/rails_routes/doorkeeper_routes.rb +3 -2
- data/plugins/rigor-rails-routes/lib/rigor/plugin/rails_routes/grape_api_discoverer.rb +2 -2
- data/plugins/rigor-rails-routes/lib/rigor/plugin/rails_routes/helper_discoverer.rb +2 -2
- data/plugins/rigor-rails-routes/lib/rigor/plugin/rails_routes/helper_table.rb +9 -10
- data/plugins/rigor-rails-routes/lib/rigor/plugin/rails_routes/routes_parser.rb +2 -3
- data/plugins/rigor-rails-routes/lib/rigor/plugin/rails_routes.rb +10 -17
- data/plugins/rigor-railties/lib/rigor/plugin/railties.rb +1 -0
- data/plugins/rigor-rbnacl/lib/rigor/plugin/rbnacl.rb +13 -1
- data/plugins/rigor-rbs-inline/lib/rigor/plugin/rbs_inline/same_line_annotations.rb +149 -0
- data/plugins/rigor-rbs-inline/lib/rigor/plugin/rbs_inline.rb +324 -18
- data/plugins/rigor-rspec/lib/rigor/plugin/rspec/analyzer.rb +0 -3
- data/plugins/rigor-rspec/lib/rigor/plugin/rspec/let_scope_index.rb +0 -3
- data/plugins/rigor-rspec/lib/rigor/plugin/rspec/let_type_resolver.rb +1 -5
- data/plugins/rigor-rspec/lib/rigor/plugin/rspec/matcher_analyzer.rb +2 -3
- data/plugins/rigor-rspec/lib/rigor/plugin/rspec.rb +1 -0
- data/plugins/rigor-rspec-rails/lib/rigor/plugin/rspec_rails/have_http_status_analyzer.rb +0 -3
- data/plugins/rigor-rspec-rails/lib/rigor/plugin/rspec_rails.rb +1 -0
- data/plugins/rigor-sassc/lib/rigor/plugin/sassc.rb +1 -0
- data/plugins/rigor-shoulda-matchers/lib/rigor/plugin/shoulda_matchers/analyzer.rb +1 -9
- data/plugins/rigor-shoulda-matchers/lib/rigor/plugin/shoulda_matchers.rb +1 -0
- data/plugins/rigor-sidekiq/lib/rigor/plugin/sidekiq/analyzer.rb +0 -4
- data/plugins/rigor-sidekiq/lib/rigor/plugin/sidekiq/effects.rb +1 -1
- data/plugins/rigor-sidekiq/lib/rigor/plugin/sidekiq/schedule_scan.rb +2 -1
- data/plugins/rigor-sidekiq/lib/rigor/plugin/sidekiq/worker_discoverer.rb +0 -1
- data/plugins/rigor-sidekiq/lib/rigor/plugin/sidekiq/worker_index.rb +0 -2
- data/plugins/rigor-sidekiq/lib/rigor/plugin/sidekiq.rb +10 -5
- data/plugins/rigor-sinatra/lib/rigor/plugin/sinatra.rb +1 -0
- data/plugins/rigor-sorbet/lib/rigor/plugin/sorbet/absurd_recognizer.rb +2 -5
- data/plugins/rigor-sorbet/lib/rigor/plugin/sorbet/assertion_recognizer.rb +1 -4
- data/plugins/rigor-sorbet/lib/rigor/plugin/sorbet/catalog.rb +3 -9
- data/plugins/rigor-sorbet/lib/rigor/plugin/sorbet/catalog_walker.rb +4 -4
- data/plugins/rigor-sorbet/lib/rigor/plugin/sorbet/sig_parser.rb +1 -2
- data/plugins/rigor-sorbet/lib/rigor/plugin/sorbet/sigil_detector.rb +3 -5
- data/plugins/rigor-sorbet/lib/rigor/plugin/sorbet/type_translator.rb +7 -5
- data/plugins/rigor-sorbet/lib/rigor/plugin/sorbet.rb +51 -6
- data/plugins/rigor-sorbet/sig/sorbet.rbs +277 -0
- data/plugins/rigor-statesman/lib/rigor/plugin/statesman.rb +1 -0
- data/sig/rigor/analysis/baseline.rbs +69 -7
- data/sig/rigor/analysis/fact_store.rbs +1 -1
- data/sig/rigor/analysis/project_scan.rbs +74 -0
- data/sig/rigor/analysis/reachability/scan_cache.rbs +12 -0
- data/sig/rigor/cache.rbs +2 -3
- data/sig/rigor/effects/config_envelopes.rbs +100 -0
- data/sig/rigor/effects/effect_table.rbs +60 -0
- data/sig/rigor/effects/envelope.rbs +97 -0
- data/sig/rigor/effects/envelope_index.rbs +33 -0
- data/sig/rigor/effects/file_collection.rbs +81 -0
- data/sig/rigor/effects/label.rbs +26 -0
- data/sig/rigor/effects/label_set.rbs +46 -0
- data/sig/rigor/effects/method_key.rbs +24 -0
- data/sig/rigor/effects/origin.rbs +50 -0
- data/sig/rigor/effects/plugin_facts.rbs +141 -0
- data/sig/rigor/effects/registry.rbs +68 -0
- data/sig/rigor/effects/summary.rbs +50 -0
- data/sig/rigor/effects/taint_cause.rbs +12 -0
- data/sig/rigor/environment.rbs +17 -10
- data/sig/rigor/inference/optimistic_origin.rbs +10 -0
- data/sig/rigor/inference.rbs +9 -14
- data/sig/rigor/plugin/additional_initializer.rbs +36 -0
- data/sig/rigor/plugin/base.rbs +30 -7
- data/sig/rigor/plugin/effect_ancestry.rbs +27 -0
- data/sig/rigor/plugin/effect_attribution.rbs +66 -0
- data/sig/rigor/plugin/effect_edge.rbs +33 -0
- data/sig/rigor/plugin/effect_entry_points.rbs +25 -0
- data/sig/rigor/plugin/io_boundary.rbs +4 -0
- data/sig/rigor/plugin/loader.rbs +3 -3
- data/sig/rigor/plugin/manifest.rbs +51 -11
- data/sig/rigor/plugin/protocol_contract.rbs +68 -0
- data/sig/rigor/plugin/registry.rbs +62 -1
- data/sig/rigor/plugin.rbs +1 -1
- data/sig/rigor/rbs_extended.rbs +1 -1
- data/sig/rigor/reflection.rbs +9 -6
- data/sig/rigor/scope.rbs +148 -12
- data/sig/rigor/sig_gen/skip_reason_catalog.rbs +21 -0
- data/sig/rigor/source.rbs +4 -4
- data/sig/rigor/testing.rbs +10 -4
- data/sig/rigor/type.rbs +33 -1
- data/sig/rigor.rbs +39 -20
- data/skills/rigor-ask/SKILL.md +16 -11
- data/skills/rigor-baseline-reduce/SKILL.md +4 -6
- data/skills/rigor-ci-setup/SKILL.md +17 -21
- data/skills/rigor-doctor/SKILL.md +24 -22
- data/skills/rigor-doctor/references/01-checks.md +97 -33
- data/skills/rigor-editor-setup/SKILL.md +6 -4
- data/skills/rigor-mcp-setup/SKILL.md +5 -4
- data/skills/rigor-monkeypatch-resolve/SKILL.md +5 -3
- data/skills/rigor-next-steps/SKILL.md +4 -2
- data/skills/rigor-plugin-author/SKILL.md +19 -23
- data/skills/rigor-plugin-author/references/01-plan-and-scaffold.md +9 -8
- data/skills/rigor-plugin-author/references/02-walker-and-types.md +25 -27
- data/skills/rigor-plugin-author/references/03-test-and-ship.md +6 -8
- data/skills/rigor-plugin-review/SKILL.md +6 -4
- data/skills/rigor-plugin-review/references/01-best-practices-checklist.md +2 -1
- data/skills/rigor-plugin-tune/SKILL.md +4 -2
- data/skills/rigor-project-init/SKILL.md +15 -10
- data/skills/rigor-project-init/references/01-detect.md +13 -9
- data/skills/rigor-project-init/references/02-configure.md +43 -14
- data/skills/rigor-project-init/references/03-baseline-and-bugs.md +14 -14
- data/skills/rigor-project-init/references/04-sig-uplift.md +27 -14
- data/skills/rigor-project-init/references/06-agent-contract.md +67 -0
- data/skills/rigor-protection-uplift/SKILL.md +4 -6
- data/skills/rigor-rbs-setup/SKILL.md +4 -2
- data/skills/rigor-type-oracle/SKILL.md +226 -0
- data/skills/rigor-type-oracle/references/01-oracle-commands.md +265 -0
- data/skills/rigor-type-oracle/references/02-agents-md-fragment.md +52 -0
- data/skills/rigor-type-oracle/references/03-gap-protocol.md +125 -0
- data/skills/rigor-unused-adjudicate/SKILL.md +12 -7
- data/skills/rigor-upgrade/SKILL.md +13 -8
- metadata +133 -3
- data/lib/rigor/cli/probe_environment.rb +0 -85
- data/sig/rigor/inference/builtins/numeric_catalog.rbs +0 -3
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Rigor
|
|
2
|
+
module Plugin
|
|
3
|
+
# One `effect_entry_points:` row: a named set of globs marking project files whose methods are
|
|
4
|
+
# framework entry points (ADR-103 WD6). Frozen value object; {#globs} are deduplicated and
|
|
5
|
+
# sorted in `initialize`.
|
|
6
|
+
class EffectEntryPoints
|
|
7
|
+
# sig-gen gap: #1154 — `to_s`-normalized in `initialize` from the `name:` parameter.
|
|
8
|
+
attr_reader name: String
|
|
9
|
+
# sig-gen gap: #1154 — deduplicated/sorted/frozen in `initialize` from `globs:`.
|
|
10
|
+
attr_reader globs: Array[String]
|
|
11
|
+
# sig-gen gap: #1154 — `to_s`-normalized in `initialize` from `why:`.
|
|
12
|
+
attr_reader why: String
|
|
13
|
+
|
|
14
|
+
def initialize: (name: untyped, globs: untyped, ?why: untyped) -> void
|
|
15
|
+
|
|
16
|
+
def to_h: () -> Hash[String, untyped]
|
|
17
|
+
|
|
18
|
+
def ==: (untyped other) -> bool
|
|
19
|
+
# `alias eql? ==` — the alias row has no sig-gen shape, so it stays unmarked
|
|
20
|
+
# residue.
|
|
21
|
+
def eql?: (untyped other) -> bool
|
|
22
|
+
def hash: () -> Integer
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -3,6 +3,10 @@ class Rigor::Plugin::IoBoundary
|
|
|
3
3
|
def read_file: (untyped) -> String
|
|
4
4
|
def file?: (untyped) -> bool
|
|
5
5
|
def directory?: (untyped) -> bool
|
|
6
|
+
def list_directory: (untyped) -> Array[String]
|
|
7
|
+
# sig-gen gap: #1156 — the generator pins the empty-summary literal (`count: 0, first_path: nil`); the
|
|
8
|
+
# record's fields are the running count and the first refused path, nil when nothing was refused.
|
|
9
|
+
def refusal_summary: () -> { count: Integer, first_path: String?, nearest_root: String? }?
|
|
6
10
|
def open_url: (untyped url) -> String
|
|
7
11
|
# Returns a frozen `Rigor::Cache::Descriptor` (no RBS yet -> untyped).
|
|
8
12
|
def cache_descriptor: () -> untyped
|
data/sig/rigor/plugin/loader.rbs
CHANGED
|
@@ -12,9 +12,9 @@ module Rigor
|
|
|
12
12
|
attr_reader services: untyped
|
|
13
13
|
attr_reader requirer: ^(String) -> untyped
|
|
14
14
|
|
|
15
|
-
def self.load: (configuration: Configuration, services: untyped, ?requirer: ^(String) -> untyped) ->
|
|
16
|
-
def initialize: (services: untyped, ?requirer: ^(String) -> untyped) -> void
|
|
17
|
-
def load: (Array[String | Hash[untyped, untyped]] entries) ->
|
|
15
|
+
def self.load: (configuration: Configuration, services: untyped, ?requirer: ^(String) -> untyped, ?feature_resolver: untyped) -> Registry
|
|
16
|
+
def initialize: (services: untyped, ?requirer: ^(String) -> untyped, ?feature_resolver: untyped) -> void
|
|
17
|
+
def load: (Array[String | Hash[untyped, untyped]] entries) -> Registry
|
|
18
18
|
end
|
|
19
19
|
end
|
|
20
20
|
end
|
|
@@ -3,34 +3,74 @@ class Rigor::Plugin::Manifest::Consumption
|
|
|
3
3
|
end
|
|
4
4
|
|
|
5
5
|
class Rigor::Plugin::Manifest
|
|
6
|
-
def initialize: (id: untyped, version: untyped, ?description: untyped, ?config_schema: untyped, ?produces: untyped, ?consumes: untyped, ?owns_receivers: untyped, ?open_receivers: untyped, ?type_node_resolvers: untyped, ?block_as_methods: untyped, ?heredoc_templates: untyped, ?nested_class_templates: untyped, ?trait_registries: untyped, ?hkt_registrations: untyped, ?hkt_definitions: untyped, ?signature_paths: untyped, ?protocol_contracts:
|
|
6
|
+
def initialize: (id: untyped, version: untyped, ?description: untyped, ?config_schema: untyped, ?target_gems: untyped, ?produces: untyped, ?consumes: untyped, ?owns_receivers: untyped, ?open_receivers: untyped, ?rbs_complete_ancestors: untyped, ?type_node_resolvers: untyped, ?block_as_methods: untyped, ?heredoc_templates: untyped, ?nested_class_templates: untyped, ?trait_registries: untyped, ?hkt_registrations: untyped, ?hkt_definitions: untyped, ?signature_paths: untyped, ?protocol_contracts: Array[Rigor::Plugin::ProtocolContract], ?source_rbs_synthesizer: untyped, ?additional_initializers: Array[Rigor::Plugin::AdditionalInitializer], ?effect_root: String?, ?effect_labels: Array[String], ?effect_attributions: Array[Rigor::Plugin::EffectAttribution], ?effect_edges: Array[Rigor::Plugin::EffectEdge], ?effect_entry_points: Array[Rigor::Plugin::EffectEntryPoints], ?effect_ancestry: Array[Rigor::Plugin::EffectAncestry], ?template_globs: untyped) -> void
|
|
7
7
|
|
|
8
8
|
# Public attribute readers (the full `attr_reader` surface). Plugins
|
|
9
9
|
# read `manifest.id` / `manifest.protocol_contracts` etc.; declaring
|
|
10
10
|
# them keeps the contract surface resolvable so ADR-43 ancestor
|
|
11
11
|
# resolution does not surface a false `call.undefined-method` on a
|
|
12
|
-
# real reader.
|
|
13
|
-
#
|
|
12
|
+
# real reader. Slots whose element classes are sig-covered carry the
|
|
13
|
+
# validated element type (the `validate_*!` constructors prove it);
|
|
14
|
+
# the rest stay `untyped` per the sparse `sig/` tree.
|
|
14
15
|
def id: () -> String
|
|
15
16
|
def version: () -> String
|
|
16
17
|
def description: () -> String?
|
|
17
18
|
def config_schema: () -> untyped
|
|
18
19
|
def config_defaults: () -> Hash[String, untyped]
|
|
19
|
-
def
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
def
|
|
20
|
+
def target_gems: () -> Array[String]
|
|
21
|
+
# sig-gen gap: #1154 — an `attr_reader` over an ivar assigned in `initialize` from a parameter the
|
|
22
|
+
# manifest validates but does not type, so inference reaches `untyped` where the contract is
|
|
23
|
+
# `Array[String]` (the same gap every other reader in this block carries).
|
|
24
|
+
def template_globs: () -> Array[String]
|
|
25
|
+
def produces: () -> Array[Symbol]
|
|
26
|
+
def consumes: () -> Array[Rigor::Plugin::Manifest::Consumption]
|
|
27
|
+
def owns_receivers: () -> Array[String]
|
|
28
|
+
def open_receivers: () -> Array[String]
|
|
29
|
+
def rbs_complete_ancestors: () -> Array[String]
|
|
30
|
+
def type_node_resolvers: () -> Array[Rigor::Plugin::TypeNodeResolver]
|
|
24
31
|
def block_as_methods: () -> untyped
|
|
25
32
|
def heredoc_templates: () -> untyped
|
|
26
33
|
def nested_class_templates: () -> untyped
|
|
27
34
|
def trait_registries: () -> untyped
|
|
28
35
|
def hkt_registrations: () -> untyped
|
|
29
36
|
def hkt_definitions: () -> untyped
|
|
30
|
-
def signature_paths: () ->
|
|
31
|
-
|
|
37
|
+
def signature_paths: () -> Array[String]
|
|
38
|
+
# sig-gen gap: #1154 — `attr_reader` over an ivar assigned in `initialize` from a parameter;
|
|
39
|
+
# `validate_protocol_contracts!` requires every element `is_a?(ProtocolContract)`.
|
|
40
|
+
def protocol_contracts: () -> Array[Rigor::Plugin::ProtocolContract]
|
|
41
|
+
# ADR-32 WD6/WD12 — any object responding to `call`, and its result is a documented multi-shape
|
|
42
|
+
# outcome (`String` / nil / `[:error, msg]` / `[:ok, src, msgs]`), not `String?` — `untyped` is the
|
|
43
|
+
# honest claim until the outcome has a sig'd shape.
|
|
32
44
|
def source_rbs_synthesizer: () -> untyped
|
|
33
|
-
|
|
45
|
+
# sig-gen gap: #1154 — `attr_reader` over an ivar assigned in `initialize` from a parameter;
|
|
46
|
+
# the validator (`validate_additional_initializers!`) requires every element
|
|
47
|
+
# `is_a?(AdditionalInitializer)`, so the element type is hand-written.
|
|
48
|
+
def additional_initializers: () -> Array[Rigor::Plugin::AdditionalInitializer]
|
|
49
|
+
|
|
50
|
+
# sig-gen gap: #1154 — `attr_reader` over an ivar assigned in `initialize` from a parameter
|
|
51
|
+
# (`to_s`-normalized); `validate_effect_root!` bounds the spelling.
|
|
52
|
+
def effect_root: () -> String?
|
|
53
|
+
# sig-gen gap: #1154 — `attr_reader` over an ivar normalized in `initialize` from a parameter;
|
|
54
|
+
# `validate_effect_labels!` requires non-empty `String` elements.
|
|
55
|
+
def effect_labels: () -> Array[String]
|
|
56
|
+
# sig-gen gap: #1154 — `attr_reader` over an ivar assigned in `initialize` from a parameter;
|
|
57
|
+
# `validate_effect_attributions!` requires every element `is_a?(EffectAttribution)`.
|
|
58
|
+
def effect_attributions: () -> Array[Rigor::Plugin::EffectAttribution]
|
|
59
|
+
# sig-gen gap: #1154 — same shape; `validate_effect_edges!` requires `is_a?(EffectEdge)`.
|
|
60
|
+
def effect_edges: () -> Array[Rigor::Plugin::EffectEdge]
|
|
61
|
+
# sig-gen gap: #1154 — same shape; `validate_effect_entry_points!` requires
|
|
62
|
+
# `is_a?(EffectEntryPoints)`.
|
|
63
|
+
def effect_entry_points: () -> Array[Rigor::Plugin::EffectEntryPoints]
|
|
64
|
+
# sig-gen gap: #1154 — same shape; `validate_effect_ancestry!` requires `is_a?(EffectAncestry)`.
|
|
65
|
+
def effect_ancestry: () -> Array[Rigor::Plugin::EffectAncestry]
|
|
66
|
+
|
|
67
|
+
# The identity opening a root when this plugin's labels join the run's vocabulary: the
|
|
68
|
+
# `effect_root` for a bundled first-party plugin that declares one, the plugin `id` otherwise.
|
|
69
|
+
def effect_owner: () -> String
|
|
70
|
+
# Whether this plugin's `effect_attributions:` may carry `discharge: true` (ADR-103 WD6).
|
|
71
|
+
def effect_discharge_allowed?: () -> bool
|
|
72
|
+
# Whether the plugin contributes anything to the effect surfaces at all.
|
|
73
|
+
def effects?: () -> bool
|
|
34
74
|
|
|
35
75
|
def validate_config: (untyped) -> Array[String]
|
|
36
76
|
def to_h: () -> Hash[String, untyped]
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
module Rigor
|
|
2
|
+
module Plugin
|
|
3
|
+
# ADR-28 declaration — "every instance/singleton method named `method_name` in a file matching
|
|
4
|
+
# `path_glob` carries the declared parameter + return-type protocol" (provide-and-check). See
|
|
5
|
+
# lib/rigor/plugin/protocol_contract.rb for the full contract.
|
|
6
|
+
class ProtocolContract
|
|
7
|
+
VALID_SEVERITIES: Array[Symbol]
|
|
8
|
+
|
|
9
|
+
# One positional-parameter provision: zero-based index + fully-qualified type name.
|
|
10
|
+
class ParamType < ::Data
|
|
11
|
+
# sig-gen gap: #1150 — `Data.define` member reads carry no type; `coerce_param_type` proves
|
|
12
|
+
# `index` is a non-negative Integer and `type_name` a non-empty String, so the member rows
|
|
13
|
+
# are hand-written.
|
|
14
|
+
def index: () -> Integer
|
|
15
|
+
|
|
16
|
+
# sig-gen gap: #1150 — as above.
|
|
17
|
+
def type_name: () -> String
|
|
18
|
+
|
|
19
|
+
# sig-gen gap: #1150 — as above.
|
|
20
|
+
def self.new: (index: Integer, type_name: String) -> instance | (Integer index, String type_name) -> instance
|
|
21
|
+
|
|
22
|
+
# sig-gen gap: #1150 — as above.
|
|
23
|
+
def self.[]: (index: Integer, type_name: String) -> instance | (Integer index, String type_name) -> instance
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# sig-gen gap: #1154 — `attr_reader` rows over ivars assigned in `initialize`; each is
|
|
27
|
+
# validated/normalized first (`dup.freeze`/`to_sym`/truthiness collapse/coerce), so the
|
|
28
|
+
# stored types are hand-written.
|
|
29
|
+
attr_reader path_glob: String
|
|
30
|
+
|
|
31
|
+
# sig-gen gap: #1154 — as above (`to_sym` normalizes the accepted Symbol|String).
|
|
32
|
+
attr_reader method_name: Symbol
|
|
33
|
+
|
|
34
|
+
# `singleton ? true : false` collapses any truthy input to bool — sig-gen already infers
|
|
35
|
+
# `false | true`, so this row is generated-equivalent rather than a #1154 gap.
|
|
36
|
+
attr_reader singleton: bool
|
|
37
|
+
|
|
38
|
+
# sig-gen gap: #1154 — as above (`coerce_param_types` guarantees `Array[ParamType]`).
|
|
39
|
+
attr_reader param_types: Array[ParamType]
|
|
40
|
+
|
|
41
|
+
# sig-gen gap: #1154 — as above (nil or a non-empty `dup.freeze`d String).
|
|
42
|
+
attr_reader return_type_name: String?
|
|
43
|
+
|
|
44
|
+
# sig-gen gap: #1154 — as above (`VALID_SEVERITIES.include?(to_sym)` bounds the stored value
|
|
45
|
+
# to the three declared literals).
|
|
46
|
+
attr_reader severity: :error | :warning | :info
|
|
47
|
+
|
|
48
|
+
# `method_name`/`severity` accept String too (both are `to_sym`'d); `param_types` entries are
|
|
49
|
+
# ParamType or a Hash with `index`/`type_name` keys (String or Symbol keys accepted by the
|
|
50
|
+
# coercion). `singleton` is documented Boolean; the impl collapses any truthy value.
|
|
51
|
+
def initialize: (path_glob: String, method_name: Symbol | String, ?return_type_name: String?, ?param_types: Array[ParamType | Hash[untyped, untyped]], ?singleton: bool, ?severity: Symbol | String) -> void
|
|
52
|
+
|
|
53
|
+
# Copy with `path_glob` replaced — plugin config-folding hook for the convention path.
|
|
54
|
+
def with_path_glob: (String glob) -> ProtocolContract
|
|
55
|
+
|
|
56
|
+
# Values are String/bool/nil or the per-param `Hash[String, Integer | String]` rows — kept
|
|
57
|
+
# `untyped` to match the manifest's `to_h` convention.
|
|
58
|
+
def to_h: () -> Hash[String, untyped]
|
|
59
|
+
|
|
60
|
+
def ==: (untyped other) -> bool
|
|
61
|
+
|
|
62
|
+
# `alias eql? ==` — no sig-gen shape for alias rows; unmarked residue.
|
|
63
|
+
def eql?: (untyped other) -> bool
|
|
64
|
+
|
|
65
|
+
def hash: () -> Integer
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
@@ -8,9 +8,70 @@ class Rigor::Plugin::Registry
|
|
|
8
8
|
def self.materialize: (blueprints: untyped, services: untyped) -> Rigor::Plugin::Registry
|
|
9
9
|
|
|
10
10
|
def initialize: (?plugins: untyped, ?load_errors: untyped, ?blueprints: untyped) -> void
|
|
11
|
-
def find: (String | Symbol id) ->
|
|
11
|
+
def find: (String | Symbol id) -> Rigor::Plugin::Base?
|
|
12
12
|
def ids: () -> Array[String]
|
|
13
13
|
def empty?: () -> bool
|
|
14
14
|
def any_load_errors?: () -> bool
|
|
15
15
|
def type_node_resolvers: () -> Array[untyped]
|
|
16
|
+
def rbs_complete_ancestors: () -> Array[String]
|
|
17
|
+
def rbs_complete_ancestor?: (untyped class_name) -> bool
|
|
18
|
+
|
|
19
|
+
# Newly declared — the attr_reader was absent from the sig. `compile_aggregates` builds the ivar
|
|
20
|
+
# with `flat_map` over the manifests (not from an `initialize` parameter, so this is unmarked
|
|
21
|
+
# residue like the `rbs_complete_ancestors` sibling rather than a #1154 row); the element type is
|
|
22
|
+
# `AdditionalInitializer`, enforced per manifest by `validate_additional_initializers!`.
|
|
23
|
+
attr_reader additional_initializers: Array[Rigor::Plugin::AdditionalInitializer]
|
|
24
|
+
|
|
25
|
+
# Newly declared — same unmarked-residue shape as `additional_initializers` (a
|
|
26
|
+
# `compile_aggregates` flat_map ivar, not an initialize-parameter read).
|
|
27
|
+
attr_reader protocol_contracts: Array[Rigor::Plugin::ProtocolContract]
|
|
28
|
+
|
|
29
|
+
# The subset of `protocol_contracts` whose `path_glob` matches `path` (memoised per path).
|
|
30
|
+
def contracts_for_path: (untyped path) -> Array[Rigor::Plugin::ProtocolContract]
|
|
31
|
+
|
|
32
|
+
# ADR-103 WD2/WD6/WD10/WD14 — every loaded plugin's effect contribution, in registration order.
|
|
33
|
+
# Lazy and memoised like `contracts_for_path`: computing it can force a plugin's project-facts
|
|
34
|
+
# read, which a run with effects off must never pay. Unmarked residue — a memoised
|
|
35
|
+
# `filter_map` aggregate, not an `initialize`-parameter read.
|
|
36
|
+
def effect_contributions: () -> Array[Contribution]
|
|
37
|
+
|
|
38
|
+
# One plugin's effect contribution, flattened off whichever surface answered it. Carries the two
|
|
39
|
+
# authority answers — `owner`, the label root this plugin may open, and `discharge_allowed`,
|
|
40
|
+
# whether its attributions may discharge — so nothing downstream re-derives who is first-party.
|
|
41
|
+
class Contribution < ::Data
|
|
42
|
+
# sig-gen gap: #1150 — a `Data.define` member; sig-gen proposes `untyped`.
|
|
43
|
+
attr_reader id: String
|
|
44
|
+
# sig-gen gap: #1150 — a `Data.define` member.
|
|
45
|
+
attr_reader owner: String
|
|
46
|
+
# sig-gen gap: #1150 — a `Data.define` member.
|
|
47
|
+
attr_reader requested_root: String?
|
|
48
|
+
# sig-gen gap: #1150 — a `Data.define` member.
|
|
49
|
+
attr_reader discharge_allowed: bool
|
|
50
|
+
# sig-gen gap: #1150 — a `Data.define` member.
|
|
51
|
+
attr_reader labels: Array[String]
|
|
52
|
+
# sig-gen gap: #1150 — a `Data.define` member.
|
|
53
|
+
attr_reader attributions: Array[EffectAttribution]
|
|
54
|
+
# sig-gen gap: #1150 — a `Data.define` member.
|
|
55
|
+
attr_reader edges: Array[EffectEdge]
|
|
56
|
+
# sig-gen gap: #1150 — a `Data.define` member.
|
|
57
|
+
attr_reader entry_points: Array[EffectEntryPoints]
|
|
58
|
+
# sig-gen gap: #1150 — a `Data.define` member.
|
|
59
|
+
attr_reader ancestry: Array[EffectAncestry]
|
|
60
|
+
|
|
61
|
+
# sig-gen gap: #1150 — member constructor. The custom `initialize` defaults `ancestry:`;
|
|
62
|
+
# the positional arm `Data` dispatches bypasses it, so only the kwargs arm is declared
|
|
63
|
+
# (same shape as `Effects::PluginFacts::Row`).
|
|
64
|
+
def self.new: (id: String, owner: String, requested_root: String?, discharge_allowed: bool,
|
|
65
|
+
labels: Array[String], attributions: Array[EffectAttribution],
|
|
66
|
+
edges: Array[EffectEdge], entry_points: Array[EffectEntryPoints],
|
|
67
|
+
?ancestry: Array[EffectAncestry]) -> instance
|
|
68
|
+
# sig-gen gap: #1150 — as above.
|
|
69
|
+
def self.[]: (id: String, owner: String, requested_root: String?, discharge_allowed: bool,
|
|
70
|
+
labels: Array[String], attributions: Array[EffectAttribution],
|
|
71
|
+
edges: Array[EffectEdge], entry_points: Array[EffectEntryPoints],
|
|
72
|
+
?ancestry: Array[EffectAncestry]) -> instance
|
|
73
|
+
|
|
74
|
+
# Whether the row carries nothing — no labels, attributions, edges, entry points, or ancestry.
|
|
75
|
+
def empty?: () -> bool
|
|
76
|
+
end
|
|
16
77
|
end
|
data/sig/rigor/plugin.rbs
CHANGED
|
@@ -3,6 +3,6 @@ module Rigor
|
|
|
3
3
|
def self.register: (Class plugin_class) -> Class
|
|
4
4
|
def self.registered_for: (String | Symbol id) -> Class?
|
|
5
5
|
def self.registered: () -> Hash[String, Class]
|
|
6
|
-
def self.unregister!: (?(String | Symbol)? id) ->
|
|
6
|
+
def self.unregister!: (?(String | Symbol)? id) -> void
|
|
7
7
|
end
|
|
8
8
|
end
|
data/sig/rigor/rbs_extended.rbs
CHANGED
|
@@ -51,7 +51,7 @@ module Rigor
|
|
|
51
51
|
# (`RBS::Definition::Method#annotations`, or a declaration / member's own `#annotations`); the result
|
|
52
52
|
# is a `Rigor::Effects::Envelope`, or nil when the list carries neither purity spelling.
|
|
53
53
|
def self?.pure_annotation?: (String? string) -> bool
|
|
54
|
-
def self?.read_effect_envelope: (untyped annotations, owner_key: String, ?source: Symbol, ?registry: untyped, ?reporter: untyped) ->
|
|
54
|
+
def self?.read_effect_envelope: (untyped annotations, owner_key: String, ?source: Symbol, ?registry: untyped, ?reporter: untyped) -> Effects::Envelope?
|
|
55
55
|
|
|
56
56
|
class ParamOverride
|
|
57
57
|
attr_reader param_name: Symbol
|
data/sig/rigor/reflection.rbs
CHANGED
|
@@ -3,16 +3,19 @@ module Rigor
|
|
|
3
3
|
def self?.class_known?: (String | Symbol class_name, ?scope: Scope) -> bool
|
|
4
4
|
def self?.rbs_class_known?: (String | Symbol class_name, ?scope: Scope) -> bool
|
|
5
5
|
def self?.project_declared_class?: (String | Symbol class_name, ?scope: Scope?, ?environment: Environment?) -> bool
|
|
6
|
-
def self?.class_ordering: (String | Symbol lhs, String | Symbol rhs, ?scope: Scope) ->
|
|
6
|
+
def self?.class_ordering: (String | Symbol lhs, String | Symbol rhs, ?scope: Scope) -> (:disjoint | :equal | :subclass | :superclass | :unknown)
|
|
7
7
|
def self?.nominal_for_name: (String | Symbol class_name, ?scope: Scope) -> Type::Nominal?
|
|
8
8
|
def self?.singleton_for_name: (String | Symbol class_name, ?scope: Scope) -> Type::Singleton?
|
|
9
9
|
def self?.constant_type_for: (String | Symbol constant_name, ?scope: Scope) -> Type::t?
|
|
10
|
-
def self?.resolve_constant_type: (String | Symbol name, ?scope: Scope, ?rooted: bool) -> Type::t?
|
|
10
|
+
def self?.resolve_constant_type: (String | Symbol name, ?scope: Scope, ?rooted: bool, ?caller_derived: bool) -> Type::t?
|
|
11
|
+
# sig-gen gap: #1157 — sig-gen skips the method (untyped return: the `&known` block-taking resolver
|
|
12
|
+
# declines through `nil` paths), so the resolved-name-or-decline is hand-written.
|
|
13
|
+
def self?.resolve_constant_path_name: (String | Symbol name, Scope scope) { (String candidate) -> boolish } -> String?
|
|
11
14
|
def self?.lexical_nesting_chain: (Scope scope) -> Array[String]
|
|
12
|
-
def self?.instance_method_definition: (String | Symbol class_name, String | Symbol method_name, ?scope: Scope) ->
|
|
13
|
-
def self?.singleton_method_definition: (String | Symbol class_name, String | Symbol method_name, ?scope: Scope) ->
|
|
14
|
-
def self?.instance_definition: (String | Symbol class_name, ?scope: Scope) ->
|
|
15
|
-
def self?.singleton_definition: (String | Symbol class_name, ?scope: Scope) ->
|
|
15
|
+
def self?.instance_method_definition: (String | Symbol class_name, String | Symbol method_name, ?scope: Scope) -> ::RBS::Definition::Method?
|
|
16
|
+
def self?.singleton_method_definition: (String | Symbol class_name, String | Symbol method_name, ?scope: Scope) -> ::RBS::Definition::Method?
|
|
17
|
+
def self?.instance_definition: (String | Symbol class_name, ?scope: Scope) -> ::RBS::Definition?
|
|
18
|
+
def self?.singleton_definition: (String | Symbol class_name, ?scope: Scope) -> ::RBS::Definition?
|
|
16
19
|
def self?.class_type_param_names: (String | Symbol class_name, ?scope: Scope) -> Array[Symbol]
|
|
17
20
|
def self?.discovered_class?: (String | Symbol class_name, ?scope: Scope) -> bool
|
|
18
21
|
def self?.discovered_method?: (String | Symbol class_name, String | Symbol method_name, ?kind: Symbol, ?scope: Scope) -> bool
|
data/sig/rigor/scope.rbs
CHANGED
|
@@ -14,14 +14,29 @@ module Rigor
|
|
|
14
14
|
attr_reader void_origins: Hash[untyped, Inference::VoidOrigin]
|
|
15
15
|
attr_reader plugin_typed_calls: Hash[untyped, bool]
|
|
16
16
|
attr_reader optimistic_origins: Hash[untyped, Symbol]
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
# A marked binding whose miss answer is known stores an `Inference::OptimisticOrigin::BoundMark` (a `Data`)
|
|
18
|
+
# in place of its bare cause (issue #1302).
|
|
19
|
+
attr_reader optimistic_locals: Hash[Symbol, Symbol | Data]
|
|
20
|
+
attr_reader optimistic_ivars: Hash[Symbol, Symbol | Data]
|
|
21
|
+
# sig-gen gap: #1154 — an `attr_reader` over an ivar assigned in `initialize` from a parameter reaches `untyped`.
|
|
22
|
+
attr_reader repeated_or_writes: Hash[untyped, bool]
|
|
23
|
+
# sig-gen gap: #1154 — the same reader shape; `Inference::MatchRebinding::Frame` carries no signature.
|
|
24
|
+
attr_reader match_frame: untyped
|
|
19
25
|
attr_reader indexed_narrowings: Hash[IndexedKey, Type::t]
|
|
20
26
|
attr_reader method_chain_narrowings: Hash[ChainKey, Type::t]
|
|
21
27
|
attr_reader source_path: String?
|
|
22
28
|
attr_reader struct_fold_safe_locals: Set[Symbol]
|
|
23
29
|
attr_reader opaque_block_self: bool
|
|
30
|
+
# sig-gen gap: #1154 — sig-gen skips the reader (sig.skipped.untyped-return): an `attr_reader`
|
|
31
|
+
# over an ivar assigned in `initialize` from a parameter, so inference reaches `untyped`.
|
|
32
|
+
attr_reader singleton_class_body: bool
|
|
24
33
|
attr_reader lexical_nesting: Array[String]?
|
|
34
|
+
# Issue #1429 — a guard's narrowing of a constant reference, keyed by its spelling.
|
|
35
|
+
# sig-gen gap: #1154 — a reader over an ivar `initialize` assigns from a parameter.
|
|
36
|
+
attr_reader constant_narrowings: Hash[String, Type::t]
|
|
37
|
+
# Issue #1429 — the pre-guard type of each global or constant a guard narrowed.
|
|
38
|
+
# sig-gen gap: #1154 — a reader over an ivar `initialize` assigns from a parameter.
|
|
39
|
+
attr_reader guard_records: Hash[[Symbol, Symbol | String], Type::t]
|
|
25
40
|
|
|
26
41
|
# ADR-53 Track A — the seed-time discovery tables live on the
|
|
27
42
|
# DiscoveryIndex; Scope keeps per-table readers as delegates.
|
|
@@ -37,14 +52,38 @@ module Rigor
|
|
|
37
52
|
def discovered_def_sources: () -> Hash[String, Hash[Symbol, String]]
|
|
38
53
|
def discovered_singleton_def_sources: () -> Hash[String, Hash[Symbol, String]]
|
|
39
54
|
def discovered_method_visibilities: () -> Hash[String, Hash[Symbol, Symbol]]
|
|
55
|
+
# sig-gen gap: #1148 — sig-gen skips an endless-def reader (untyped return); the row is hand-written.
|
|
56
|
+
def discovered_parameter_envelopes: () -> Hash[String, Hash[untyped, untyped]]
|
|
57
|
+
# sig-gen gap: #1149 — sig-gen skips the `||` fallback reader (untyped return); the row is hand-written.
|
|
58
|
+
def parameter_envelopes_of: (String class_name) -> Hash[untyped, untyped]
|
|
40
59
|
def discovered_superclasses: () -> Hash[String, String]
|
|
60
|
+
# sig-gen gap: #1148 — sig-gen skips the endless-def reader (untyped return), so the per-file
|
|
61
|
+
# deferred-range table's row shape is hand-written.
|
|
62
|
+
def discovered_deferred_ranges: () -> Hash[String, Array[[Integer, Integer, Symbol?, Symbol?, String?]]]
|
|
63
|
+
# sig-gen gap: #1148 — sig-gen skips the endless-def reader (untyped return), so the refinement table's
|
|
64
|
+
# shape is hand-written.
|
|
65
|
+
def discovered_refinements: () -> Hash[String, Hash[Symbol, Array[String]]]
|
|
66
|
+
# sig-gen gap: #1148 — sig-gen skips the endless-def reader (untyped return), so the census shape is
|
|
67
|
+
# hand-written.
|
|
68
|
+
def discovered_global_write_census: () -> Set[Array[untyped]]
|
|
41
69
|
def discovered_includes: () -> Hash[String, Array[String]]
|
|
70
|
+
# Issue #1123 — the instance-ancestor-ORDER table beside the include one.
|
|
71
|
+
def discovered_prepends: () -> Hash[String, Array[String]]
|
|
72
|
+
# sig-gen gap: #1148 — sig-gen skips the endless-def reader (untyped return), so the table shape is hand-written.
|
|
73
|
+
def discovered_extends: () -> Hash[String, Array[String]]
|
|
42
74
|
def discovered_class_sources: () -> Hash[String, Set[String]]
|
|
43
75
|
def constant_sources: () -> Hash[String, Set[String]]
|
|
44
76
|
def published_constant_names: () -> Set[String]
|
|
45
77
|
def local_constant_names: () -> Set[String]
|
|
78
|
+
# sig-gen gap: #1150 — the `Data.define` table it reads carries no type, so sig-gen skips the return; the shape is hand-written.
|
|
79
|
+
def bound_constant_names: (String name) -> Array[String]
|
|
80
|
+
# sig-gen gap: #1150 — the `Data.define` table it reads carries no type, so sig-gen skips the return; the shape is hand-written.
|
|
81
|
+
def shadowing_constant_names: (String name) -> Array[String]
|
|
82
|
+
# sig-gen gap: #1149 — sig-gen types the `||` fallback `untyped`, so the element type is hand-written.
|
|
83
|
+
def published_constant_ivars_for: (String class_name) -> Set[Symbol]
|
|
46
84
|
def published_constant?: (String name) -> bool
|
|
47
85
|
def record_constant_dependency: (String name) -> void
|
|
86
|
+
def record_class_existence: (String class_name) -> void
|
|
48
87
|
def data_member_layouts: () -> Hash[String, Array[Symbol]]
|
|
49
88
|
def struct_member_layouts: () -> Hash[String, { members: Array[Symbol], keyword_init: bool }]
|
|
50
89
|
def param_inferred_types: () -> Hash[[String, Symbol, Symbol], Hash[Symbol, Type::t]]
|
|
@@ -57,11 +96,17 @@ module Rigor
|
|
|
57
96
|
def record_plugin_typed_call: (untyped node) -> Scope
|
|
58
97
|
def plugin_typed_call?: (untyped node) -> bool
|
|
59
98
|
|
|
99
|
+
def with_repeated_or_writes: (untyped nodes) -> Rigor::Scope
|
|
100
|
+
# sig-gen gap: #1154 — `Hash#key?` over that reader reaches `untyped`, so the `bool` is hand-written.
|
|
101
|
+
def repeated_or_write?: (untyped node) -> bool
|
|
102
|
+
|
|
60
103
|
class DiscoveryIndex
|
|
61
104
|
attr_reader declared_types: Hash[untyped, Type::t]
|
|
62
105
|
attr_reader class_ivars: Hash[String, Hash[Symbol, Type::t]]
|
|
63
106
|
attr_reader class_cvars: Hash[String, Hash[Symbol, Type::t]]
|
|
64
107
|
attr_reader program_globals: Hash[Symbol, Type::t]
|
|
108
|
+
# sig-gen gap: #1150 — `Data.define` members carry no type, as for every other row in this class.
|
|
109
|
+
attr_reader program_global_seeds: Hash[Symbol, Type::t]
|
|
65
110
|
attr_reader discovered_classes: Hash[String, Type::Singleton]
|
|
66
111
|
attr_reader in_source_constants: Hash[String, Type::t]
|
|
67
112
|
attr_reader discovered_methods: Hash[String, Hash[Symbol, Symbol]]
|
|
@@ -71,20 +116,48 @@ module Rigor
|
|
|
71
116
|
attr_reader discovered_def_sources: Hash[String, Hash[Symbol, String]]
|
|
72
117
|
attr_reader discovered_singleton_def_sources: Hash[String, Hash[Symbol, String]]
|
|
73
118
|
attr_reader discovered_method_visibilities: Hash[String, Hash[Symbol, Symbol]]
|
|
119
|
+
# sig-gen gap: #1150 — `Data.define` members carry no type, as for every other row in this class.
|
|
120
|
+
attr_reader discovered_parameter_envelopes: Hash[String, Hash[untyped, untyped]]
|
|
74
121
|
attr_reader discovered_superclasses: Hash[String, String]
|
|
75
122
|
attr_reader discovered_includes: Hash[String, Array[String]]
|
|
123
|
+
attr_reader discovered_prepends: Hash[String, Array[String]]
|
|
124
|
+
# sig-gen gap: #1150 — `Data.define` members carry no type, as for every other row in this class.
|
|
125
|
+
attr_reader discovered_extends: Hash[String, Array[String]]
|
|
76
126
|
attr_reader discovered_class_sources: Hash[String, Set[String]]
|
|
77
127
|
attr_reader constant_sources: Hash[String, Set[String]]
|
|
128
|
+
# sig-gen gap: #1150 — `Data.define` members carry no type, as for every other row in this class.
|
|
129
|
+
attr_reader constant_writers: Hash[String, Array[String]]
|
|
130
|
+
# sig-gen gap: #1150 — `Data.define` members carry no type, as for every other row in this class.
|
|
131
|
+
attr_reader constant_shadowers: Hash[String, Array[String]]
|
|
78
132
|
attr_reader published_constant_names: Set[String]
|
|
79
133
|
attr_reader local_constant_names: Set[String]
|
|
134
|
+
# sig-gen gap: #1150 — `Data.define` members carry no type, so every row in this class is authored.
|
|
135
|
+
attr_reader published_constant_alias_names: Set[String]
|
|
136
|
+
# sig-gen gap: #1150 — as above.
|
|
137
|
+
attr_reader published_constant_ivars: Hash[String, Set[Symbol]]
|
|
80
138
|
attr_reader data_member_layouts: Hash[String, Array[Symbol]]
|
|
81
139
|
attr_reader struct_member_layouts: Hash[String, { members: Array[Symbol], keyword_init: bool }]
|
|
82
140
|
attr_reader param_inferred_types: Hash[[String, Symbol, Symbol], Hash[Symbol, Type::t]]
|
|
141
|
+
# sig-gen gap: #1150 — `Data.define` members carry no type, as for every other row in this class.
|
|
142
|
+
attr_reader discovered_deferred_ranges: Hash[String, Array[[Integer, Integer, Symbol?, Symbol?, String?]]]
|
|
143
|
+
# sig-gen gap: #1150 — `Data.define` members carry no type, as for every other row in this class.
|
|
144
|
+
attr_reader discovered_refinements: Hash[String, Hash[Symbol, Array[String]]]
|
|
145
|
+
# sig-gen gap: #1150 — `Data.define` members carry no type, as for every other row in this class.
|
|
146
|
+
attr_reader discovered_global_write_census: Set[Array[untyped]]
|
|
83
147
|
attr_reader run_generation: Object?
|
|
148
|
+
# sig-gen gap: #1150 — `Data.define` members carry no type, as for every other row in this class.
|
|
149
|
+
attr_reader patched_line_readers: Set[Symbol]
|
|
150
|
+
# sig-gen gap: #1150 — `Data.define` members carry no type, as for every other row in this class.
|
|
151
|
+
attr_reader clears_last_status: bool
|
|
152
|
+
# sig-gen gap: #1150 — `Data.define` members carry no type, as for every other row in this class.
|
|
153
|
+
attr_reader defines_case_equality: bool
|
|
154
|
+
# `untyped`: the value is an `Inference::LastLine::SelfEvidence` (or nil), and that class carries no signature,
|
|
155
|
+
# as `Inference::MatchRebinding::Frame` carries none for `match_frame`.
|
|
156
|
+
attr_reader implicit_self_evidence: untyped
|
|
84
157
|
|
|
85
158
|
EMPTY: DiscoveryIndex
|
|
86
159
|
|
|
87
|
-
def with: (?declared_types: Hash[untyped, Type::t], ?class_ivars: Hash[String, Hash[Symbol, Type::t]], ?class_cvars: Hash[String, Hash[Symbol, Type::t]], ?program_globals: Hash[Symbol, Type::t], ?discovered_classes: Hash[String, Type::Singleton], ?in_source_constants: Hash[String, Type::t], ?discovered_methods: Hash[String, Hash[Symbol, Symbol]], ?discovered_def_nodes: Hash[String, Hash[Symbol, untyped]], ?discovered_def_nestings: Hash[untyped, Array[String]], ?discovered_singleton_def_nodes: Hash[String, Hash[Symbol, untyped]], ?discovered_def_sources: Hash[String, Hash[Symbol, String]], ?discovered_singleton_def_sources: Hash[String, Hash[Symbol, String]], ?discovered_method_visibilities: Hash[String, Hash[Symbol, Symbol]], ?discovered_superclasses: Hash[String, String], ?discovered_includes: Hash[String, Array[String]], ?discovered_class_sources: Hash[String, Set[String]], ?constant_sources: Hash[String, Set[String]], ?published_constant_names: Set[String], ?local_constant_names: Set[String], ?data_member_layouts: Hash[String, Array[Symbol]], ?struct_member_layouts: Hash[String, { members: Array[Symbol], keyword_init: bool }], ?param_inferred_types: Hash[[String, Symbol, Symbol], Hash[Symbol, Type::t]], ?run_generation: Object?) -> DiscoveryIndex
|
|
160
|
+
def with: (?declared_types: Hash[untyped, Type::t], ?class_ivars: Hash[String, Hash[Symbol, Type::t]], ?class_cvars: Hash[String, Hash[Symbol, Type::t]], ?program_globals: Hash[Symbol, Type::t], ?program_global_seeds: Hash[Symbol, Type::t], ?discovered_classes: Hash[String, Type::Singleton], ?in_source_constants: Hash[String, Type::t], ?discovered_methods: Hash[String, Hash[Symbol, Symbol]], ?discovered_def_nodes: Hash[String, Hash[Symbol, untyped]], ?discovered_def_nestings: Hash[untyped, Array[String]], ?discovered_singleton_def_nodes: Hash[String, Hash[Symbol, untyped]], ?discovered_def_sources: Hash[String, Hash[Symbol, String]], ?discovered_singleton_def_sources: Hash[String, Hash[Symbol, String]], ?discovered_method_visibilities: Hash[String, Hash[Symbol, Symbol]], ?discovered_parameter_envelopes: Hash[String, Hash[untyped, untyped]], ?discovered_superclasses: Hash[String, String], ?discovered_includes: Hash[String, Array[String]], ?discovered_prepends: Hash[String, Array[String]], ?discovered_extends: Hash[String, Array[String]], ?discovered_class_sources: Hash[String, Set[String]], ?constant_sources: Hash[String, Set[String]], ?constant_writers: Hash[String, Array[String]], ?constant_shadowers: Hash[String, Array[String]], ?published_constant_names: Set[String], ?local_constant_names: Set[String], ?published_constant_alias_names: Set[String], ?published_constant_ivars: Hash[String, Set[Symbol]], ?data_member_layouts: Hash[String, Array[Symbol]], ?struct_member_layouts: Hash[String, { members: Array[Symbol], keyword_init: bool }], ?param_inferred_types: Hash[[String, Symbol, Symbol], Hash[Symbol, Type::t]], ?discovered_deferred_ranges: Hash[String, Array[[Integer, Integer, Symbol?, Symbol?, String?]]], ?discovered_refinements: Hash[String, Hash[Symbol, Array[String]]], ?discovered_global_write_census: Set[Array[untyped]], ?run_generation: Object?, ?patched_line_readers: Set[Symbol], ?clears_last_status: bool, ?defines_case_equality: bool, ?implicit_self_evidence: untyped) -> DiscoveryIndex
|
|
88
161
|
end
|
|
89
162
|
|
|
90
163
|
class IndexedKey
|
|
@@ -108,6 +181,9 @@ module Rigor
|
|
|
108
181
|
def struct_fold_safe?: (String | Symbol name) -> bool
|
|
109
182
|
def entering_opaque_block: () -> Scope
|
|
110
183
|
def opaque_block_self?: () -> bool
|
|
184
|
+
def with_singleton_class_body: (bool) -> Scope
|
|
185
|
+
# sig-gen gap: #1148 — sig-gen skips the endless-def reader (sig.skipped.untyped-return); the row is hand-written.
|
|
186
|
+
def singleton_class_body?: () -> bool
|
|
111
187
|
def with_discovery: (DiscoveryIndex index) -> Scope
|
|
112
188
|
def local: (String | Symbol name) -> Type::t?
|
|
113
189
|
def ivar: (String | Symbol name) -> Type::t?
|
|
@@ -117,46 +193,106 @@ module Rigor
|
|
|
117
193
|
def ivar_origin: (String | Symbol name) -> Symbol?
|
|
118
194
|
def optimistic_local: (String | Symbol name) -> Symbol?
|
|
119
195
|
def optimistic_ivar: (String | Symbol name) -> Symbol?
|
|
196
|
+
def optimistic_local_miss: (String | Symbol name) -> Object?
|
|
197
|
+
def optimistic_ivar_miss: (String | Symbol name) -> Object?
|
|
120
198
|
def with_local: (String | Symbol name, Type::t type) -> Scope
|
|
121
199
|
def with_ivar: (String | Symbol name, Type::t type) -> Scope
|
|
122
200
|
def with_local_origin: (String | Symbol name, Symbol? cause) -> Scope
|
|
123
|
-
def with_optimistic_local: (String | Symbol name, Symbol? cause) -> Scope
|
|
124
|
-
def with_optimistic_ivar: (String | Symbol name, Symbol? cause) -> Scope
|
|
201
|
+
def with_optimistic_local: (String | Symbol name, Symbol? cause, ?miss: Object?) -> Scope
|
|
202
|
+
def with_optimistic_ivar: (String | Symbol name, Symbol? cause, ?miss: Object?) -> Scope
|
|
125
203
|
def with_ivar_origin: (String | Symbol name, Symbol? cause) -> Scope
|
|
126
204
|
def with_cvar: (String | Symbol name, Type::t type) -> Scope
|
|
127
205
|
def with_global: (String | Symbol name, Type::t type) -> Scope
|
|
128
|
-
|
|
206
|
+
# Issue #1429 — `rigor sig-gen` output; the parameters are not inferred here, as for `with_mutated_local`.
|
|
207
|
+
def with_guarded_global: (untyped name, untyped type, untyped pre_guard, ?record: untyped) -> Scope
|
|
208
|
+
def with_constant_narrowing: (untyped key, untyped type, untyped pre_guard) -> Scope
|
|
209
|
+
def without_constant_narrowing: (untyped key) -> Scope
|
|
210
|
+
def guard_narrowed?: () -> bool
|
|
211
|
+
def forget_guard_narrowings: () -> Scope
|
|
212
|
+
def forget_guard_narrowing_of: (untyped kind, untyped name) -> Scope
|
|
213
|
+
def without_constant_narrowings_named: (untyped name) -> Scope
|
|
214
|
+
# sig-gen gap: #1154 — the table reader over an ivar `initialize` assigns from a parameter reaches `untyped`.
|
|
215
|
+
def constant_narrowing: (String key) -> Type::t?
|
|
216
|
+
# sig-gen gap: #1151 — an `attr_reader` over a frozen Set literal types `untyped`, as the sibling
|
|
217
|
+
# `declaration_sourced` row does.
|
|
218
|
+
def published_constant_sourced: () -> Set[[Symbol, Symbol]]
|
|
219
|
+
# sig-gen gap: #1152 — `Set#include?` over a tuple key types `untyped`, so the `bool` is hand-written.
|
|
220
|
+
def published_constant_sourced?: (Symbol kind, String | Symbol name) -> bool
|
|
221
|
+
def with_published_constant_mark: (Symbol kind, String | Symbol name) -> Scope
|
|
222
|
+
# Issue #1362 — a `[:global_copy, local, global]` record rides beside the `(kind, name)` refs.
|
|
223
|
+
def declaration_sourced: () -> Set[[Symbol, Symbol] | [Symbol, Symbol, Symbol]]
|
|
129
224
|
def seed_declaration_sourced_ivar: (String | Symbol name, Type::t type) -> Scope
|
|
225
|
+
def seed_declaration_sourced_global: (String | Symbol name, Type::t type) -> Scope
|
|
226
|
+
def with_global_copy_marks: (String | Symbol name, Array[String | Symbol] globals) -> Scope
|
|
227
|
+
def without_local_declaration_marks: (String | Symbol name) -> Scope
|
|
228
|
+
# sig-gen gap: #1154 — the records come out of `@declaration_sourced`, an ivar assigned in `initialize` from a
|
|
229
|
+
# parameter, which reaches `untyped`.
|
|
230
|
+
def declaration_sourced_global_copies: (String | Symbol name) -> Array[Symbol]
|
|
130
231
|
def with_declaration_sourced_local: (String | Symbol name, Type::t type) -> Scope
|
|
131
232
|
def with_local_declaration_mark: (String | Symbol name) -> Scope
|
|
233
|
+
# `rigor sig-gen --params=observed` output; the siblings' hand-written `String | Symbol` / `Type::t`
|
|
234
|
+
# parameters are not inferred here either.
|
|
235
|
+
def with_mutated_local: (untyped name, untyped type) -> Scope
|
|
132
236
|
def declaration_sourced?: (Symbol kind, String | Symbol name) -> bool
|
|
133
237
|
def with_inferred_param_mark: (String | Symbol name) -> Scope
|
|
134
238
|
def without_inferred_param_mark: (String | Symbol name) -> Scope
|
|
135
239
|
def inferred_param?: (String | Symbol name) -> bool
|
|
136
240
|
def forget_match_globals: () -> Scope
|
|
241
|
+
def untyped_match_globals: () -> Scope
|
|
242
|
+
def match_globals_bound?: () -> bool
|
|
243
|
+
def with_match_frame: (untyped body, ?untyped parameters) -> Scope
|
|
244
|
+
# sig-gen gap: #1154 — the frame reader over an ivar assigned in `initialize` from a parameter reaches
|
|
245
|
+
# `untyped`, so the `bool` is hand-written.
|
|
246
|
+
def match_rebinding_closure?: () -> bool
|
|
247
|
+
def forget_last_line: () -> Scope
|
|
248
|
+
def untyped_last_line: () -> Scope
|
|
249
|
+
# sig-gen gap: #1154 — the reader over the `@globals` ivar `initialize` assigns from a parameter reaches
|
|
250
|
+
# `untyped`, so the `bool` is hand-written.
|
|
251
|
+
def last_line_bound?: () -> bool
|
|
252
|
+
# sig-gen gap: #1154 — the frame reader over the `@match_frame` ivar `initialize` assigns from a parameter
|
|
253
|
+
# reaches `untyped`, so the `bool` is hand-written.
|
|
254
|
+
def last_line_closure?: () -> bool
|
|
255
|
+
def forget_error_info: () -> Scope
|
|
256
|
+
def untyped_error_info: () -> Scope
|
|
257
|
+
def forget_last_status: () -> Scope
|
|
258
|
+
def untyped_last_status: () -> Scope
|
|
137
259
|
def class_ivars_for: (String | Symbol? class_name) -> Hash[Symbol, Type::t]
|
|
138
260
|
def class_cvars_for: (String | Symbol? class_name) -> Hash[Symbol, Type::t]
|
|
139
261
|
def discovered_method?: (String | Symbol class_name, String | Symbol method_name, Symbol kind) -> bool
|
|
140
|
-
def user_def_for: (String | Symbol class_name, String | Symbol method_name) ->
|
|
141
|
-
def user_def_through_ancestors: (String | Symbol class_name, String | Symbol method_name, ?name_memo: Hash[untyped, untyped]) -> [
|
|
262
|
+
def user_def_for: (String | Symbol class_name, String | Symbol method_name) -> ::Prism::DefNode?
|
|
263
|
+
def user_def_through_ancestors: (String | Symbol class_name, String | Symbol method_name, ?name_memo: Hash[untyped, untyped]) -> ([::Prism::DefNode, String] | [nil, nil])
|
|
142
264
|
def discovered_method_through_ancestors?: (String | Symbol? class_name, String | Symbol method_name, Symbol kind, ?name_memo: Hash[untyped, untyped]) -> bool
|
|
265
|
+
def external_ancestor_name_candidates: (String | Symbol class_name, ?name_memo: Hash[untyped, untyped]) -> Array[Array[String]]
|
|
143
266
|
def enqueue_ancestors: (String current, Array[String] queue, Hash[untyped, untyped] name_memo, ?mixins: bool) -> void
|
|
144
267
|
def ancestor_name_candidates: (String | Symbol subclass_qualified, String | Symbol raw_ancestor) -> Array[String]
|
|
145
268
|
|
|
269
|
+
# sig-gen gap: #1148 — sig-gen skips the method (sig.skipped.untyped-return: every decline returns the
|
|
270
|
+
# frozen EMPTY_HEADER_NESTING constant); the row is hand-written.
|
|
271
|
+
def ambiguous_ancestor_resolutions: (String | Symbol subclass_qualified, String | Symbol raw_ancestor) -> Array[String]
|
|
272
|
+
|
|
146
273
|
# Issue #530 — public so the external-gem ancestry probe asks the same question the walk does.
|
|
147
274
|
def known_user_class?: (String | Symbol name) -> bool
|
|
148
|
-
def singleton_def_for: (String | Symbol class_name, String | Symbol method_name) ->
|
|
149
|
-
def singleton_def_through_ancestors: (String | Symbol class_name, String | Symbol method_name, ?name_memo: Hash[untyped, untyped]) -> [
|
|
275
|
+
def singleton_def_for: (String | Symbol class_name, String | Symbol method_name) -> ::Prism::DefNode?
|
|
276
|
+
def singleton_def_through_ancestors: (String | Symbol class_name, String | Symbol method_name, ?name_memo: Hash[untyped, untyped]) -> ([::Prism::DefNode, String] | [nil, nil])
|
|
150
277
|
def user_def_site_for: (String | Symbol class_name, String | Symbol method_name) -> String?
|
|
151
278
|
def user_singleton_def_site_for: (String | Symbol class_name, String | Symbol method_name) -> String?
|
|
152
|
-
|
|
153
|
-
|
|
279
|
+
# sig-gen gap: #1167 — the predicate forwards its untyped `Prism::CallNode` into the range scan,
|
|
280
|
+
# which reads `call_node.location` off it: a `Dynamic` receiver answers `Dynamic`, not `bool`, so
|
|
281
|
+
# sig-gen skips the method (and `def_shadows_call?` above it) as an untyped return.
|
|
282
|
+
def singleton_def_shadows_call?: (String | Symbol class_name, String | Symbol method_name, untyped call_node) -> bool
|
|
283
|
+
# sig-gen gap: #1167 — the instance-side twin: the same untyped `call_node`, the same untyped-return skip.
|
|
284
|
+
def instance_def_shadows_call?: (String | Symbol class_name, String | Symbol method_name, untyped call_node) -> bool
|
|
285
|
+
def top_level_def_for: (String | Symbol method_name) -> ::Prism::DefNode?
|
|
286
|
+
def bindable_top_level_def_for: (String | Symbol method_name) -> ::Prism::DefNode?
|
|
154
287
|
def toplevel?: () -> bool
|
|
155
288
|
def discovered_method_visibility: (String | Symbol class_name, String | Symbol method_name) -> Symbol?
|
|
156
289
|
def superclass_of: (String | Symbol class_name) -> String?
|
|
157
290
|
def data_member_layout: (String | Symbol class_name) -> Array[Symbol]?
|
|
158
291
|
def struct_member_layout: (String | Symbol class_name) -> { members: Array[Symbol], keyword_init: bool }?
|
|
159
292
|
def includes_of: (String | Symbol class_name) -> Array[String]
|
|
293
|
+
# sig-gen gap: #1153 — sig-gen proposes `Array[untyped] | []` off the empty-table early return, so the
|
|
294
|
+
# element type is hand-written, matching {#includes_of}.
|
|
295
|
+
def singleton_extends_of: (String | Symbol class_name) -> Array[String]
|
|
160
296
|
def indexed_narrowing: (Symbol receiver_kind, String | Symbol receiver_name, untyped key) -> Type::t?
|
|
161
297
|
def with_indexed_narrowing: (Symbol receiver_kind, String | Symbol receiver_name, untyped key, Type::t type) -> Scope
|
|
162
298
|
def without_indexed_narrowing: (Symbol receiver_kind, String | Symbol receiver_name, untyped key) -> Scope
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# `Rigor::SigGen` itself has no other declaration under `sig/`; without this shell `rbs validate`
|
|
2
|
+
# rejects the two declarations below with `Could not find ::Rigor::SigGen`.
|
|
3
|
+
module Rigor::SigGen
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
# Every entry is built from string literals in `SkipReasonCatalog::ENTRIES`, so the four readers
|
|
7
|
+
# answer `String`.
|
|
8
|
+
class Rigor::SigGen::SkipReasonCatalog::Entry < ::Data
|
|
9
|
+
def id: () -> String
|
|
10
|
+
def summary: () -> String
|
|
11
|
+
def explanation: () -> String
|
|
12
|
+
def next_step: () -> String
|
|
13
|
+
def self.new: (id: String, summary: String, explanation: String, next_step: String) -> instance | (String id, String summary, String explanation, String next_step) -> instance
|
|
14
|
+
def self.[]: (id: String, summary: String, explanation: String, next_step: String) -> instance | (String id, String summary, String explanation, String next_step) -> instance
|
|
15
|
+
def to_h: () -> Hash[String, String]
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
module Rigor::SigGen::SkipReasonCatalog
|
|
19
|
+
def self?.resolve: (untyped) -> Rigor::SigGen::SkipReasonCatalog::Entry?
|
|
20
|
+
def self?.all: () -> Array[Rigor::SigGen::SkipReasonCatalog::Entry]
|
|
21
|
+
end
|