Skip to content

Add config option 'forceParse' #301

@maxsam4

Description

@maxsam4

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions