-
Notifications
You must be signed in to change notification settings - Fork 321
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
pkgdown 1.6.1 build_site()
warning due to incomplete final line
#1419
Comments
I don't think this can be a pkgdown problem because we have: readLines <- function(...) stop("Use read_lines!")
read_lines <- function(path, n = -1L) {
base::readLines(path, n = n, encoding = "UTF-8", warn = FALSE)
} |
FWIW I see this too, consistently, when I build pkgdown sites locally:
Could it be coming from a more indirect call to |
@jennybc That was my thought too but I couldn't figure out a way to track that down in a stack trace. I think I only have 1 package currently that generates this warning. I'll take a look again and see if I come across any useful info. |
I have completely failed to debug this but let me at least record what I've observed and tried: I only see the warning with Having Putting Lines 390 to 394 in 20c4390
|
I also just replicated the warning with httr, so it's not specific to gargle. But I don't see it with pkgdown itself or with reprex. |
In the case of
was printed. The example in that help page generates an "incomplete last line" warning, but with a different filename, which seems like quite a coincidence. EDITED TO ADD: Sorry, I was just seeing the example generate the warning. So all I can contribute is that nothing else in that process generated the one that's showing up in the console. |
I have it. The file missing the closing LF is an article about Tracing down through the So probably the solution is for downlit to suppress warnings when calling |
@dmurdoch thanks for all the investigation! Would you mind also doing a PR to yaml itself so that we can fix this problem for others too? |
I did submit the |
Aha! I expect some of my observations were spurious and due to coincidences re: the order in which I tried things. |
I'm seeing a warning like this pop up consistently for my pipette package:
I've attached the
file10c2611bb97d1
file causing the warning withreadLines
.file10c2611bb97d1.txt
As you can see, this file contains documentation for jsonlite, which is imported by pipette. I can confirm that this file doesn't contain an expected EOL line break, which causes
readLines
to warn. Note thatreadr::read_lines()
handles this situation without a warning, as a possible solution.The text was updated successfully, but these errors were encountered: