r-lib / ps

R package to query, list, manipulate system processes
https://ps.r-lib.org/
Other
77 stars 19 forks source link

ps/man/ps_loadavg.Rd is "broken" #112

Closed gwd999 closed 2 years ago

gwd999 commented 2 years ago

@gaborcsardi Please [potentially] have a look at ps/man/ps_loadavg.Rd here in the repo The title == description which causes problems on some builds from source - strangely it only happened / I noticed it only (threw weird errors) when building in R-4.0.4 on WIN 10 cygwin

Since it looks like you are using some extra packages ("roxygenlabs") to build the .Rd files, there could be some flaws in that extra package or just in your ps_loadavg roxygen comments - did not investigate in detail, just fixed the ps_loadavg.Rd by hand on my side and build worked w/o errors again.

thought I'd let you know ...

gaborcsardi commented 2 years ago

The title == description which causes problems on some builds from source

What problems exactly?

gwd999 commented 2 years ago

What problems exactly?

I was building on Cygwin64 and I could fix some errors referring to I think the message was about linebreaks or so in ps_loadavg.Rd by shortening the title; that is when I noticed that the title was basically a repeat of the description also something you did as I just noticed ... since in the current "normal" install from CRAN [title] is also a bit "longer" but already shorter "here" [in github repo]

image

But one thing/question @gaborcsardi - am I guessing right that the ps pkg is not functional under cygwin R in my case R-4.1.0? I did an update from R-4.0.4 to R-4.1.0 because I read in some comment on the web, that an update was able to fix some issues with pid handles on some Posix related builds - but ps_handle still looks the same on cygwin after the R-4.1 update.

Or am I just missing out on something maybe an additional dependency or so?

Thanks ... for the prompt [cosmetic] fix of the ps_loadavg.Rd title

gaborcsardi commented 2 years ago

am I guessing right that the ps pkg is not functional under cygwin R

I don't know, what do ps::ps_os_type(), .Platform$OS.type and R.version$platform return?

gwd999 commented 2 years ago

I don't know, what do ps::ps_os_type(), .Platform$OS.type and R.version$platform return?

when starting cygwin R ... and executing those commands I get:

Error: Not implemented on this platform: `ps_handle`
> ps::ps_os_type()
  POSIX WINDOWS   LINUX   MACOS
  FALSE   FALSE   FALSE   FALSE
Error : Not implemented on this platform: `ps_handle`
> .Platform$OS.type
[1] "unix"
Error : Not implemented on this platform: `ps_handle`

the above made me expect that ps would work w/o any issues but probably those .c files you have in the package dig deeper - at least afaict from ps::ps_os_type()

> R.version$platform
[1] "x86_64-pc-cygwin"
Error : Not implemented on this platform: `ps_handle`

I left the Error : Not implemented on this platform: 'ps_handle' message in there - but you can ignore that ... is a result of my startup process including a package that depends on ps indirectly

gaborcsardi commented 2 years ago

TBH I am unsure about how many R users use cygwin and whether it is worth supporting it. The native Windows support is pretty good in R, and we also have WSL now. Can I ask why you chose running R in Cygwin?

gwd999 commented 2 years ago

Of course - no big deal ... I am using it anyway mainly on WIN10 and WSL2 Ubuntu It was more of a "geek weekend project" that had me run into this and curiosity on the topic that made me reach out. PLUS a result of a side-project trying to build a R-3.6 package with quantlib includes which relied on cygwin as build environment - that was how I came to continue playing around in it - ie upgrading the R version and also trying to get my [startup] setup fully working there ... but I can definitely live w/o it so to speak.
A small positive(?) side-effect was just that I noticed the "exotic" title length in the documentation - so it also had a little QA (quality assurance) benefit to it as well, maybe some informative value in case someone else runs into similar issues at some future date. PS: by the way -> your prompt package (the git prompt functionality) really rocks! of course the other ones are also awesome - guess [prompt] is just "in my face" every day so that's why it comes to my mind first ... have a nice rest of weekend