<div dir="ltr">Agreed! The next step I think is to move ( add ) caching from C4::Context into Koha::Config::SysPrefs thus removing all dependency on those C4::Context subs. After that we begin replacing the use of C4::Context->preference with Koha::Config::SysPrefs. Does that make sense? I wonder if we can implement Koha::Cache for syspref caching now. I'm not up to date with it's state.<div><br></div><div>Kyle</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><a href="http://www.kylehall.info" target="_blank">http://www.kylehall.info</a><br>ByWater Solutions ( <a href="http://bywatersolutions.com" target="_blank">http://bywatersolutions.com</a> )<br>Meadville Public Library ( <a href="http://www.meadvillelibrary.org" target="_blank">http://www.meadvillelibrary.org</a> )<br>Crawford County Federated Library System ( <a href="http://www.ccfls.org" target="_blank">http://www.ccfls.org</a> )<br>Mill Run Technology Solutions ( <a href="http://millruntech.com" target="_blank">http://millruntech.com</a> )<br></div></div>
<br><div class="gmail_quote">On Wed, Jun 10, 2015 at 10:23 AM, Tomas Cohen Arazi <span dir="ltr"><<a href="mailto:tomascohen@gmail.com" target="_blank">tomascohen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I think the natural next step is to just remove set_preference and preference from C4::Context.</div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">2015-06-10 11:17 GMT-03:00 Fridolin SOMERS <span dir="ltr"><<a href="mailto:fridolin.somers@biblibre.com" target="_blank">fridolin.somers@biblibre.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I noticed the use of Koha::Config::SysPrefs in C4::Context introduces circual dependences :(<br>
C4::Context > Koha::Config::SysPrefs > Koha::Database > C4::Context<br>
<br>
You confirme ?<br>
<br>
Maybe we should create a new module C4::Config with all methods not directly linked to the context.<br>
<br>
Regards<br>
<br>
Le 04/06/2015 19:13, Tomas Cohen Arazi a écrit :<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I've just pushed bug 13967 [1]. It introduces a new package<br>
(Koha::Config::SysPrefs) that heavily relies on DBIx::Class to deal with<br>
the required CRUD for system preferences.<br>
<br>
It should be no surprise that the first widespread use of DBIx on Koha's<br>
codebase raises problems. Widespread means every call to anything is using<br>
it :-D.<br>
<br>
The point: it noticeably broke lots of our t/db_dependent/ tests. A first<br>
guess would point to the package itself. But such doesn't seem to be the<br>
case. It is highlighting an underlaying problem in how we deal with the DB:<br>
the errors are related to nested transactions taking place, so I would<br>
point to our (abuse?) of $dbh->{AutoCommit} = 0 on the tests.<br>
<br>
Actually, if you pick any db_dependent test that is currently failing on<br>
master and set the AutoCommit = 1 you will notice the tests work as<br>
expected (with the side effect of altering the DB of course).<br>
<br>
So, this is a call for all of you, whenever you find some time, to try to<br>
figure what's going on and possible solutions to this. I ain't no DBIx<br>
expert and will be doing my best but really need your help.<br>
<br>
Before someone says it: reverting the commits will put us back to the<br>
previous state, of course. But it will just hide the problem for a while.<br>
<br>
[1] <a href="http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13967" target="_blank">http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13967</a><br>
<br>
<br>
<br>
_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" target="_blank">http://bugs.koha-community.org/</a><br>
<br><span><font color="#888888">
</font></span></blockquote><span><font color="#888888">
<br>
-- <br>
Fridolin SOMERS<br>
Biblibre - Pôles support et système<br>
<a href="mailto:fridolin.somers@biblibre.com" target="_blank">fridolin.somers@biblibre.com</a><br>
_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org" target="_blank">Koha-devel@lists.koha-community.org</a><br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" target="_blank">http://bugs.koha-community.org/</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div></div></div><span class="">-- <br><div><div dir="ltr"><div>Tomás Cohen Arazi</div><div>Prosecretaría de Informática</div><div>Universidad Nacional de Córdoba</div><div>✆ <a href="tel:%2B54%20351%205353750%20ext%2013168" value="+543515353750" target="_blank">+54 351 5353750 ext 13168</a></div><div>GPG: B76C 6E7C 2D80 551A C765  E225 0A27 2EA1 B2F3 C15F</div></div></div>
</span></div>
<br>_______________________________________________<br>
Koha-devel mailing list<br>
<a href="mailto:Koha-devel@lists.koha-community.org">Koha-devel@lists.koha-community.org</a><br>
<a href="http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel" rel="noreferrer" target="_blank">http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel</a><br>
website : <a href="http://www.koha-community.org/" rel="noreferrer" target="_blank">http://www.koha-community.org/</a><br>
git : <a href="http://git.koha-community.org/" rel="noreferrer" target="_blank">http://git.koha-community.org/</a><br>
bugs : <a href="http://bugs.koha-community.org/" rel="noreferrer" target="_blank">http://bugs.koha-community.org/</a><br></blockquote></div><br></div>