1,883 questions
Tooling
1
vote
0
replies
32
views
What extension/CLI to use to detect circular dependencies on .svelte files with VSCode
I'm working with Svelte 4, using VSCode, and I need to find a way to detect circular dependencies in my project.
I'm on a monorepo (with npm workspaces) and struggling to make it work with ESLint. ...
0
votes
3
answers
148
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
{
...
1
vote
0
answers
100
views
cycling dependency with TypeORM
I have two abstract classes with mutual dependencies to represent versionable entities :
The version class :
import type { VersionableEntity } from './versionable.entity.js';
export abstract class ...
9
votes
2
answers
595
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 ...
2
votes
1
answer
88
views
how to manage jotai atoms effectively to prevent circular dependency when using joati on frontend, with react-query?
I am trying to create a sort of complex react/jotai game with a next.js frontend server router connected to an express/node.js backend server.
I keep getting circular dependency issues.
I tried using ...
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
39
views
NestJS: After adding a new module and injecting services from other modules, application stopped working
I'm building a backend application using NestJS, and everything was working smoothly. Recently, I added a new module and attempted to use services from existing modules within it. However, after ...
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: ...
2
votes
4
answers
157
views
Recursive query to figure out record which creates circular dependency
I have a postgress table incoming_records which contains 2 column supervisor_id, emp_id
create table incoming_records(supervisor_id,emp_id)as values
(null,01) --top level resources with blank ...
0
votes
0
answers
24
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 ...
1
vote
1
answer
71
views
Solve circular dependency by "overloading" modules in Angular
I am developing part of an application where we have some custom built generic components. One of these component is a GenericForm which we use for easily creating forms, and another component is ...
3
votes
0
answers
129
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
60
views
Class extends value undefined is not a constructor or null - circular dependency
When I am triying to generate migrations I get this error
Error during migration generation:
Error: Unable to open file: "/home/angel/Contenedores/nestjs/plantilla/src/database/config/typeorm....
0
votes
0
answers
24
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 ...
-1
votes
2
answers
178
views
How to avoid circular dependency in our Vue.js Project?
My project is created using Vue, Vite and Pinia.
I used options api for communication in my project.
I want to know the tips that I should follow to never face this problem so that I can always use it ...
0
votes
1
answer
255
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
71
views
Premake circular dependency of a project on itself
I am trying to create a build system that a static library and an app, where app inherits from the static library.
It works fine but I see in console. Circular dependency Core <- Core and Circular ...
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
0
answers
106
views
mecab-python3 AWS lambda "circular import" error
GOAL - to create a custom AWS lambda layer for mecab-python3.
TRIED:
local pip to zip and upload via S3 (using python3.11/3.12/3.13)
docker container approach outlined below
FROM amazonlinux:2023
...
0
votes
3
answers
188
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
2
answers
60
views
How to label correctly circular barplot in R
I tried to make a circular plot (group some countries) but the labels are not on the country's values. They are displayed randomly.
Used this data
data used
library(tidyverse)
data <- read_xls(&...
1
vote
1
answer
197
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 ...
2
votes
0
answers
94
views
In Dash can I update an output value but disable further updates from that change?
I have two inputs, and an output. Both inputs, when changed, affect the output.
When the user types a value in one input, I want the value in the other to be cleared...but to NOT invoke the follow-on ...
-1
votes
1
answer
146
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 ...
0
votes
2
answers
166
views
Is this why a project can fail to compile if two headers include each other?
I'm trying to understand why two mutually included headers (each header including the other) doesn't work the way you might expect. I was wondering if my reasoning is correct:
If you have FooHeader.h:
...
1
vote
2
answers
92
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;
...
2
votes
2
answers
399
views
Circular dependency while injecting JPA repository to implementation
I was studying Spring Data JPA recently, and I faced a weird circular dependency error.
Previously, I often used MyBatis as shown below.
// I often declare mapper first, and inject it to my ...
0
votes
3
answers
145
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
2
answers
130
views
Circular definition with struct and function in C [duplicate]
I have these two simplified files:
lexer.h
#ifndef LEXER_H
#define LEXER_H
#include "expand_array.h"
// Union to store token value
typedef union {
//Problem is here bcs of circular ...
1
vote
1
answer
67
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 ...
7
votes
2
answers
2k
views
Handling Circular Imports in Pydantic models with FastAPI
I'm developing a FastAPI application organized with the following module structure.
...
│ ├── modules
│ │ ├── box
│ │ │ ├── routes.py
│ │ │ ├── services.py
│ │ │ ├── models.py #...
1
vote
2
answers
832
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
0
answers
40
views
How to solve a case of circular imports with referencing dataclasses and default_factory?
I'm writing a Python package in which there are a lot of units (classes, functions...) that are referencing each other. I face problems with circular imports.
How to solve something like that:
a.py:
...
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
...
0
votes
2
answers
135
views
How do I resolve this ReferenceError: Cannot access 'authSlice' before initialization?
I have a problem using React together with Redux, the problem is this:
I'm getting an error:
ReferenceError: Cannot access 'authSlice' before initialization
I think the problem is that I have a ...
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 ...
1
vote
1
answer
148
views
Circular dependency in Mono Repo
I have the following circular dependency problem
There is a monorepo let's say "Main_Repo" (on gitlab).
One of the applications within "Main_Repo" is a fast api application (let's ...
0
votes
0
answers
43
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 ...
0
votes
2
answers
64
views
is there a solution for importing functions from files without happened a circular import?
iam making project on python and I make like 5 files + the mine.
one of these 5 files its shared files all the other files import from it functions.
but
the problem is that the shared file need to ...
1
vote
3
answers
631
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 ...
1
vote
1
answer
95
views
Why does Python implement cyclic GC on types that reference non-container types
Checking docs:
Supporting Cyclic Garbage Collection
Python’s support for detecting and collecting garbage which involves circular references requires support from object types which are “containers” ...
0
votes
0
answers
39
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
76
views
How to avoid circular dependency with composite pattern
I'm trying to build custom filtering using expression trees and I came across circular dependency issue.
I have the following interfaces implemented:
public interface IFilterExpressionProvider
{
...
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 = { ...
-2
votes
1
answer
55
views
Circular motion finding points on the route
I need help, have been racking my brain for two days without success
I have a plane that is given several parameters: starting point (x,y), speed in a straight line (it is constant), the starting ...
1
vote
0
answers
148
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, ...
0
votes
1
answer
100
views
Resolving cyclic dependencies in class definitions [duplicate]
For my small program, I need a class representing a node in an undirected graph. It looks like this:
#ifndef DIRECTED_GRAPH_NODE_H
#define DIRECTED_GRAPH_NODE_H
#include <cstdlib>
#include <...
1
vote
1
answer
182
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
0
answers
71
views
How can I structure my Python package/submodules so I do not get a circular import error?
Before marking as duplicate to this one, please look at the details of my layout. I've gone through and this question does not address my issue and I haven't been able to adapt the answer:
...
1
vote
1
answer
402
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 ...