-
Notifications
You must be signed in to change notification settings - Fork 31
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
Render output in a temp directory, when in an R package #435
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is new configuration, so users can turn off this behavior if they prefer:
I want to argue that this should be
true
by default, because otherwise, R package developers need to add all these output files to both.gitignore
and.Rbuildignore
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would recommend doing a bit of work ahead of time to make sure that this is not going to create other bugs. In an R package, will users mostly preview
README.md
files and vignettes? In that case, I wonder if the right behavior is to use--output-dir
only in these special cases.Like we discussed, relocating files for an .html target is unlikely to be robust because of things like CSS resource paths; in that case, we tend to recommend to use
--output-dir
together withembed-resources
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With that said, this is a pain in the neck to test in an automated fashion. It might be good enough to test this by making a mock test harness over at https://github.com/quarto-dev/quarto-cli. I can help with that; I think it's prudent to do it. Because
quarto-cli
won't generally know the ways in which the extension callsquarto render
,quarto preview
etc, we have a pretty big regression risk unless we do something about it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm going to get some more feedback on this from folks, but my current belief is that there are basically no cases where you want to check in generated code such as HTML, libs, etc, for an R package.
The one exception is
README.Rmd
being rendered toREADME.md
but a) none of that works for people right now because ofoutput: github_document
and b) we can encourage them to usedevtools::build_readme()
for this purpose. If we want to be more forward thinking, we could excludeREADME.Rmd
andREADME.qmd
from this treatment, rather than make a list of files to include for this treatment.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe that! Really my only concern is that
quarto preview
itself might break under common use cases in R packages, and I'd hate for us to enable something by default that doesn't work well in these scenarios.