-
Notifications
You must be signed in to change notification settings - Fork 284
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
Add use_makefile() and use_jenkinsfile(). #501
Conversation
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 think these should be use_make()
and use_jenkins()
@jimhester do these default make steps seem reasonable to you?
On further review, Thoughts? |
I've updated with your suggestions, and their implied changes.
Note that the AppVeyor build on Windows seems to have failed because of comparing string literal paths (failed because of path separator discrepancy), instead of resolving the path separators. I am not certain if this is because of the new tests I added, because the failures are thrown via calls to the helper functions:
All tests, build steps, etc. pass on my end (Linux), as do the Travis builds. |
Can you please merge the latest from master? That should fix the appveyor issues. |
Holy cow, that's a lot of commits since last week haha. Updated, thanks! |
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.
@jimhester can you please take a look at the specific make steps?
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 added some suggestions I think would improve the Makefile rules.
inst/templates/Makefile
Outdated
all: build check install clean | ||
|
||
build: | ||
$(R) build . |
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 guess we should think about if it would be better to build the tarball in the current working directory or the parent... I don't have a strong preference either way...
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.
Hmmm, good point. I feel that if it's built in the current directory (hopefully package top-level), then that would be easier to control for by the end-user (via .gitignore etc), and more portable besides. If a user stores all their package code in folders where the parent of each is write-restricted or something else weird, then the build step would fail. Enforcing focus on the current-and-below path should be much more manageable, by everyone. I'm happy to hear thoughts, though.
@ryapric Can you give me a high-level overview of the objective here? I get that this creates a Makefile but to what purpose? What is the workflow facilitated by the added files? Context: I'm readying for release and am trying to get our PRs / issues under control for the first time in a while. I'm triaging into "for current release", "backlog", "will not pursue at this time". |
Hi @jennybc, do I win the award for longest-stale PR yet? To address your question, adding a well-written Makefile to someone's R package workflow makes their build/test/etc. steps move entirely with their code. RStudio can't always be around to facilitate those steps, and not everyone uses Travis, etc. where the steps are already configured. Exposing targets like I'd like to take an hour or so to address the great feedback that @jimhester and @hadley offered above, but if you want to keep this under the Backlog milestone, that's fine. |
@ryapric you PR has to be at least 3 years old to even be in the running for that award 🤣 |
I'm neutral on this and defer to @jimhester and @hadley. If they're on board, I'm happy to rescue from the backlog if you want to finish this off. |
Cool, entirely up to you all, then. I've pushed all the suggested changes, CI builds are running at the time of this posting. Waiting for a comment reply above from @jimhester, but he said he doesn't have strong opinions on the matter (which directory the build step is in). |
I think the Makefile part of this looks good now |
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.
Make these small changes and I'll merge!
Great catch, thank you! |
You're going to kill me but I just realized we still need a NEWS bullet, since this adds 2 new exported functions. Can you please add a bullet to NEWS? It should briefly describe the change and end with |
Sure, do you want it under the current 1.5.0 heading, or do you want me to bump it to a dev version since 1.5.0 already went out? |
There should be a dev heading but I guess there's not. Yes please add such a heading and I'll sort it out from there, after merge. |
Nevermind. There is such a heading and you need to merge in master. |
I see it now, sorry! Pushed. |
Added templates & calling functions to place Makefiles and Jenkinsfiles at project root.
R CMD check results, which I ran using the
--as-cran
flag:Thanks!