-
Notifications
You must be signed in to change notification settings - Fork 31
Build JAR on R build #545
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
Draft
mattwigway
wants to merge
14
commits into
ipeaGIT:master
Choose a base branch
from
mattwigway:build-java-on-r-build
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Build JAR on R build #545
+56
−449
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
Author
Contributor
Author
|
Not sure why Github isn't linking the CI results, but they're here |
Contributor
Author
|
To build during development, you just run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We've run into a number of issues with the auto-rebuild of the JAR in the past (e.g. version mismatches etc.), and it's generally not best practice to have compiled code checked into the source repository anyhow for a number of reasons. This is a proof-of-concept removing the JAR from the git repository and instead building it from scratch when
R CMD buildis executed. This won't affect the vast majority of users who get binary packages from CRAN, but will ensure that the R and java code are in sync.I know @rafapereirabr has been hesitant to change the build system in the past, and I'm very sensitive to maintainability issues. I think this is actually more maintainable than the current Frankenstein Github Actions compile step that then checks the JAR into the repo, but I'll defer to him on whether this is a good direction to go, just wanted to put the proof of concept out there (hence the draft status). Definitely not something that should be targeted for r5r 2.4.0.
In order to make this work, the java code has to be in the
r-packagedirectory, so I moved it to thejavadirectory, which is where CRAN wants it anyways. It may also make sense to get rid of ther-packagedirectory entirely and just move its contents to the top level, since it no longer needs to be separated from the Java code.The issue I am running into is that the package build requires
devtools(because it runsdevtools::load_all()so it can rundownload_r5()and get the correct R5 JAR.devtoolsis a huge package so I don't want to add it as a dependency, and it's only needed at build time, but I'm not sure how to specify that. The other CI failure is the same one discussed in #544.