bcgov / bcmaps

An R package of map layers for British Columbia
http://bcgov.github.io/bcmaps/
Apache License 2.0
73 stars 17 forks source link

cded_raster deprication lifecycle message doesn't print properly #140

Closed bevingtona closed 11 months ago

bevingtona commented 11 months ago

Looks like the deprication message for cded_raster() has a glitch and doen't print the full message. not sure why? The functions seems well written in https://github.com/bcgov/bcmaps/blob/main/R/cded.R (line 174)..

bcmaps::cded_raster(aoi = bcmaps::bc_cities()[1,])
#> Error in parse(text = x, keep.source = FALSE): <text>:1:14: unexpected symbol
#> 1: cded_stars() or
#>                  ^

Created on 2023-11-26 with reprex v2.0.2

stephhazlitt commented 11 months ago

Interesting. It is the with = "cded_stars() or cded_terra()" line, {lifecycle} does not like the multiple functions in that argument (it bonks with the space or any string with more than one ()). The design is to replace one function with one function, so my guess is the regex in {lifecycle} does not like this creative use.

We could remove the with argument and add the fxns to details? e.g.,

details = "bcmaps has begun dropping support for raster objects. Please consider switching to terra [cded_terra()] or stars [cded_stars()]."

bevingtona commented 11 months ago

Yeah that sounds great, thanks @stephhazlitt :) Not mission critical obviously, just a tiny bug

stephhazlitt commented 11 months ago

@bevingtona do you want to make a PR with this small tweak?

stephhazlitt commented 11 months ago

@bevingtona Thanks for putting up the PR 🙌 Let's closed this after the review+merge ⛙.