Closed corybrunson closed 2 years ago
Whoops—the commit also
::
in the code (and aren't used unless v1.0.1 or greater is installed) but cause warnings when v0.9.1 is installed.I think imports can be dropped regardless of which approach we take, so i'll remove them in an edit.
@jamesotto852 any thoughts on this PR? I think we should remain compatible with v0.9.1 until {simplextree} and {Mapper} are reconciled, but i'm open to dropping the hidden object solution since the version query is only performed twice.
I think this looks good! I am definitely open to importing {rlang}, it's already an import in {ggplot2} so I don't think any {gghdr} users will need to install it. I would also be happy to leverage its error handling tools in future updates, if that's something others would be interested in.
Oh, good point—we're not really introducing a dependency then. And yes, i am in favor of taking full advantage of it.
Since the PR is directed at your branch, i'll leave it to you to merge. : )
This commit does three things:
.simplextree_version
to assist (1).I've tested the examples with both versions of {simplextree} installed.
It would be feasible to do (1) differently, by querying the version of {simplextree} each time it's needed. It's not clear to me that the convenience is worth the additional import; i did it this way in part to experiment with {rlang}'s
on_load()
andrun_on_load()
functions.