-
Notifications
You must be signed in to change notification settings - Fork 279
Description
Currently, if deepSkip
is enabled, all the contracts that are skipped are not post processed to remove stuff like view
modifiers. This leads to compilation failures when the skipped contract has a view
function and the interface it inherits is not skipped.
Assume there is an interface Imodule and it is implemented by IfirstModule and IsecondModule. Let the interface define a view
function that both the modules implement. The compilation will fail after instrumenting if we exclude any one of the module as the interface will be processed to convert view
functions to non-payable
but the skipped module will still implement it as view
function.
We can avoid this by setting deepSkip
to true but then large contracts like OraclizeAPI and other unneeded stuff is processed as well which causes other issues (Timeouts, instrumenting hangs sometimes etc).
I propose that we add a config variable forceParse
which will be an array like skipFiles
and entries in it will be force parsed even if deepSkip is set to true.
Alternatively, we can make deepSkip
an array and skip only the files in that array.
I prefer the first option as it won't require unaffected users to change their config.
Update: I have created a PR to fix this.