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

Overly aggressive rewrite of DESCRIPTION #430

Closed
eddelbuettel opened this issue Nov 6, 2015 · 13 comments
Closed

Overly aggressive rewrite of DESCRIPTION #430

eddelbuettel opened this issue Nov 6, 2015 · 13 comments

Comments

@eddelbuettel
Copy link
Contributor

I just got

-Imports: Rcpp (>= 0.11.0), utils
-Suggests: fts, xts, zoo, knitr
+Imports:
+    Rcpp (>= 0.11.0),
+    utils
+Suggests:
+    fts,
+    xts,
+    zoo,
+    knitr
 VignetteBuilder: knitr
 LazyLoad: yes
 LinkingTo: Rcpp, BH
 Description: An R Interface to Bloomberg is provided via the Blp API.
 SystemRequirements: A valid Bloomberg installation. API headers and dynamic
- library are downloaded from <https://github.com/Rblp/blp> during the build
- step. See <http://www.bloomberglabs.com/api/> for API documentation.
+    library are downloaded from <https://github.com/Rblp/blp> during the build
+    step. See <http://www.bloomberglabs.com/api/> for API documentation.
 License: file LICENSE
+RoxygenNote: 5.0.0

and only the last line is a legitimate change. The rest is you imposing a style on me.

@gaborcsardi
Copy link
Member

I believe this is devtools and not roxygen. Although sometimes it is hard to tell. :)

Btw. this will change soon, once devtools manipulates DESCRIPTION with https://github.com/metacran/description, which does not reformat, unless you actually change a field.

@eddelbuettel
Copy link
Contributor Author

This is the script I called:

#!/usr/bin/r
#
# Simple helper script for roxygen2::roxygenize() 
#
# Dirk Eddelbuettel, August 2013
#
# GPL-2 or later

## load roxygen
library(roxygen2)

## check all command-line arguments (if any are given) for directory status
argv <- Filter(function(x) file.info(x)$is.dir, argv)

## loop over all argument, with fallback of the current directory, and
## call compileAttributes() on the given directory
sapply(ifelse(length(argv) > 0, argv, "."), FUN=roxygenize, roclets="rd")

I would not miss a chance to yell at devtools as @hadley knows, but here it really was roxygen. It only happens on the first pass when it adds it 'Roxy 5 was here' stamp. Subsequent runs are fine.

@hadley
Copy link
Member

hadley commented Aug 29, 2016

@gaborcsardi I'm using desc 1.0.0 and it seems like desc::desc_set_collate() still affects other fields (namely it adds trailing whitespace after depends, imports, and suggests). It also doesn't allow me to start collate on new line.

@hadley
Copy link
Member

hadley commented Aug 29, 2016

Oh I see the discussion about the spaces, I guess I can live with that. But not starting on a new line bugs me.

@gaborcsardi
Copy link
Member

YEah, I don't mind starting on a new line: r-lib/desc#24

@eddelbuettel
Copy link
Contributor Author

eddelbuettel commented Aug 29, 2016

But it's my (DESCRIPTION) file and I didn't ask for a rewrite that pleases you. I just asked for a transfer of Rd content from R files to Rd files.

It is somewhat rude to alter unrelated files in a different format, however pleased you may be with the format. I did not ask for it.

@gaborcsardi
Copy link
Member

gaborcsardi commented Aug 29, 2016

@eddelbuettel desc only reformats fields that you manipulate, so once roxygen2 switches to it, this issue should be solved.

@eddelbuettel
Copy link
Contributor Author

eddelbuettel commented Aug 29, 2016

@gaborcsardi I don't follow.

I use roxygen. I dislike its behaviour. I file a bug report. Nine month later I am graced this discussion.

Are you saying "just wait for next release" ?

@hadley
Copy link
Member

hadley commented Aug 29, 2016

@eddelbuettel If you're no longer interested in the discussion, you might want to click the "unsubscribe button". Gabor and I are working to make sure any changes to the DESCRIPTION are minimal — unfortunately base read.description and write.description do not preserve formatting. It's not me imposing a style on you, it's base R.

@gaborcsardi
Copy link
Member

@eddelbuettel The next version of roxygen2 will (probably) use the desc package for DESCRIPTION manipulation. desc does not reformat your fields. :)

@hadley hadley closed this as completed in 39a824c Aug 29, 2016
@eddelbuettel
Copy link
Contributor Author

@hadley: Old roxygen didn't do it. So there goes your 'it is not me'.

Anyway, we're talking software so of course it is 'next version will be perfect'.

@gaborcsardi
Copy link
Member

Yeah, I believe the reformatting is in roxygen: https://github.com/klutometis/roxygen/blob/39a824c5944de99b8ee431b93b7ebcd3baf99ad4/R/description.R

So I guess you don't really need this file any more, although it seems that read.description is used in the test cases.

@gaborcsardi
Copy link
Member

@hadley: I fixed the Collate issue, it was a bug, not a design choice. :)

I'll fix the trailing whitespace issue with whatever solution we agree on, and then make a new release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants