Closed maurelian closed 7 years ago
I believe we need to include the path in case files are present that have the same name, but it's entirely reasonable to suggest the path should only be relative to the project's directory.
I was thinking more like this https://github.com/maurelian/uport-proxy/blob/modifyContract/contracts/IdentityFactory.sol#L10
But removing the need for the full path might help too.
Ah, I see. I'd rather not head down that road - if we did, anyone using our tool that happened to have a variable named fileName
wouldn't be able to use solcover.
EDIT: We parse the AST, so we could come up with a unique ID that we know isn't in there in principle...
Is there any reason you couldn't just add a private string variable called
fileName
, and then call that variable in the events rather than using the full path the every time? it would be tidier, and I don't know too much about the compiler, but hopefully it'd reduce the size of the bytecode output.