.. other than by re-opening remix / clearing localStorage.
I mistakenly imported the latest SafeMath.sol from openzeppelin's contracts repo, which required a later version of the solidity compiler than the one I was working with in my code. Then, when I tried to import https://github.com/OpenZeppelin/openzeppelin-contracts/blob/[proper commit hash]/contracts/math/SafeMath.sol, nothing happened.
With no way to delete the imported source file from the file explorer I was stuck. The current workaround (other than being more careful with imports) is to refresh the page, losing your current state.
.. other than by re-opening remix / clearing localStorage.
I mistakenly imported the latest
SafeMath.sol
from openzeppelin's contracts repo, which required a later version of the solidity compiler than the one I was working with in my code. Then, when I tried to importhttps://github.com/OpenZeppelin/openzeppelin-contracts/blob/[proper commit hash]/contracts/math/SafeMath.sol
, nothing happened.With no way to delete the imported source file from the file explorer I was stuck. The current workaround (other than being more careful with imports) is to refresh the page, losing your current state.
possibly related issue: ethereum/remix-ide#2332