Skip to main content
Filter by
Sorted by
Tagged with
766 votes
16 answers
1.2m views

I have some code spread across multiple files that try to import from each other, as follows: main.py: from entity import Ent entity.py: from physics import Physics class Ent: ... physics.py: ...
jsells's user avatar
  • 7,669
494 votes
12 answers
334k views

I often find myself in a situation where I am facing multiple compilation/linker errors in a C++ project due to some bad design decisions (made by someone else :) ) which lead to circular dependencies ...
Sandeep Datta's user avatar
220 votes
3 answers
238k views

I know the issue of circular imports in python has come up many times before and I have read these discussions. The comment that is made repeatedly in these discussions is that a circular import is a ...
BWW's user avatar
  • 2,319
161 votes
8 answers
207k views

I'm getting this error Traceback (most recent call last): File "/Users/alex/dev/runswift/utils/sim2014/simulator.py", line 3, in <module> from world import World File "/...
CpILL's user avatar
  • 7,209
97 votes
7 answers
97k views

Let's say I have the following directory structure: a\ __init__.py b\ __init__.py c\ __init__.py c_file.py d\ __init__.py ...
Ram Rachum's user avatar
  • 89.5k
73 votes
3 answers
31k views

Is there a way to see how libraries in my Flutter package depend on each other? Under libraries, I mean internal libraries, dart files under 'lib'. Also, it would be great to check for circular ...
polina-c's user avatar
  • 7,195
54 votes
8 answers
96k views

I have three classes: GameEvents, Physics and GameObject. I have headers for each of them. GameEvents has one Physics and a list of GameObjects. Physics has a list of GameObjects. Note the circular ...
Orujimaru's user avatar
  • 845
51 votes
4 answers
88k views

How can we resolve a Maven cyclic dependency? Suppose A is the parent project and B and C are child projects. If B is dependent on C and C is dependent on B, is there any way to resolve the cyclic ...
user2367460's user avatar
46 votes
5 answers
87k views

I have the following classes. public class B { public A a; public B() { a= new A(); System.out.println("Creating B"); } } and public class A { public B b; ...
athena's user avatar
  • 5,749
45 votes
8 answers
40k views

When are circular references acceptable in database? Theoretical and practical, any help is appreciated.
yli's user avatar
  • 2,799
42 votes
7 answers
22k views

What is a good way of dealing with objects and having them talk to each other? Up until now all my games hobby/student have been small so this problem was generally solved in a rather ugly way, which ...
user avatar
39 votes
7 answers
19k views

I'm trying to run down a memory leak in a windows forms application. I'm looking now at a form which contains several embedded forms. What worries me is that the child forms, in their constructor, ...
GWLlosa's user avatar
  • 24.6k
39 votes
3 answers
23k views

We have a code base broken up into static libraries. Unfortunately, the libraries have circular dependencies; e.g., libfoo.a depends on libbar.a and vice-versa. I know the "correct" way to handle ...
Nemo's user avatar
  • 71.9k
34 votes
5 answers
119k views

https://github.com/angular/angular-cli/pull/6813 Added warnings for circular dependencies, and I know I can turn off all warnings using "showCircularDependencies": false. But I would rather keep the ...
Dulitha Ranatunga's user avatar
29 votes
4 answers
23k views

I'm working with a project that contains about 30 unique modules. It wasn't designed too well, so it's common that I create circular imports when adding some new functionality to the project. Of ...
Ponkadoodle's user avatar
  • 5,987
28 votes
5 answers
10k views

I have a Django app that uses Celery to offload some tasks. Mainly, it defers the computation of some fields in a database table. So, I have a tasks.py: from models import MyModel from celery import ...
Chinmay Kanchi's user avatar
28 votes
5 answers
40k views

I would love to use a schema that looks something like the following in FastAPI: from __future__ import annotations from typing import List from pydantic import BaseModel class Project(BaseModel): ...
Nils Ziehn's user avatar
  • 4,341
26 votes
4 answers
122k views

Scenario I have a solution on which I have (more than) 2 projects. The first project has a project reference to the second project. The second project doesn't have a reference to the first project. ...
ElektroStudios's user avatar
25 votes
3 answers
35k views

I want my ApplicationContext constructor to have the UserManager as a parameter, but I am having trouble with dependency injection. Code: public class ApplicationContext : IdentityDbContext<...
rory's user avatar
  • 1,458
25 votes
6 answers
21k views

I was trying to run mongoDB on node server Full Code here from MongoDB: My mongo version: 4.4.3 Node version: v15.7.0 I've imported get started code from MongoDB, and here's the code: const { ...
Thirumalai vasan's user avatar
24 votes
5 answers
6k views

I am currently struggling with a circular dependency problem when designing my classes. Ever since I read about the Anemic Domain Model (something I was doing all the time), I have really been ...
Ben J's user avatar
  • 5,881
22 votes
2 answers
4k views

I have 2 generic classes, a BaseComponent Class, and a BaseManager class. They're both abstract and are intended to be made concrete. public abstract class BaseManager<T> where T : ...
George Duckett's user avatar
20 votes
9 answers
78k views

I am faced with a problem that gives me this error: A circular reference has been detected when serializing the object of class "App\Entity\User" (configured limit: 1) I have an Enterprise ...
eronn's user avatar
  • 1,860
20 votes
5 answers
19k views

Ok I have two modules, each containing a class, the problem is their classes reference each other. Lets say for example I had a room module and a person module containing CRoom and CPerson. The ...
Fire Lancer's user avatar
  • 30.3k
20 votes
1 answer
7k views

I'm using Flask with Blueprints to get a skeleton for my website and I'm having a problem using configuration classes deep in my application. Here's some dummy code that explains how I've set ...
Karl Moodh's user avatar
  • 2,721

1
2 3 4 5
38