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

Ivan Shapovalov intelfx100 at gmail.com
Thu Nov 29 14:54:54 UTC 2012


> On Nov. 26, 2012, 9:08 p.m., Milian Wolff wrote:
> > language/duchain/repositories/itemrepository.cpp, line 89
> > <http://git.reviewboard.kde.org/r/106945/diff/2/?file=92822#file92822line89>
> >
> >     this unrelated cleanup should go into a separate commit and review.
> >     
> >     Also, what exactly do you try to achieve by refactoring the code? Personally I think the whole mess should be refactored quite more drastically, considering that a session is required. Since the session has its own locking mechanism (which is much better than what we have here) I think we should just assume that when we have a session uuid, we can blindly allocate the DUchain cache for that uuid.
> >     
> >     This will require a change to the cache path though as it does not contain the app name so far.
> >     
> >     If you *really* want to work on this, then fine but in a separate commit.

Do you mean dropping the itemrepository locks altogether? Sounds very reasonable, but then we automatically lose numbered subdirectories (as then there would be no way to tell which ones are used, and which are not), and so possibility to allocate multiple repositories will be gone; the only one will be the global one.

So, have I understood you correctly? :)


- Ivan


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


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/20121129/9f10fe41/attachment.html>


More information about the KDevelop-devel mailing list