Hey Luke,

It would be interesting to see why A.1 and B.1 depend on each other. If 
there are e.g. FK constraints pointing to models in the other app the 
autodetector should end up with e.g. A.1 <-- B.1 <-- B.2 <-- A.2 (or 
optimized A.1 <-- B.1 <-- A.2), in which case you wouldn't end up with a 
cycle. C.1 would then depend on B.2 (B.1 respectively in the optimized 
graph).

/Markus

On Tuesday, November 25, 2014 4:49:22 PM UTC+1, Luke Plant wrote:
>
>
> I came across a bug with an infinite loop in migration dependency 
> searching code. This is fixed here: 
>
>
> https://github.com/django/django/commit/ff3d746e8d8e8fbe6de287bd0f4c3a9fa23c18dc
>  
>
> (another person reviewing it would be good, though I think it is correct). 
>
> My question is, should we backport this to 1.7.x? For me, the bug 
> manifested itself with migrations that were automatically created by 
> Django itself, in a project with apps A, B, and C: 
>
> App B depends on app A 
> App A depends on app B (it didn't initially, but does now) 
> App C depends on one/both of them. 
>
> After doing makemigrations for A and B, makemigrations for C then went 
> into an infinite loop. 
>
> So this is not a really obscure case, and could affect a fair number of 
> people attempting to upgrade to Django 1.7, as I was. 
>
> Regards, 
>
> Luke 
>
>
> -- 
> "We may not return the affection of those who like us, but we 
> always respect their good judgement." -- Libbie Fudim 
>
> Luke Plant || http://lukeplant.me.uk/ 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/5e547550-1002-4a6b-82f0-a8dc7e3ed2b0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to