Skip to content

Test R 3.1 and R 3.2 #249

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

Merged
merged 9 commits into from
Oct 30, 2017
Merged

Test R 3.1 and R 3.2 #249

merged 9 commits into from
Oct 30, 2017

Conversation

krlmlr
Copy link
Member

@krlmlr krlmlr commented Oct 23, 2017

@lorenzwalthert: Our suggested data.tree imports DiagrammeR which requires R >= 3.2. Could you please look into making R CMD check work if data.tree is not available? You can push to this branch if you like.

Required for #238.

@krlmlr
Copy link
Member Author

krlmlr commented Oct 23, 2017

Link to travis build: https://travis-ci.org/krlmlr/styler/jobs/291431915#L3122

@krlmlr
Copy link
Member Author

krlmlr commented Oct 27, 2017

We can just use the backports package to fix the trimws error: https://travis-ci.org/krlmlr/styler/jobs/293558005#L1786

@lorenzwalthert
Copy link
Collaborator

trimws() was only introduced in R3.2 and we need it to drop spaces at the end of comments. Should we implement regex-based function that does something similar?

@lorenzwalthert
Copy link
Collaborator

Ok, great.

@lorenzwalthert
Copy link
Collaborator

Ok, now I made it work. test_collection() has a new default write_tree = NA, in which case it is determined via getRversion() whether a tree should be written or not. If set to TRUE under R < 3.2. an informative error will be thrown. In addition, I had to replace some vignette content with rendered markdown. create_node_from_nested_root() is the workhorse tree creation function that throws the same error if a tree should be produced with R < 3.2.

@lorenzwalthert lorenzwalthert merged commit 0303660 into master Oct 30, 2017
@lorenzwalthert lorenzwalthert deleted the f-#238-r-lib branch October 30, 2017 20:23
create_node_from_nested_root <- function(pd_nested) {
if (getRversion() < 3.2) stop_insufficient_r_version()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just check if the data.tree package is available here? They might start supporting R 3.1, or it still may be missing because it's Suggests only.

styler:::create_tree(code)
```

## levelName
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this still renders correctly in the vignette.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, this is a code block, too. I was just looking for the triple backticks.

krlmlr added a commit that referenced this pull request Nov 27, 2017
- Adapt documentation (#290).
- Add roundtrip (#287).
- Fix AppVeyor builds.
- Fix token insertion / comment interaction (#279).
- Clarify labelling strategy (#285).
- Fixing and extending Rstudioaddins (#283).
- Fix eq assign parsing (#276).
- style_files -> vectorized style_file (#273).
- Refactoring (#270).
- Fix CI (#275).
- Fix covr (#274).
- Renaming files (#271).
- Handle styling of an unsaved active file (#243).
- Test R 3.1 and R 3.2 (#249).
- Allow empty {} without line break (#261).
- Wrap expr in expr before enclosing with curly braces (#263).
- Avoid checking for hard-coded dot (#262).
- Account for dependency renaming (utf8 changed to enc) (#264).
- Indention of function declaration and closing braces (#260).
- Only remove line break before closing with strict option (#252).
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

Successfully merging this pull request may close these issues.

2 participants