Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

knitr should fail early if required libraries not present #1912

Closed
3 tasks done
arencambre opened this issue Oct 30, 2020 · 5 comments · Fixed by #1913
Closed
3 tasks done

knitr should fail early if required libraries not present #1912

arencambre opened this issue Oct 30, 2020 · 5 comments · Fixed by #1913
Labels
doc Need to improve documentation

Comments

@arencambre
Copy link

If I call knit2wp and I don't have the RWordPress library installed, I don't get an error advising me of this until after the Rmd is "compiled" into an md file. This means considerable effort has been expended all for naught. Please check for the presence of the RWordPress before the function does any heavy lifting and fail early, should it not be present.


By filing an issue to this repo, I promise that

  • I have fully read the issue guide at https://yihui.org/issue/.
  • I have provided the necessary information about my issue.
    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('knitr'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('yihui/knitr').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • I have learned the Github Markdown syntax, and formatted my issue correctly.

I understand that my issue may be closed if I don't fulfill my promises.

@cderv
Copy link
Collaborator

cderv commented Oct 30, 2020

Thanks for the report.

FWIWI There is a warning now in the demo (https://yihui.org/knitr/demo/wordpress/) which is reference in the help page.
RWordPress is no more actively maintained (#1866) and we strongly advice to switch blogging with R to use blogdown (#1866 (comment))

That said, I guess we could make this warning appears in the function knit2wp and check for the package. We could also update the help page.

@cderv cderv added the doc Need to improve documentation label Oct 30, 2020
yihui pushed a commit that referenced this issue Oct 30, 2020
@arencambre
Copy link
Author

Thank you. The appeal of knit2wp, and why I am reluctant to switch to blogdown, is it takes advantage of my existing investment in a WordPress site, instead of starting over on a whole new site. These advantages include but are not limited to:

  • theming already built up
  • consistency with the rest of my site
  • search that includes my whole site
  • not needing to manually maintain a separate site through another method
  • SEO already gained through being a part of a recognized site

Since WordPress remains the most popular CMS, and there are so many ways to run it, I hope this functionality could be considered for long-term inclusion.

This is not meant as a criticism of blogdown. It also has great uses. I am only intending to highlight distinct advantages of something like knit2wp that other techniques cannot match.

@yihui
Copy link
Owner

yihui commented Oct 30, 2020

@arencambre Totally understood. Our main point was that knit2wp() could break anytime, because we don't maintain the actual backend. If someone could continue to maintain RWordPress and XMLRPC, I'm open to support knit2wp() on my side in the foreseeable future.

@arencambre
Copy link
Author

Understood.

Technically knit2wp is already broken. It depends on RWordPress, which depends on RCurl, the latter of which uses an obsolete version of openssl. The obsolete openssl does not support TLS 1.2 or higher, which means it only supports insecure protocols.

@github-actions
Copy link

github-actions bot commented May 5, 2021

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue by following the issue guide (https://yihui.org/issue/), and link to this old issue if necessary.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
doc Need to improve documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants