Closed pascal-sauer closed 3 months ago
What ist the role of RESET_RENV_ACTIVATE_SCRIPT
? Where is it potentially set and why?
It is not set automatically anywhere, but if you do not want your renv/activate.R script to be reset you can manually set RESET_RENV_ACTIVATE_SCRIPT to FALSE.
Sorry, but did you test that? You seem want to load https://github.com/dklein-pik/remind/blob/b83bb1811ff08d8ee5ba8e834af5dd0080d10e66/renv/activate.R but this commit isn't part of the normal repo. So it fails with
error: pathspec 'renv/activate.R' did not match any file(s) known to git
Really, test the changes before you merge these kind of changes.
Sorry, I cant reproduce this error. Neither with a freshly cloned remind nor when updating an older version.
For me this b83bb1811ff08d8ee5ba8e834af5dd0080d10e66
points to https://github.com/remindmodel/remind/commit/b83bb1811ff08d8ee5ba8e834af5dd0080d10e66
Ok, thanks for checking! grep activate /p/tmp/oliverr/NGFS_v5/d_remind-3p3p1-hpc/output/C_h_cpol_KLW_d50_newmagicc-rem-1/log.txt
is cluttered with these messages. Don't know exactly what is going on there, but it also does not seem to really bother the run…
I check again with the latest develop
.
Sorry, I first made an error, when I claimed that current develop
was fine. Also grep activate /p/tmp/oliverr/remind-renvtest/output/testOneRegi/log.txt
shows this error message. But I have to admit that testOneRegi
is not failing, it seems to basically ignore it.
Seems the problem is: if you start R
or Rscript
from the outputfolder such as output/testOneRegi
, then it cannot find the file, as it lies at ../../renv/activate.R
according to git.
Maybe:
git show b83bb1811ff08d8ee5ba8e834af5dd0080d10e66^:renv/activate.R > renv/activate.R
Sorry, but did you test that? You seem want to load https://github.com/dklein-pik/remind/blob/b83bb1811ff08d8ee5ba8e834af5dd0080d10e66/renv/activate.R but this commit isn't part of the normal repo. So it fails with
error: pathspec 'renv/activate.R' did not match any file(s) known to git
Really, test the changes before you merge these kind of changes.
I feel offended and pressured by this message. To me it reads like I should feel like a careless idiot which is not acceptable. Needless to say being afraid of this kind of messages makes it much less likely that I'll contribute to remind in the future.
With that out of the way, you are right, I did not properly test this. Then again, it's not like this broke remind or anything, it produced a couple junk lines in a log script without stopping or breaking anything.
Your git show approach is cool, I didn't know about that before, thanks! In my PR I went with an additional check instead, since the runfolder renv setup should not be changed at all, but it ultimately shouldn't matter
Purpose of this PR
reset renv/activate.R before sourcing it, preventing the error
object '..version..' not found
that comes up when jumping from renv version 0.16.0 to 1.0.7 (maybe also vice versa)Type of change
(Make sure to delete from the Type-of-change list the items not relevant to your PR)
Checklist:
remind2
where it was neededforbiddenColumnNames
in readCheckScenarioConfig.R in case the PR leads to deprecated switchesFAIL 0
in the output ofmake test
)CHANGELOG.md
has been updated correctlyFurther information (optional):