Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify dynvar: replace variables in a single pass #2173

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

denik
Copy link
Contributor

@denik denik commented Jan 17, 2025

Not ready for merge - due to another bug root dyn.Value is reordered randomly and this makes the loop cycle diagnostic message non-deterministic.

Changes

  • Remove the three stages / 2 walk() calls in dynvar/resolve.go and replace it with a single one.
  • Remove cached for resolved: we already cache lookups, caching strings referencing variables seems excessive (low hit ratio, fast computation).

This simplification might help adding cycle detection for complex variables into dynvar module as there is less state to worry about.

Tests

Existing tests.

@denik denik temporarily deployed to test-trigger-is January 17, 2025 08:41 — with GitHub Actions Inactive
@denik denik temporarily deployed to test-trigger-is January 17, 2025 08:50 — with GitHub Actions Inactive
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.

1 participant