Class: Rigor::Analysis::ProjectScan

Inherits:
Data
  • Object
show all
Defined in:
lib/rigor/analysis/project_scan.rb

Overview

Frozen snapshot of the project-wide state Runner consumes before per-file analysis fires: the loaded plugin registry (with ‘#prepare` already invoked), the dependency-source index, the synthetic-method and project-patched indexes produced by the pre-pass scanners, and the diagnostics those passes emitted.

Owners (‘Rigor::LanguageServer::ProjectContext`, future editor / sig-gen integrations) build a ProjectScan once per project-state generation via `Runner#prepare_project_scan` and pass it to `Runner.new(prebuilt: …)` so per-buffer publishes skip the scanner walks and `#prepare` re-runs. When watched project files change, the owner discards the ProjectScan and a fresh one builds on next read.

Editor mode v1 contract reminder: scanners observe the bytes that were on disk at scan time, NOT the in-flight buffer. Edits to a file that itself declares synthetic methods (or ‘pre_eval:`-listed patches) are NOT visible until the owner invalidates the scan — typically via `workspace/didChangeWatchedFiles`. This is the same trade-off the LSP made when slice 7 cached only the `Environment`; extending the cache to the pre-pass outputs preserves the contract.

Instance Attribute Summary collapse

Instance Attribute Details

#dependency_source_indexObject (readonly)

Returns the value of attribute dependency_source_index

Returns:

  • (Object)

    the current value of dependency_source_index



30
31
32
# File 'lib/rigor/analysis/project_scan.rb', line 30

def dependency_source_index
  @dependency_source_index
end

#plugin_prepare_diagnosticsObject (readonly)

Returns the value of attribute plugin_prepare_diagnostics

Returns:

  • (Object)

    the current value of plugin_prepare_diagnostics



30
31
32
# File 'lib/rigor/analysis/project_scan.rb', line 30

def plugin_prepare_diagnostics
  @plugin_prepare_diagnostics
end

#plugin_registryObject (readonly)

Returns the value of attribute plugin_registry

Returns:

  • (Object)

    the current value of plugin_registry



30
31
32
# File 'lib/rigor/analysis/project_scan.rb', line 30

def plugin_registry
  @plugin_registry
end

#pre_eval_diagnosticsObject (readonly)

Returns the value of attribute pre_eval_diagnostics

Returns:

  • (Object)

    the current value of pre_eval_diagnostics



30
31
32
# File 'lib/rigor/analysis/project_scan.rb', line 30

def pre_eval_diagnostics
  @pre_eval_diagnostics
end

#project_patched_methodsObject (readonly)

Returns the value of attribute project_patched_methods

Returns:

  • (Object)

    the current value of project_patched_methods



30
31
32
# File 'lib/rigor/analysis/project_scan.rb', line 30

def project_patched_methods
  @project_patched_methods
end

#synthetic_method_indexObject (readonly)

Returns the value of attribute synthetic_method_index

Returns:

  • (Object)

    the current value of synthetic_method_index



30
31
32
# File 'lib/rigor/analysis/project_scan.rb', line 30

def synthetic_method_index
  @synthetic_method_index
end