1,882 questions
0
votes
3
answers
141
views
Resolving a circular/recursive dependency with dependency injection
Say I have this interface:
public interface IExample
{
string GetSupportedExtension();
void DoWork(Stream input);
}
a concrete implementation like:
public class PdfExample : IExample
{
...
9
votes
2
answers
586
views
How can I flatten a circular dependency using C++20 modules?
My game engine in C++ using modules from C++20. class A contains unique_ptr of class B, class B contains regular pointer to class A and unique_ptr to class C, and this structure continues for 4 levels ...
0
votes
1
answer
46
views
Circular dependency between modules returns undefined even with forwardRef()
I'm new to NestJS and currently facing a circular dependency issue between two modules: InvoicesModule and TransactionsModule.
Both modules depend on each other, so I tried resolving it using ...
0
votes
0
answers
60
views
Bug related with circular imports using Flask
So i have some flask code, two files affected one is flask_app.py and the other one is routes.py. The error thrown were ranging from
Error running WSGI application
2025-03-16 23:05:30,980: ...
0
votes
0
answers
21
views
Circular view path [error]: would dispatch back to the current handler URL [/error] again. Check your ViewResolver setup! springboot
jakarta.servlet.ServletException: Circular view path [error]: would dispatch back to the current handler URL [/error] again. Check your ViewResolver setup! (Hint: This may be the result of an ...
3
votes
0
answers
126
views
onModuleInit Not Executing Due to Circular Dependency in NestJS with forwardRef()
I'm facing an issue in my NestJS application where the onModuleInit lifecycle hook is not being executed in one of my services (JobsService) when a circular dependency is involved.
Specifically:
...
0
votes
0
answers
20
views
Flask app DB module avoiding circular import
I'm trying to avoid circular import at my Flask app (based on oracledb), but get "RuntimeError: Database pool not initialized". How can I properly handle the DB pool creation (create without ...
0
votes
1
answer
244
views
What is the best practice for avoiding (or handling) circular dependency in NestJS when needed for table relationships?
I'm working on building an API for a small hackathon project. It will be a platform for teachers to share lesson plans for students.
I created my first table, Subject, to store lesson subjects like ...
1
vote
1
answer
59
views
Circular dependency Error in /turbo_modules/@angular/[email protected]/bundles/compiler.umd.js (2845:21) Can't resolve all parameters for BService: (?)
A-Service.component.ts
` import { Injectable, Inject } from '@angular/core';
import { BService } from './BService';
@Injectable({
providedIn: 'root',
})
export class AService {
constructor(...
0
votes
3
answers
181
views
Cyclic dependencies between interfaces
Cyclic dependencies between classes are often a sign of design problems (here are some explanations - https://stackoverflow.com/a/43023401/17547033).
But I would like to understand what problems a ...
1
vote
1
answer
189
views
Nest can't resolve dependencies while all seems right
I was working on a large-scale project where I encountered a (circular?) dependency issue that seemed impossible to resolve, even though all dependencies were properly managed according to NestJS ...
-1
votes
1
answer
139
views
AWS API Gateway Circular Dependence using Stage Variables for Lambda Integration with Terraform
I've got a working API Gateway with a hardcoded Lambda integration deployed using terraform. I want to replace the hardcoded Lambda ARN in the integration with a stage variable, which will open the ...
1
vote
2
answers
88
views
how to get rid of circular dependencies in C
I'm new to C and I'm stuck on this problem. In C# doing something like this is perfectly ok but in C the compiler works different and it needs to know the type definitions before hand.
struct FN;
...
0
votes
3
answers
144
views
Circular dependency on TransactionManager Bean in Spring Batch
I'm working on a Spring Batch project and I have a StackOverflowError with this Bean.
@Bean
@Primary
public JtaTransactionManager transactionManager(UserTransaction userTransaction,
...
1
vote
1
answer
65
views
Is there a way to solution this circular import in Python?
I'm making a simple discord bot for a friend and college, just for fun. The bot is an assistant for playing role games. I'm having a circular import problem. Any clues on how to solve it?
The code in ...
1
vote
2
answers
816
views
Circular Import Issue with FastAPI and Pydantic Models
I'm developing an application using FastAPI and Pydantic, and I'm encountering a circular import issue when trying to define my data models.
Here are the relevant files:
src/schemas/user.py
from ...
1
vote
2
answers
92
views
File compilation order in C with circular dependency
/*
* structs.h
*
* Created on: 14 Jun 2019
*/
#ifndef STRUCTS_H_
#define STRUCTS_H_
#include <stdint.h>
#include "line_mask.h"
#define CONFIG_LINE_NUM 80
...
1
vote
0
answers
28
views
Python: circular definitions between classes? [duplicate]
I want to create two classes (Spectrogram and TimeWindow) which should recall one another, but I'm not sure about my definitions. I first define Spectrogram and then TimeWindow afterwards. The logic ...
0
votes
0
answers
39
views
Python circular import fix does not work - what is the solution?
I faced the dreaded circular import issue when doing some simple research. I tried the "import " solution but doesn't seem to work. What is the solution to make it work?
Example code (all 3 ...
1
vote
3
answers
617
views
Circular dependency in NestJS
I have a module within NestJS where I need services to include each other. So, I have a circular dependency. According to NestJS documentation, I used @ForwardRef:
but running the project still ended ...
0
votes
0
answers
34
views
Excel previous result formulas to Power BI
K L M N
17 Date Daily Start Goal Daily Billed hrs Daily End Outcome
18 7/1/2024
19 7/2/2024 5.45 3.90 ...
0
votes
0
answers
44
views
How to handle circular references in TypeScript when serializing objects to include `$ref` annotations
I have an object structure where circular references need to be represented using $ref annotations in the output.
Here is an example of the input and expected output :-
Input is -
const obj2 = { ...
1
vote
0
answers
144
views
How to avoid pydantic cyclic reference when expanding relationship
when trying to facilitate expand function to a FastAPI endpoint using relationships get a "cyclic reference" error.
when the user defines expand=parents, we expand only the first layer, ...
1
vote
1
answer
181
views
I have an issue with a circular default in TypeScript that I don't know how to solve
I want to define types the following way:
export type SequenceNode<
T extends ComponentSequenceNode = ComponentSequenceNode,
U extends ContainerSequenceNode = ContainerSequenceNode
> = T | U;...
1
vote
1
answer
399
views
Apache camel version upgrade 3.20.3 to 4.4.2 - Circular dependency issue arises
We are trying to update java,camel,boot version upgrade respectively as below, but getting below exception while running Junit test cases not tried deploying into server so far. Maven Clean install is ...