nealrichardson commented on issue #43748:
URL: https://github.com/apache/arrow/issues/43748#issuecomment-2322925560

   Thanks for the report. This is bizarre behavior of `packageVersion`: it 
seems to be an infinitely recursive object.
   
   ```
   > x <- packageVersion("arrow")
   > typeof(x)
   [1] "list"
   > lapply(x, typeof)
   [[1]]
   [1] "list"
   
   > lapply(x[[1]], typeof)
   [[1]]
   [1] "list"
   
   > lapply(x[[1]][[1]], typeof)
   [[1]]
   [1] "list"
   
   > x[[1]]
   [1] ‘17.0.0.1’
   > x[[1]][[1]]
   [1] ‘17.0.0.1’
   > x[[1]][[1]][[1]]
   [1] ‘17.0.0.1’
   > x[[1]][[1]][[1]][[1]]
   [1] ‘17.0.0.1’
   ```
   
   It's right there in the function definition: it basically does 
`list(unclass(x)[[1]])`, so it always returns a list
   
   ```
   > `[[.numeric_version`
   function (x, ..., exact = NA) 
   {
       if (...length() < 2L) 
           structure(list(unclass(x)[[..., exact = exact]]), class = 
oldClass(x))
       else unclass(x)[[..1, exact = exact]][..2]
   }
   <bytecode: 0x1109cf1c8>
   <environment: namespace:base>
   ```
   
   I'll work around this, but this feels very wrong.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to