Skip to content

Testing: Remove sd.Valid()#6323

Merged
jannotti merged 1 commit intoalgorand:masterfrom
jannotti:sd-valid-deadcode
May 13, 2025
Merged

Testing: Remove sd.Valid()#6323
jannotti merged 1 commit intoalgorand:masterfrom
jannotti:sd-valid-deadcode

Conversation

@jannotti
Copy link
Copy Markdown
Contributor

Summary

It was not used anywhere. Presumably, it was written thinking that a StateDelta would be check after making it. But instead, each step of creating the StateDelta is checked.

Test Plan

I guess if it compiles, I was right!

It was not used anywhere. Presumably, it was written thinking that a
StateDelta would be check after making it. But instead, each step of
creating the StateDelta is checked.
@jannotti jannotti self-assigned this May 12, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented May 12, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 51.85%. Comparing base (8118cfe) to head (abaf278).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6323      +/-   ##
==========================================
- Coverage   51.86%   51.85%   -0.02%     
==========================================
  Files         652      652              
  Lines       87442    87425      -17     
==========================================
- Hits        45353    45335      -18     
+ Misses      39227    39226       -1     
- Partials     2862     2864       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jannotti jannotti requested a review from gmalouf May 12, 2025 19:17
@cce
Copy link
Copy Markdown
Contributor

cce commented May 13, 2025

Non-test references removed in #1765
found this using git bisect with:

#!/usr/bin/env bash
set -euo pipefail
sym_line="$(gopls symbols "data/basics/teal.go" 2>/dev/null | grep -m1 'StateDelta).Valid Method' || true)"
if [[ -z "$sym_line" ]]; then
  exit 1
fi
pos_range="${sym_line##* }"
start_pos="${pos_range%%-*}"
line_no="${start_pos%%:*}"
col_no="${start_pos##*:}"
ref_total="$(gopls references "data/basics/teal.go:${line_no}:${col_no}" 2>/dev/null || true)"
non_test_count="$(printf '%s\n' "$ref_total" | grep -v '_test\.go:' | grep -c .)"
if (( non_test_count > 0 )); then
  exit 0
else
  exit 1 
fi

@jannotti jannotti merged commit 18990e0 into algorand:master May 13, 2025
20 checks passed
@jannotti jannotti deleted the sd-valid-deadcode branch May 13, 2025 16:04
cce pushed a commit to cce/go-algorand that referenced this pull request May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants