Wrong code to stop httpuv server
Closed this issue · 11 comments
In utils.R, is_available_port function, this line:
on.exit(srv$stop())
should be:
on.exit(httpuv::stopServer(srv))
otherwise, it gives error $ can't be used on atomic something, because srv is a string.
After fixed this one, I got an error that says:
Error: 'current_env' is not an exported object from 'namespace:rlang'
Called from: getExportedValue(pkg, name)
No idea how to fix.
Thank you for the report.
Could you provide some extra informations about your system config? because I ran tests again and all seem to be good. I do not understand where these problems come from.
@theissuer My guess is that some dependencies have to be updated.
I've precised through 32507eb and df96a7c the minimal required versions for the httpuv and rlang packages.
Please, could you reinstall the development version with
remotes::install_github('rlesur/crrri')
and tell us if these issues are still present?
I only installed today with devtools::install_github. Is there a difference with using remotes?
I'll try tomorrow.
I'm using microsoft R client, if that makes a difference?
I'll check my httpuv and rlang versions tomorrow and report back.
there's no difference between devtools and remotes for install_github()
.
I do not know MS R client. I can't say.
My httpuv version is 1.3.5
rlang version is 0.2.0
I'll try updating them and let you know.
I removed rlang, httpuv, and crrri, and re-ran install_github('rlesur/crrri')
and I still got rlang 0.1.6, and httpuv 1.3.5. My rlang version actually got worse.
The microsoft R client version is:
version
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 4.3
year 2017
month 11
day 30
svn rev 73796
language R
version.string R version 3.4.3 (2017-11-30)
nickname Kite-Eating Tree
Maybe it's because the R version 3.4.3 is too old for the packages?
Ok, I think it's because the microsoft R client version is too old. Your code is fine.
It is possible that microsoft R client set a specific cran repos with package snapshot.
You could check with
getOption("repos")
Thanks for the report about this !
I got the following:
getOption('repos')
CRAN CRANextra
"https://mran.microsoft.com/snapshot/2018-01-01" "http://www.stats.ox.ac.uk/pub/RWin"
Do you know how to fix?
This means as I thought that Microsoft R client is coming with a specific cran repos configured to MRAN.
MRAN is a snapshot CRAN. You are currently using one from 2018-01-01. You then won't have access to any packages that are published after this date if I understand it correctly, unless you change the repos when installing.
You can change repository in Option of RSTUDIO IDE, or in R directly by modifying the option options(repos = c(CRAN = "https://cran.rstudio.com"))
for example.
You can also provide the repos as argument in installation function.
That could explain why you had old version I guess.
wow, this fixed it.
Thanks, Chris!
Damn Microsoft...