Closed MarcinKosinski closed 8 years ago
Is it like the warning occur because the session info is duplicated (is is being added every time)?
We may force silent=TRUE here: si <- devtools::session_info() md5hashDF <- saveToLocalRepo( si, archiveData = FALSE, repoDir = repoDir, rememberName = FALSE, archiveTags = FALSE, force=TRUE, archiveSessionInfo = FALSE)
I got a little bit confused. rememberName should not be changed by a user. When we are using saveToRepo in a nested environment we give up it's name. rememberName controls (only inside the function) whether we have found an artifact's name in the parent envir and we'll archive with it''s name or we didn't find it's name in the upper/parent(1) envir and we gonna save it without a name (with a name that corresponds to the md5hash).
I have proposed a upgrade to this grotesque solution in #227 . Now we'll be able to archive artifacts with their names in a nested calls and we can remove rememberName parameter and we can remove many lines of unneeded poor code
I thought it's the reason of archivingSessionInfo two. But the solution I proposed might fix the whole mess
Probably the problem occured when we set archiveSessionInfo = TRUE
by deafult and it was used inside extractData
with default value, so what's why we encountered such an error.
I have removed rememberName
parameter and the code of saveToRepo
is a little bit more clear -> we'll be more robust to such ridiculous warnings.
The changes can be merged here: https://github.com/pbiecek/archivist/pull/230
Then we can close this issue.
In the past versions of archivist we were trying to inform user that the archiving proceed second time for the same artifact. But it looks like I might have been wrong while writing this statement
Look at the following example:
I am not archiving data (for data.frame it is even impossible) but the error occures when I specify
rememberName = FALSE
I think this check is invalid https://github.com/pbiecek/archivist/blob/master/R/saveToRepo.R#L193-L205