-
Notifications
You must be signed in to change notification settings - Fork 518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can dtrace be a peer dependency? #601
Comments
@kbirger FYI we are maintaining a fork with dtrace removed (as well as a few other optional dependencies) https://github.com/takescoop/node-bunyan |
Great @hulbert, I'll probably start using that one as well. Been thinking about doing the same, but no need for multiple forks 👍 |
I don't even use bunyan directly however there are still a ton of packages that depend on "the real" bunyan, hence pull in this package along with dtrace-provider and cause headaches. And despite bunyan putting a try/catch around the require, it can still fail in a way that kills the node process. See: chrisa/node-dtrace-provider#118 It would be nice if we could point all transitive bunyan dependencies to the forked version, however I don't think there's a way to get npm to do such a thing. Given the number of issues caused by dtrace - especially vs the number of ppl who I imagine are actually using it - I think it would really make lives easier to do something about dtrace-provider. Actually, doesn't It's possible, the best solution might be to treat |
As @thom-nic says: the fork does not help if all other packages still refer to the 'real one'. With |
Currently it is an optional dependency, and that's great. But it seems like it would be better to make it a peer dependency.
I am running a containerized node app, and I'm trying to keep my image as small as possible. I don't need dtrace, and I don't want to install python. Currently I get non-fatal errors when when building my image. As they are non-fatal, it is not a show stopper, but it still takes up time and is inelegant to have the errors show up in the log.
If I do install python, it still takes time to install the dtrace dependency, even if I have no use for it.
It seems like the best way to go would be to allow consumers to manually install the dtrace provider module if they need it, as it behaves differently on different platforms and not every consumer of Bunyan will want it.
I recognize that this could be construed as a breaking change as it would likely cause dtrace to stop being installed automatically for some folks.
The text was updated successfully, but these errors were encountered: