atom / deprecation-cop

Shows a list of deprecated calls
MIT License
12 stars 19 forks source link

Deprecation cop incorrectly attributes calls made from packages using atom-space-pen-views #43

Closed izuzak closed 9 years ago

izuzak commented 9 years ago

I have pdf-view@0.17.0 and color-picker@1.7.0 installed. Here's what I see when I start Atom and open a PDF:

screen shot 2015-05-11 at 22 10 51

Notice that the deprecation is attributed to color-picker, but no calls are actually made from that package. It's pdf-view making the calls to atom-space-pen-views, and they somehow end up in the node_modules/atom-space-pen-views of color-picker.

When I uninstall color-picker, I see the call correctly attributed to pdf-view:

screen shot 2015-05-11 at 22 13 21

And if I uninstall pdf-view and keep color-picker -- no deprecation calls are reported in deprecation cop.

Both pdf-view and color-picker use atom-space-pen-view, so my guess is that calls end up in color-pickers dependency somehow (maybe some optimization with caching)? Maybe? /cc @kevinsawicki for :thought_balloon:

This also reminds me of https://github.com/atom/notifications/issues/49.

izuzak commented 9 years ago

And sometimes it attributes the call to atom core because core's atom-space-pen-view dependency is used (?):

screen shot 2015-05-11 at 22 41 49

kevinsawicki commented 9 years ago

Yeah, this needs to be tweaked, things under node_modules/ should be ignored and it should keep looking up the stack.