-
Notifications
You must be signed in to change notification settings - Fork 35
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
pkg_name result retains trailing whitespace from Package field in DESCRIPTION #29
Comments
I'll bring this to pkgload (I think). KTB |
If this is opened anywhere it should probably be desc, it should probably not be preserving whitespace for the package name field |
desc preserves whitespace per policy, although in this case it could give a warning I suppose. |
@jimhester I was originally going to open in desc, but it looked like desc was keeping the whitespace by design and after some consideration. @gaborcsardi I personally wouldn't give a warning at desc. I thought it was reasonable for desc to return stuff with whitespace, but I'd call on But it's up to you ... I'm only reporting because Sorry about the confusion ... I just realized this function exists in multiple packages in this ecosystem. |
Not sure about the details about desc, but maybe |
I think this should be definitely fixed. desc keeps the whitespace, but this is really only important, if you are writing the file back to disc. So This means that I opened an issue at desc, and will leave this one closed. Is this OK? |
Sounds good. |
Original context: using pkgdown; there was trailing whitespace in the "Package" field that was causing
build_reference
to fail.It looks like the desc package behavior is to preserve whitespace on read:
https://github.com/r-lib/desc/blob/898c0cea313f7df17cadfbc81eb38b9b403c6044/tests/testthat/test-read.R#L13
Then should
pkgbuild:::pkg_name
trim if it is depending on desc to read the DESCRIPTION file (?)Obviously, I dropped the whitespace in my DESCRIPTION file, and everything works now. Reporting for you to consider.
Thanks,
Kyle
The text was updated successfully, but these errors were encountered: