All notable changes to the "function-graph-overview" extension will be documented in this file.
Check Keep a Changelog for recommendations on how to structure this file.
- Function name extraction with support for multiple programming languages.
- Unit tests for function name extraction, covering various structures and languages.
- Frontend logic in
render/src/App.svelteto extract and display metadata based on render type. - Display of both CFG and function metadata in the GitHub render view, and CFG metadata in the Graph render view.
- Visual Studio extension (at https://github.com/tmr232/vs-function-graph-overview/)
- Initial Java support
- Initial C# support
- Pan & zoom for the graphs in both the IDE extensions and the web version
- Documentation now renders
dotanddot-cfg(CFG-styled DOT diagrams) - Added docs about GraphViz tips and tricks
- Added docs about our choices of visuals
- Added support for "special" function detection and process-terminating nodes in the graph.
This is currently only enabled in the
/renderpage to slowly build up a collection of functions to match and confidence in the representation before adding to the main tool. - In the web demo, URL now updates to reflect the selected language.
- Multiple
catchclauses in C++ are now handled properly, even in case of comments between them. - Segmentation of
catchclauses in C++ is now a lot better. - Fixed an issue where after sharing and reopening the page, clicking the "Share" button again would default the language back to Go instead of preserving the selected one.
- Exit nodes are now drawn properly even inside
tryblocks.
- The
bun typedoccommand was renamed tobun docs, as some contributors had issues with unexpected recursion in the command. It is also a nicer name. - Language definitions are now more unified, making it easier to add new languages.
languageURL query parameter now takes language name instead of index.- Sharing now includes configuration (color scheme, switch handling, highlighting) in addition to the code.
- Migrated from Bun Test to Vitest. Tests are now run using
bun vitest. - Web version layout changed to always fit in one screen (no scrollbar).
- Python catch-all cases in match statements are now detected. When a catch-all is found the "no-match-found" edge is removed, and cases after the catch-all are removed as dead code.
- C++ learned
co_yieldandco_return - Python learned
assert
- Comment-tests now fail if an unsupported test type is present instead of passing silently.
- Python
matchstatements no longer break when a comment is present at their top-level throwandraisestatements now causefinallyblock duplication likereturnstatements.
- In flat-switch mode, fallthrough now goes to the case-node, not the consequence-node. This produces cleaner, more readable graphs even if it is less correct.
- Region comment note overlay thingies in the demo, hidden in debug mode or under the
showRegionsparameter. Once enabled, usecfg-overlay-start: My Messageandcfg-overlay-endcomments to delimit regions and show them in the graph. - Function rendering is now cached, so that they are only re-rendered when needed. This results in faster update times when moving the cursor in the same function.
finallyblocks are now supported in TypeScript.- Methods are now supported in TypeScript.
continue labelis now supported in Go.
- Exporting DOT files (in debug mode) no longer results in different-looking graphs
- The web renderer now supports iOS browsers.
- VSCode and JetBrains now use the same WebView content.
- Placeholder ("Hello, World!") graph colors are now determined by the color scheme.
- VSCode settings now applied instantly to the graph.
- Flat-Switch is now the default for rendering switch-like control-flow structures.
- The JetBrains plugin can now change settings: flat switch, simplification, highlighting, and color scheme
/renderpage to render code directly from GitHub, given a URL with a line number.render-graph.tsscript to render a graph from a JSON file exported from code/renderpage can now render a graph provided to it directly.
detectBacklinksno longer has infinite loops on specific cases, and is faster.
- A simple CLI script to render a single function from a file (
scripts/render-function.ts) - Developer docs
- Support for click-to-navigate in the JetBrains plugin.
- Support for TypeScript (and JavaScript, as a subset)
- Support for TSX (and JSX, as a subset)
- Unified a lot of the statement processing code between different languages
- Python & C++ no longer marked experimental.
continue labelandbreak labelnow work properly in Go- Infinite C-style loops in Go are now recognized correctly.
- Added the
Function Graph Overview: Show Graph Overviewcommand to VSCode to show the graph
- In VSCode, the extension will now show in the activity bar by default
- All development-related docs moved to the
docsdirectory to avoid confusing users
- Added JetBrains frontend for use in JetBrains IDE plugin
- Demo: Added a link to the JetBrains plugin page
- Demo learned to change font-size
- Documented the process of adding a new language
- Biome has been added as an additional linter
- Oxlint has been added to auto-fix some common issues
- The
generate-parsers.tsscript has been updated to support copying existing.wasmfiles from tree-sitter grammar packages - Initial support for C++
- A basic typedoc configuration was added, to help in rendering docs
- A utility script for running CFG builders on a complete codebase (
scan-codebase.ts)
- Adding a new language now requires less wiring code, as many language declarations were merged.
- In C and C++,
if-elsestatements without curly braces no longer break the CFG builder (#32)
- Dark-mode and custom color schemes
- Default light/dark mode based on VSCode theme
- Color-scheme creation in the interactive demo
- Documented the color-scheme options
- Nodes for empty blocks now map correctly to the empty block, instead of doing nothing when clicked.
- Clicking a node in the graph now places the cursor on the matching line.
- The demo has a
debugURL parameter to enable some debug features.
- Backlinks are now using the
dir=backDOT attribute to improve graph layouts.
- The CFG view now highlights (in black) the node matching the cursor position.
- Basic CFG caching for tests, making them twice as fast.
- The extension learned to only generate a CFG on code or config changes. If the cursor just moves inside the same function, we don't regenerate the CFG.
- Rendering of
selectblocks in Go was broken. - Empty case clauses in
switchstatements no longer cause crashes. - Last case of a Python
matchstatement no longer assumed to match.
- Massive refactoring of
CFGBuilderclasses. New design now uses the sameGenericCFGBuilderclass for all languages, and takes statement handlers as arguments. This reduces code duplication and makes it easier to add new languages in the future. - Flat switches now generate nodes for the conditions, and not only the consequence.
- The CodeMirror editor in the demo got it's own Svelte component now,
Editor.svelte. This allows better state management and handling/dispatching events.
- Initial support for Python.
- Support for node clusters. This is used heavily in Python, for context-managers and exception-handling.
- A "share" feature to the demo
- A "save SVG" option to the demo
- Enable live-testing with the web viewer. Requires that you run both
bun web-tests --watchandbun webat the same time. - By default,
bun webonly shows failing tests bun webcolor-codes tests to note which are failingbun lintaddedtsc --noEmit- DOT output in
bun webis not pretty-printed, and can be automatically opened in GraphvizOnline
- Switch-like structures in flatSwitch now show an alternative edge from the head to the exit node. This was previously missing.
- Thick-backlinks (for loops) are now generated correctly based on loop detection.
- Improved comment-test framework to allow writing tests for multiple languages
- Added comment-test in-browser rendering to allow better debugging
- Add basic support for C
- Learned Go's
fallthroughkeyword - Learned an option to draw flat-switches (where all cases are direct descendants of the switch head)
- Added utilities for basic reachability testing
- Expose
simplifyandflat switchsettings in demo - Expose
flat switchsetting in extension
- Interactive demo website, use
bun demoto run. - Publish demo via Github Pages
- Updated readme to point to the demo
- Automatically publish releases
- Basic, complete extension.