Skip to content
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

Request: Move deprecation warning about map-data-related dependencies to functions that use them #139

Closed
dvg-p4 opened this issue Aug 28, 2023 · 3 comments

Comments

@dvg-p4
Copy link

dvg-p4 commented Aug 28, 2023

In the latest version of sp, the package prints a lengthy warning message to the console upon being loaded or attached about the deprecation of optional map-related dependencies maptools, rgdal, and rgeos, and their replacement with sf. As far as I can tell, there is not a straightforward way to suppress this message as a package that depends on sp but doesn't use those functions (or has already switched over to sf). So now when e.g. Seurat (a package for storing and analyzing spatial biosample data) loads this package to use its non-geography-related functions, it shows the user a warning that's irrelevant to them as a biologist.

So, I suggest the warning message about these optional dependencies be moved to the start of the functions that actually rely (relied?) on them, so only users and reverse dependencies who are actually using the affected functions will see it. Alternatively, if there is a straightforward way to suppress the message, I suggest you include it as part of the warning itself ("[...]\nThis message can be suppressed by [XYZ]"). Or if that's common knowledge that I've missed, just let me know here :-)

@vincentvanhees
Copy link

vincentvanhees commented Sep 28, 2023

Also it would be helpful if the warning came with an overview of the dependency paths. For example, I have a package that does not depend on 'sp' but it produces the warning. I suspect it is package geosphere that is the culprit, but it is hard to tell whether geosphere is the only one as there are many other packages in the dependency tree that may also pose a risk.

@sanjmeh
Copy link

sanjmeh commented Oct 15, 2023

Is there any update from anyone? it is getting a long winded investigation as to why sp is getting loaded, even when we donot load it directly. To top it all, there is no package that has sp as depends (at least not in the packageDescription()) but why is the warning getting flashed everytime?

@edzer
Copy link
Owner

edzer commented Oct 15, 2023

The warning will go away in the next version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants