Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
length of NULL cannot be changed errors on installing R 3.5.0 #833
I'm in the early stages of trying to track this down - asking in case it is 'known' or anyone has any ideas before I spend too long on hunting it down.
I installed R 3.5.0 today and reinstalled packages along with it. I'm using readr 1.2.0, tibble 188.8.131.5201, rlang 0.2.0.9001.
My code sits in a package for loading my dataset. The code is 'known working' on my 3.4.4 machine and has been for some time so it looks like a regression which has occurred somewhere.
I've narrowed it down to calling read_csv which is generating the warnings (>50 warnings).
I'm using defined import columns. Because the column list is large, I'm managing it by splitting it into two definitions (columnTypes and followupColumnTypes), and then calling read_csv:
I'm getting >50 warnings of:
Haven't yet managed to distill the example down further into a reprex - if it doesn't ring any bells with anyone I'll try to do that.
The imported data itself seems fine so whatever is going on isn't affecting the output (but is screwing up my debug as I can't see the wood for the trees! I can workaround by disabling warnings on input - but that is ignoring the issue really!)
The only major R thing I can think of is the byte-compiling by default causing a problem somewhere.
I have just reviewed Issue 750 - agree it sounds the same issue. Interesting thing from that report was that the same code worked for some and not for others so it may be something environmental.
Could it be a platform / compiler issue? I’m using a Mac with High Sierra. I know there are some compiler warnings when installing - wonder if they shed any light on things.
Or a version dependency issue? Any dependencies to consider that may influence things?
Right - I have been trying to narrow this down. Can't make it a reprex just yet, but I think it has something to do with code handling col_skip().
I firstly reduced my defined cols list which significantly reduced the number of errors to 15 warnings.
Within that were 15 warnings. col_skip() was present 5 times.
It appears that each occurrence of col_skip has been causing the warning 3 times.
Furthermore, using cols_only with my subset of definitions generates >50 warnings again - suggesting that by behaving as 'col_skip' for all the other columns has generated the additional warnings.
Does that help narrow it down at all?
I have tested this down to a bare minimum. I created the following as a CSV file:
I then read the file in with:
On my MacBook Pro running R 3.5.0 and the packages as described above I see:
On my iMac running R 3.4 (I would need to check the package versions on the iMac again) this runs flawlessly.
The trigger is definitely from defining the column using col_skip(). The following work fine:
Does this help narrow it down?
Just in case it helps - I had downloaded readr from the GitHub site using devtools::install_github. It's compiling on the mac, my clang version is:
Tried this morning to see if I can narrow any setup differences between the iMac and the MacBook Pro. I've ensured that they are running the same versions of tibble, rlang, readr from GitHub and same version of clang - same results (MacBook Pro shows warnings, iMac does not on the same code). So the only logical difference between machines is the version of R.
added a commit
Apr 30, 2018
referenced this issue
May 22, 2018
referenced this issue
May 30, 2018
@thanosgatos, have you updated to the latest development version? (i.e.
suppressPackageStartupMessages(library(tidyverse)) mydat <- data_frame(one = c("Bob", "Mary", "Sue"), two = c(1, 2, 3)) mydat #> # A tibble: 3 x 2 #> one two #> <chr> <dbl> #> 1 Bob 1 #> 2 Mary 2 #> 3 Sue 3 mycsv <- tempfile(fileext = ".csv") write_csv(mydat, mycsv) readat <- read_csv(mycsv, col_names = TRUE, cols(one = col_character(), two = col_skip())) readat #> # A tibble: 3 x 1 #> one #> <chr> #> 1 Bob #> 2 Mary #> 3 Sue unlink(mycsv)
Created on 2018-08-22 by the reprex package (v0.2.0.9000).
If you open a new issue, please do so with a small reprex.