-
Notifications
You must be signed in to change notification settings - Fork 32
Remove JRI dependency in little jar #427
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
Conversation
This PR is not necessary anymore ? |
…g.log in working directory
…tle jar's dependency on JRI
@rafapereirabr PR wasn't passing last night, passes locally now, will check github tests in the morning. JRI imports we're useful contrary to what Marcus and I originally thought, they allowed for writing tests within R that could read the java outputs and verify that verbose and progress were working properly. However, I still wanted to decouple the little jar from being dependent on an entire R engine. To solve this I have configured the java logger to save log output to a In the future the log files should have session id's so that they don't overwrite eachother but that is beyond the scope of this PR I think as this issue was never a priority I just got sucked into it and didn't want to give up. |
@BardyBard , can we confugure this so that |
# Conflicts: # r-package/inst/jar/r5r.jar
@rafapereirabr Log file now gets saved to the datapath. File is called r5rlog_date.log. New log file gets created each calendar day and all logs from that day get appended to this file. I tried using unique files for each runtime but that fills up the directory and gets annoying very fast. Theres just one issue with this implementation: I can only pass information to the logger through env variables and I can only pass those from R before .jinit() is called. Once .jinit() is called once, calling it again doesn't reinitialize java and so I am unable to redefine a new logging path if the user changed their datapath mid session, until R studio is restarted. |
this issue with changing the data path is nor suuuper critical, but it is annoying. I wouldn't make sense to pass the text of the log report from Jave to R and then we save it using R, right? Because if Java crashes, we would not be able to pass the report. correct ? |
I have not had a lot of success being able to pass the logs from Java to R and still be able to manipulate them aside from printing to the console (my knowledge of R is non-existent so I rely on things chatgpt tells me to try when it comes to manipulating the R side). Previously, information was passed from Java to R using JRI (Java R interface). This was used only in one place, to verify that Since all the logs still get printed to the R studio console, and this text file is mostly a workaround for the testthat test, I don't think it is critical to make the datapath changeable. Interestingly running R5R using the check button in Rstudio and the console seems to be different terminals as it re-initiates rJava and passes through the new datapath. |
Unnecessary dependencies in little jar that were unused as mentioned by Marcus.