KentonWhite/ProjectTemplate

cache bug

Closed this issue · 4 comments

I created a project with older version of ProjectTemplate and it worked fine. I then updated the package and got the error message bellow running cache on an object that was already cached. The problem was solved by first removing the old cached object and then rerunning the cache function again (then a .hash file was created along with hthe cached file etc and everything seems to be in order).

Error in if (stored$hash["VAR", ]$hash == genv.hash["VAR", ]$hash) { : 
  argument is of length zero

BTW: new version I updated to is 0.7

Thanks for reporting @eribul - that is definitely a bug. The new caching mechanism has new information in a .hash file as you discovered, but the user shouldn't be exposed to that.

I'll look into this in more detail. I think the fix is to do some work in migrate.project to fix this automatically.

Can you tell me: did you run the migrate.project() command after you upgraded to the latest version of ProjectTemplate?

Fix submitted to address this issue #194

@eribul The fix has been merged into master. I'm closing this issue and if the fix doesn't work for you please feel free to reopen!