GithubHelp home page GithubHelp logo

Comments (21)

gaborcsardi avatar gaborcsardi commented on June 1, 2024

Oops. Sorry. Reverted and will investigate.

from callr.

gaborcsardi avatar gaborcsardi commented on June 1, 2024

But then, how did an older devtools version fix this?

from callr.

jimhester avatar jimhester commented on June 1, 2024

Current devel devtools uses callr, older devtools does not!

from callr.

gaborcsardi avatar gaborcsardi commented on June 1, 2024

I just just don't see it. The new version of callr will not require quoting external commands and arguments, but the only devtools-related code that uses callr with quoting is here: https://github.com/r-pkgs/pkgload/blob/master-clean-start/R/install-min.r#L15-L16
and it seems that this code was already removed from pkgload.

Am I missing sg?

from callr.

gaborcsardi avatar gaborcsardi commented on June 1, 2024

Aha, I think I got it. Here:
https://github.com/r-pkgs/pkgbuild/blob/5ed87aa1c6f0482123d53a242df3dbc058e39f2c/R/compile-dll.r#L147-L148
and probably here as well:
https://github.com/r-pkgs/pkgbuild/blob/551a3c7e7f6f80dc8edc35039613c43f2a89e7fe/R/build.r#L71

Anyway, we need some (small) transitioning plan for these, because callr will not work with quoting. So at some point we just need to remove the quoting from pkgbuild, and I guess also add a remote to the newer callr version.

from callr.

jimhester avatar jimhester commented on June 1, 2024

Yeah I think pinning devtools / pkgbuild to callr before the quoting, then we can fix pkgbuild /devtools and update the remote.

from callr.

gaborcsardi avatar gaborcsardi commented on June 1, 2024

@jimhester OK, here is the plan. Only pkgbuild is affected. devtools and pkgapi and pkgdown also use callr, but they are not affected.

  • I submit a PR to pkgbuild, that pins callr
  • @jimhester merges the PR
  • I update callr to use processx.
  • I submit a PR to pkgbuild that pins callr to the new version (?), and removes the shQuote().
  • @jimhester merges the PR
  • ... time passes ...
  • I put the new callr on CRAN (also needs processx, etc. on CRAN)
  • I submit a PR to pkgbuild to remove the pinning and the callr remote entirely
  • @jimhester merges the PR

OK?

from callr.

jimhester avatar jimhester commented on June 1, 2024

👍 , it is up to you if we pin the new callr version or just let it track the head of callr, in some ways I prefer the latter so we uncover issues sooner, but it is your call.

from callr.

gaborcsardi avatar gaborcsardi commented on June 1, 2024

@jimhester pinning PR submitted.

from callr.

gaborcsardi avatar gaborcsardi commented on June 1, 2024

it is up to you if we pin the new callr version or just let it track the head of callr, in some ways I prefer the latter so we uncover issues sooner, but it is your call.

Can I pin to HEAD ? Just because if I just say r-pkgs/callr, then nothing indicates that the old version is bad....

from callr.

jimhester avatar jimhester commented on June 1, 2024

Both r-pkgs/callr@HEAD and r-pkgs/callr@master seem to work

from callr.

gaborcsardi avatar gaborcsardi commented on June 1, 2024

Thanks, submitted another PR.

from callr.

gaborcsardi avatar gaborcsardi commented on June 1, 2024

Thanks again. It seems that actually devtools needs a PR as well:
https://github.com/hadley/devtools/blob/2e3c4b692e3aecd7a4fd746e3000db1f4aa706bd/R/install.r#L158

from callr.

gaborcsardi avatar gaborcsardi commented on June 1, 2024

@jimhester PR for devtools: r-lib/devtools#1493

from callr.

clocklear avatar clocklear commented on June 1, 2024

This appears to still be broken, in some capacity. We're getting extra quotes in our devtools -> callr interactions:

> devtools::install_git('http://<our on-prem git solution>/dsc/coreFunctions.git', force = T)
Downloading git repo http://<our on-prem git solution>/dsc/coreFunctions.git
Installing coreFunctions
Running command /Library/Frameworks/R.framework/Resources/bin/R 
Arguments:
CMD
INSTALL
/private/var/folders/f5/7fhn61rj61nfq4s29ww0sk5jrmxt2m/T/RtmpklYkmZ/fileb1b368156e15
--library='/Library/Frameworks/R.framework/Versions/3.3/Resources/library' --install-tests 
Error: ERROR: cannot cd to directory ‘'/Library/Frameworks/R.framework/Versions/3.3/Resources/library' --install-tests’
 
Installation failed: NULL : Command failed:
  
 Error: ERROR: cannot cd to directory ‘'/Library/Frameworks/R.framework/Versions/3.3/Resources/library' --install-tests’

Note that R CMD INSTALL is trying to cd to the ‘'/Library/Frameworks/R.framework/Versions/3.3/Resources/library' --install-tests’ directory, which is obviously a quoting problem.

from callr.

gaborcsardi avatar gaborcsardi commented on June 1, 2024

Yes, I think the shQuote form here needs to be removed:
https://github.com/hadley/devtools/blob/90a866b594389bacb2e579c358fd71736410606a/R/install.r#L145

@jimhester can you remove it pls?

from callr.

clocklear avatar clocklear commented on June 1, 2024

I made that change in our local copy and it's still trying to include the entire opts array in the cd. It's hacky, but I had to also comment out the --install-tests. I'm not sure why it's interpreting the entire opts as a path.

from callr.

jimhester avatar jimhester commented on June 1, 2024

Should be fixed by r-lib/devtools@ab176e6

from callr.

gaborcsardi avatar gaborcsardi commented on June 1, 2024

from callr.

gaborcsardi avatar gaborcsardi commented on June 1, 2024

@jimhester great, thanks!

from callr.

clocklear avatar clocklear commented on June 1, 2024

Agreed, thanks to both of you for the quick turn-around!

from callr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.