Skip to content

fix[tool]: fix invalid quotes in -f cfg output#4672

Merged
charles-cooper merged 5 commits intovyperlang:masterfrom
crebsy:fix/ir_subgraph_double_quotes
Jun 17, 2025
Merged

fix[tool]: fix invalid quotes in -f cfg output#4672
charles-cooper merged 5 commits intovyperlang:masterfrom
crebsy:fix/ir_subgraph_double_quotes

Conversation

@crebsy
Copy link
Copy Markdown
Contributor

@crebsy crebsy commented May 30, 2025

What I did

The subgraph labels of the IR contain duplicate double quotes "" for the internal nodes which create a syntax error when parsing the generated output with graphviz. As a fix, I removed the duplicates so that the output only contains " now and can be used with graphviz again.

How I did it

Changed the string interpolation of the subgraph label

How to verify it

Run tests or manually pipe the compiler output cfg_runtime format into dot:

$ vyper -f cfg_runtime --venom test.vy | dot 

Commit message

the subgraph labels of the `-f cfg` and `-f cfg_runtime` output contain
duplicate double quotes `""` for some inlined functions, which create a
syntax error when parsing the generated output with graphviz.

this commit escapes quotes in the labels by serializing with `repr`.

Description for the changelog

Remove duplicate quotes in subgraph labels which created a syntax error in the dot output

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@codecov
Copy link
Copy Markdown

codecov bot commented May 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.95%. Comparing base (67ea4ee) to head (fefbb02).
⚠️ Report is 29 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4672      +/-   ##
==========================================
+ Coverage   92.93%   92.95%   +0.01%     
==========================================
  Files         131      131              
  Lines       19062    19062              
  Branches     3316     3316              
==========================================
+ Hits        17716    17719       +3     
  Misses        904      904              
+ Partials      442      439       -3     

☔ 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.

@charles-cooper charles-cooper added this to the v0.4.3 milestone Jun 16, 2025
@charles-cooper charles-cooper added the release - tentative items still being considered for release inclusion label Jun 16, 2025
@charles-cooper charles-cooper changed the title fix[tool]: remove duplicate quotes in subgraph labels which created a syntax error in the dot output fix[tool]: fix invalid quotes in cfg[_runtime] output Jun 17, 2025
@charles-cooper charles-cooper changed the title fix[tool]: fix invalid quotes in cfg[_runtime] output fix[tool]: fix invalid quotes in -f cfg output Jun 17, 2025
@charles-cooper charles-cooper enabled auto-merge (squash) June 17, 2025 11:53
@charles-cooper charles-cooper merged commit 9370897 into vyperlang:master Jun 17, 2025
163 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release - tentative items still being considered for release inclusion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants