Cyclic Dependency occurs when objects form an infinite recurring dependency graph. The head points to the tail and the tail points to the head.
Questions tagged [cyclic-dependency]
123 questions
6
votes
1 answer
Angular 6 enters infinite loop of cyclic dependency when I inject a service that uses HttpClient inside my HttpInterceptor class
I have found this issue many times in different Angular versions but multiple sources say it is already fixed, for example, another similar question on Stackoverflow is having this answer which says that it was solved in Angular 5.2 , some other…

Ahmed Elkoussy
- 8,162
- 10
- 60
- 85
6
votes
1 answer
How to use SBT for interdependent projects in different configurations
I would like to have the following SBT build setup:
object MyBuild extends Build {
lazy val core = Project("core", file("core"))
.dependsOn(testkit % "test")
lazy val testkit = Project("testkit", file("testkit"))
.dependsOn(core %…

orrsella
- 307
- 1
- 2
- 7
5
votes
2 answers
C# : xml serialization of nodes with cyclic links
I have a class Node something like this :
class Node {
IEnumerable inputs;
}
Which basicly defines a simple graph.
I want to serialize my graph to a human-readable form, so normally I'd say xml would be the way to go.
But XML wasn't made…

Pygmy
- 1,268
- 17
- 33
5
votes
0 answers
How to preserve native cyclic list structure during transformations in Haskell?
I'm studying graph-like things handling in Haskell using 'tying the knot' technique. I suppose, cyclic lists is just kind of infinite list internal implementation, so in ideal world one should not care about subj. But it can have dramatic effect on…

Alexey Birukov
- 1,565
- 15
- 22
5
votes
1 answer
Cyclic dependency analysis for Java 8 - for use in an automated build
I'll working on a project that is using JDepend to automatically generate a report of cyclic package dependencies as part of our CI build. (I am mainly interested in package level dependencies, so I've been using a cut down version of the XSLT to…

Paul
- 3,009
- 16
- 33
5
votes
2 answers
CMake cyclic dependency error when a custom library name is the same as a system library
I'm writing a CMakeLists.txt file to build a C++ project of mine, which is composed of
libhybris.so: A shared library with some exported functions.
hybris: An executable which links to libhybris.so
A set of various shared libraries which links to…

Simone Margaritelli
- 4,584
- 10
- 45
- 70
5
votes
2 answers
How do I handle recursion in a custom PyYAML constructor?
PyYAML can handle cyclic graphs in regular python objects. For example:
Snippet #1.
class Node: pass
a = Node()
b = Node()
a.child = b
b.child = a
# We now have the cycle a->b->a
serialized_object = yaml.dump(a)
object =…

Travis Wilson
- 949
- 9
- 19
5
votes
1 answer
Guice inject single instance into multiple objects without using @Singleton
I was reading the Guice documentation, and came across a section labeled Eliminate the Cycle (Recommended) which peaked my interest because it's exactly the issue that led me to the documentation today.
Basically, to eliminate cyclic dependencies,…

crush
- 16,713
- 9
- 59
- 100
4
votes
1 answer
Find cyclic dependency without using graph in Map of array
I have an object like following:
var myMap = {
v1: ['v2', 'v4', 'v5'],
v2: ['x', 'v4', 'y'],
v3: ['v2', 'v4', 'v5'],
v4: ['e', 'v1', 'v5'],
v5: ['v2', 'v4', 'v3'],
};
I have to find map of entities cyclic without converting it…

Akhilesh Kumar
- 9,085
- 13
- 57
- 95
4
votes
0 answers
Load all parent routes dynamically in angular when app is bootstraped or loaded
I am using angular 2 to build an application where I need to check the base href and match it with my predefined sets of parent routes in my app.routes.ts file.
Currently I have created a hard-coded array of parentRoutes = ['login', 'signup',…

Antara Datta
- 1,909
- 2
- 12
- 16
4
votes
0 answers
how can I resolve circular dependency between variadic templates in c++?
I'm practicing template programming in C++, trying to implement some kind of parser library for educational purposes using only templates.
an example of how my library is supposed to be used is :
std::stringstream ss { "identif1er 123123 hell0…

alter
- 333
- 4
- 14
4
votes
1 answer
Breaking cyclic dependency in Dagger
I am very new to dagger--I don't even know yet if it will work for my application
I have a search page that returns the latest news about a given celebrity.
I have written a test to verify that results appear on the page when we search for a popular…

michaelsnowden
- 6,031
- 2
- 38
- 83
4
votes
1 answer
Solve cyclic dependencies in haskell data records
Imagine I want to write an application which deals with podcast feeds. To store the parsed information from such a feed, I would write something like this:
data Podcast = Podcast {
podcastTitle :: String, -- ^ title of podcast
episodes ::…

Stephan Kulla
- 4,739
- 3
- 26
- 35
3
votes
1 answer
Upgrading to springboot 2.6.7 leads to cyclic dependency
I am upgrading my prooject from springboot 2.4.4 to 2.6.7 but in the newer version I am getting this runtime error due to cyclic dependency:
***************************
APPLICATION FAILED TO START
***************************
Description:
The…

rishav
- 441
- 9
- 27
3
votes
3 answers
C++20 Modules “cyclic dependency”
Im trying to include a module within another module, but i can't compile due to the following error:
"Cannot build the following source files because there is a cyclic dependency between them: Module1.ixx depends on Module2.ixx depends on…

Pedro Duarte
- 71
- 7