r-quantities / units

Measurement units for R
https://r-quantities.github.io/units
175 stars 28 forks source link

upcoming tibble breaks units #225

Closed edzer closed 4 years ago

edzer commented 4 years ago

Dear Edzer Pebesma,

This is an automated email to let you know that:

Major update, using vctrs internally.

I need your help to keep units and tibble working together smoothly. In the next days, can you please:

  1. Read about the changes to tibble at https://github.com/tidyverse/tibble/blob/master/NEWS.md. This page includes a list of breaking changes, the reasoning behind them, and to how to update your code.

  2. Carefully inspect the failing checks listed at the bottom of this email.

  3. For each failing check, either update your package, or tell me that I have a bug. If you have made changes to your package, please submit an update to CRAN before Mar 18.

If you have discovered a bug in tibble, please file an issue (ideally with a small reprex that illustrates the problem) at https://github.com/tidyverse/tibble/issues. If you're not sure whether or not you've found a bug, please file an issue at https://github.com/tidyverse/tibble/issues for discussion. Breaking changes that are not listed qualify as bugs.

Please respond to this message if you have any questions.

Thanks,

Kirill

== CHECK RESULTS ========================================

Enchufa2 commented 4 years ago

According to the news,

List classes are no longer automatically treated as vectors. Symptoms:

  • Error: All columns in a tibble must be vectors
  • Error: Expected a vector, not a ... object

If you implement a class that wraps a list as S3 vector, you need to include "list" in the class:

structure(x, class = c("your_s3_class", "list"))

So adding "list" to "mixed_units" should be enough.

Enchufa2 commented 4 years ago

Simple fix. Tested successfully against tibble 2.99.99.9014. NEWS and version updated, ready for CRAN submission.

edzer commented 4 years ago

Thank you so much!

edzer commented 4 years ago

Great, on its way to CRAN now.