utils: Raise ValueError when external definition could not be parsed
Such case can happen when an external definition is malformed.
Previously, the parsed malformed external was added to the directory state with an empty external URL which could lead to unexpected side effects like removing all previously exported valid externals.
Depends on !161 (closed)
Migrated from D8942 (view on Phabricator)