eth-gas-reporter icon indicating copy to clipboard operation
eth-gas-reporter copied to clipboard

@codechecks/client should be dev dependency

Open cruzdanilo opened this issue 3 years ago • 6 comments

currently, @codechecks/client is a peer dependency, which causes warnings on npm/yarn install when not being used.

cruzdanilo avatar Oct 30 '20 05:10 cruzdanilo

@cruzdanilo It is a dev dependency here...

https://github.com/cgewecke/eth-gas-reporter/blob/13c3e19487eb38cc0c92ab99aafc48f5626a9623/package.json#L53-L54

Do you think it should be a "real" dependency?

The engineer who writes codechecks suggested the current format while reviewing the PR which added this feature. This makes sense from the codechecks standpoint since a project might have many checks that do different things.

Things are slightly weird here because this module isn't a dedicated "check"... e.g codechecks is an option.

cgewecke avatar Oct 30 '20 17:10 cgewecke

Completely decoupling the check was another suggested option...

https://github.com/cgewecke/eth-gas-reporter/pull/131#issuecomment-502873774

cgewecke avatar Oct 30 '20 17:10 cgewecke

decoupling would be the best. if not decoupled, i think it would be better to list it in optionalDependencies. i personally don't like optionalDependencies as they are not easy to opt-out, but it makes more sense semantically and doesn't cause warnings on npm/yarn install.

cruzdanilo avatar Oct 30 '20 17:10 cruzdanilo

decoupling would be the best

Tbh I didn't do it this way because it's more convenient to maintain/develop it in the same repo. The user would also have to install two additional things to run the feature...(which is fine I guess)

Optional dependencies sounds good for this case.

i personally don't like optionalDependencies as they are not easy to opt-out,

Could you explain this a bit further? What problems do you run into?

cgewecke avatar Oct 30 '20 17:10 cgewecke

i personally don't like optionalDependencies as they are not easy to opt-out,

Could you explain this a bit further? What problems do you run into?

there is no way to select which optional dependencies you want to skip, or even from which package. there is only the --no-optional option for the whole install process.

cruzdanilo avatar Oct 30 '20 17:10 cruzdanilo

Ah I see! Ok that makes sense.

cgewecke avatar Oct 30 '20 17:10 cgewecke

Hi! eth-gas-reporter is being deprecated in favor of hardhat-gas-reporter.

In the latest version at Hardhat, Codechecks support has been removed because they haven't been accepting new users for a while.

https://github.com/cgewecke/hardhat-gas-reporter/releases/tag/v2.0.0

cgewecke avatar Mar 17 '24 15:03 cgewecke