circular-dependency Questions
1
Summary
TLDR: How to avoid circular import errors when a base class returns a subclass instance in an importable module?
I have collected some solutions from other locations/questions (see A-D, bel...
Lewak asked 1/2, 2022 at 11:40
5
Solved
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 imp...
Riancho asked 15/10, 2014 at 9:28
16
Solved
I've been working with nodejs lately and still getting to grips with the module system, so apologies if this is an obvious question. I want code roughly like the below:
a.js (the main file run with...
Pulcheria asked 3/6, 2012 at 9:42
11
I created 2 dummy projects in my application and named them BAL and DAL. When I build them, they build successfully. If I add a reference to BAL to the DAL project, it added nicely. But while addin...
Pluperfect asked 17/8, 2011 at 13:46
2
@Configuration
public class Test1 {
@Autowired
private Test3 test3;
}
@Configuration
public class Test2 {
@Autowired
private Test3 test3;
@Bean(name = "test3 ")
Test3 test3 () {
return ...
Alton asked 7/3, 2018 at 9:37
4
I have two files, node.py and path.py, which define two classes, Node and Path, respectively.
Up to today, the definition for Path referenced the Node object, and therefore I had done
from node.p...
Baileybailie asked 21/5, 2009 at 20:8
3
Solved
I am fairly new to javascript and am currently learning to implement a graphQL API with a MongoDB backend using Node.js. I am running into a problem with a circular dependency between two types.
B...
Indisposed asked 1/3, 2017 at 12:8
10
I have a circular dependency between two functions. I would like each of these functions to reside in its own dll. Is it possible to build this with visual studio?
foo(int i)
{
if (i > 0)
bar...
Suhail asked 12/12, 2008 at 13:59
5
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 th...
Sokil asked 24/11, 2017 at 3:56
3
Solved
How can i use a typing in typescript that does not run into circular dependency errors?
It seems that the circular dependency error occurs, even though the imports should be removed when the code c...
Genoa asked 16/4, 2020 at 20:5
2
I'm loading classes using a custom class loader. For the most part, everything works, but sometimes when I load particularly complex projects/libraries, I get a strange bug:
Exception in thread "m...
Unintelligent asked 30/5, 2011 at 18:20
1
Solved
I'm trying to have two different objects that refer to each other and also use type checking on the attributes. When I do this I get Circular module loading detected trying to precompile. Googling ...
Wilmerwilmette asked 9/6, 2021 at 23:52
1
I'm using Angular 9 and I would like my builds to to fail whenever the circular dependency is detected in the build target.
When I was using Angular 6 and below, I was just adding a Circular Depend...
Evanne asked 26/9, 2020 at 15:31
1
In a React-Native project using NPM, is there a quick way to identify Dependency cycle problems (aka when lint gives out an error of "cycle dependency detected"?
I am looking for somethin...
Descartes asked 12/12, 2020 at 2:39
3
Solved
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 dep...
Lyle asked 24/7, 2019 at 2:41
1
Solved
In other languages (like Python, Go, C#, etc.), circular imports are an issue and the program doesn't run. However, Dart seems to get around this issue and different Dart files can import each othe...
Cayenne asked 16/12, 2020 at 13:43
4
Solved
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 proj...
Ridge asked 26/6, 2016 at 19:1
6
Solved
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 { Mon...
Exercise asked 4/2, 2021 at 16:34
4
Solved
I'm working on a Go project for a month. The good thing is Go is really highly efficient. But after a month of development I've already got thousands lines of code and many packages. To avoid impor...
Parasite asked 23/4, 2013 at 11:49
16
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:
fr...
Opossum asked 12/2, 2012 at 20:49
2
I am developing a Flask application. It is still relatively small. I had only one app.py file, but because I needed to do database migrations, I divided it into 3 using this guide:
https://realpyt...
Xenos asked 28/3, 2017 at 18:49
3
Solved
having some problems, di/circular-references I'm sure I'm doing wrong, I just can't see it.
Any help would be much appreciated
user.module.ts
@Module({
imports: [
TypeOrmModule.forFeature([Use...
Ell asked 5/8, 2018 at 8:59
1
I have 3 gradle modules in my 'clean architecture' Android application: 'data', 'domain' and 'presentation'. 'data' and 'presentation' both depend on 'domain', but not each other.
'presentation' ho...
Tomchay asked 26/7, 2016 at 18:27
3
Solved
I have a graph of multi-level dependecies like this, and I need to detect any circular reference in this graph.
A = B
B = C
C = [D, B]
D = [C, A]
Somebody have a problem like this?
Any soluti...
Digitalize asked 28/8, 2009 at 14:55
7
Solved
Let's say I have the following directory structure:
a\
__init__.py
b\
__init__.py
c\
__init__.py
c_file.py
d\
__init__.py
d_file.py
In the a package's __init__.py, the c package i...
Hackneyed asked 12/10, 2009 at 19:19
© 2022 - 2024 — McMap. All rights reserved.