naddison36/sol2uml

Explicit imports causes RangeError

minghinmatthewlam opened this issue · 0 comments

Trying to use sol2uml class on my contract where the contract declares multiple explicit imports like so

pragma solidity 0.8.18;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
...

When running the sol2uml class command there is the error

RangeError: Maximum call stack size exceeded
    at /opt/homebrew/lib/node_modules/sol2uml/lib/associations.js:6:38
    at Array.find (<anonymous>)
    at findAssociatedClass (/opt/homebrew/lib/node_modules/sol2uml/lib/associations.js:6:33)
    at findInheritedType (/opt/homebrew/lib/node_modules/sol2uml/lib/associations.js:84:56)
    at findAssociatedClass (/opt/homebrew/lib/node_modules/sol2uml/lib/associations.js:23:27)
    at findInheritedType (/opt/homebrew/lib/node_modules/sol2uml/lib/associations.js:84:56)
    at findAssociatedClass (/opt/homebrew/lib/node_modules/sol2uml/lib/associations.js:23:27)
    at findInheritedType (/opt/homebrew/lib/node_modules/sol2uml/lib/associations.js:84:56)
    at findAssociatedClass (/opt/homebrew/lib/node_modules/sol2uml/lib/associations.js:23:27)
    at findInheritedType (/opt/homebrew/lib/node_modules/sol2uml/lib/associations.js:84:56)

Running with sol2uml version 2.5.20