Review Request: Cleanup "~/.cache/kdevduchain/<session>" on session remove (+refactor allocateRepository()).

Ivan Shapovalov intelfx100 at gmail.com
Mon Dec 3 11:47:50 UTC 2012



> On Dec. 3, 2012, 11:31 a.m., Milian Wolff wrote:
> > language/duchain/repositories/itemrepository.cpp, line 89
> > <http://git.reviewboard.kde.org/r/106945/diff/2/?file=92822#file92822line89>
> >
> >     Yes, the locking should be handled by the session. The session id is unique and you should never be able to run the same session multiple times, thus you also never should end up with more than the "0" folder in .cache/kdevduchain/{*}/.
> >     
> >     And what do you mean by "global" one? The cache should be per-session and of course it is global per session. And you also confuse repositories with the cache location, no? The *files* in the folder are the repositories, the folder is just a central place to store them. And of course you can still have multiple files in there.

I mean, there is a theoretical possibility to create more than one ItemRepositoryRegistry per session - hence the possibility to have more than the "0" folder in said place. The proposed refactoring will eliminate such a possibility, and there will be only one possible ItemRepositoryRegistry per session (the one accessible through globalItemRepositoryRegistry()).

While this seems safe as nobody creates ItemRepositoryRegistries by hand, I just want to confirm this.


- Ivan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/106945/#review22929
-----------------------------------------------------------


On Oct. 29, 2012, 2:19 p.m., Ivan Shapovalov wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/106945/
> -----------------------------------------------------------
> 
> (Updated Oct. 29, 2012, 2:19 p.m.)
> 
> 
> Review request for KDevelop and Milian Wolff.
> 
> 
> Description
> -------
> 
> 1. Clean (rmdir) the per-session duchain store on session removal (particularly useful in unit-tests and their temporary sessions).
> 2. Partially refactor allocateRepository() (separate cache path compution into a different function, fix formatting, handle lockfiles properly)
> 
> Don't know if I've done that properly, but I wanted to avoid mentioning ".cache/kdevduchain" in two unrelated places.
> 
> 
> Diffs
> -----
> 
>   language/duchain/repositories/itemrepository.h 392847c 
>   language/duchain/repositories/itemrepository.cpp 8d559cf 
>   shell/session.cpp a59d70e 
> 
> Diff: http://git.reviewboard.kde.org/r/106945/diff/
> 
> 
> Testing
> -------
> 
> Existing unit-tests and manual testing.
> 
> 
> Thanks,
> 
> Ivan Shapovalov
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20121203/dbd6dc6c/attachment.html>


More information about the KDevelop-devel mailing list