question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Adding node dependencies includes a lot of unnecessary contracts

See original GitHub issue

In our use case, one of our contract packages depends on another contract package. However, copying this dependency into the coverage environment results in a ridiculous number of extra contracts being instrumented, due to the inclusion of the dependency’s node modules.

The full list of contracts being instrumented in that repo: https://gist.github.com/sohkai/459dc9ab1b3a410e9af6ab9ae07a196c.

It would be great if we had a way to target certain folders or files in the dependencies for instrumentation, and a way to skip the rest of node_modules.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
cgeweckecommented, Dec 31, 2019

This should be a non-issue with newly published 0.7.0. We’re no longer copying any packages & the tool runs at the same layer as the project root.

However if you run into any weird issues using Lerna with the new version, please just lmk.

A monorepo called Sabiler has been able to run the new version without serious problems so hopefully everything’s ok.

0reactions
sohkaicommented, Jul 16, 2019

@sohkai Yes 6.4.5-sc.3 might actually make a difference, I saw some staticcall stuff clear up on the bancorprotocol contracts with that change yesterday.

Can confirm wit sc.3 that these staticcall tests are working for us now as well 👍.

Will check out the gas check in CI! That looks super cool 😃. Quick question on it; how well does it support monorepo tests? Should it try and pipe the results of each separate package together, kind of like what happens with lcov?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Understanding the npm dependency model - Alexis King
If those contracts involve other packages in any way, they should be peer dependencies. If they don't, they should be ordinary dependencies.
Read more >
Understanding dependency management with Node Modules
Updating and removing unused dependencies · Only upgrade one package or a group of related packages which rely on each other (e.g. React...
Read more >
Cleanup the node_modules for a lighter Lambda Function
Any nodejs project carries a bulky folder - the node_modules - that carries all the modules and dependencies that the application would need. ......
Read more >
Error when installing necessary packages on Node js
open the Visual Studio Installer and you can see if the installer has completed installing the build tools. It may need to be...
Read more >
Yarn lock: how it works and what you risk without maintaining ...
If you've ever built an npm library you might have stumbled ... adding dependencies yarn add PACKAGE-NAME # removing dependencies yarn ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found