Skip to content

Conversation

@masenf
Copy link
Collaborator

@masenf masenf commented Dec 12, 2025

The prop for static deps is actually deps not static_deps.

The prop for static deps is actually `deps` not `static_deps`.
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 12, 2025

CodSpeed Performance Report

Merging #6039 will improve performances by 4.22%

Comparing masenf/dep-tracking-fu (6468b02) with main (7826d0b)

Summary

⚡ 2 improvements
✅ 6 untouched

Benchmarks breakdown

Benchmark BASE HEAD Change
test_get_all_imports[_complicated_page] 23.8 ms 22.8 ms +4.22%
test_get_all_imports[_stateful_page] 3.2 ms 3.1 ms +3.1%

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Dec 12, 2025

Greptile Overview

Greptile Summary

Corrected the error message in ComputedVar dependency tracking to reference the correct parameter name deps instead of the incorrect static_deps.

  • Fixed error message to use correct parameter name deps (the public API parameter) instead of _static_deps (the internal attribute)
  • Improved message clarity by showing example syntax: deps=['var1', 'var2']

Confidence Score: 5/5

  • This PR is safe to merge with no risk
  • This is a trivial documentation fix that corrects an error message to reference the correct parameter name. The change is verified by examining the ComputedVar.__init__ method which shows the parameter is named deps (not static_deps). No logic changes, no side effects, and the fix improves user experience.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
reflex/vars/base.py 5/5 Corrected error message to reference the correct parameter name deps instead of incorrect static_deps

Sequence Diagram

sequenceDiagram
    participant Dev as Developer
    participant CV as ComputedVar
    participant DT as DependencyTracker
    participant Console as Console
    
    Dev->>CV: Define computed var with auto_deps=True
    CV->>CV: _get_dependencies(obj, objclass)
    
    alt Auto-dependency tracking enabled
        CV->>DT: Track dependencies automatically
        alt Tracking succeeds
            DT-->>CV: Return dependencies
        else Tracking fails
            DT-->>CV: Raise exception
            CV->>Console: Warn with corrected error message
            Note over Console: "Set auto_deps=False and provide<br/>accurate deps=['var1', 'var2']"
            CV-->>Dev: Return empty dependencies
        end
    else Auto-dependency disabled
        CV-->>Dev: Use manually specified deps
    end
Loading

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@adhami3310 adhami3310 merged commit 1c78196 into main Dec 15, 2025
58 of 59 checks passed
@adhami3310 adhami3310 deleted the masenf/dep-tracking-fu branch December 15, 2025 20:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants