circular-dependency

Angular 2 : Circular Feature module dependency

我的梦境 提交于 2019-12-01 02:09:25
问题 I am currently working on one of application of Angular2. I have 3 feature modules in it which contains other sub feature modules. I want to load Sub feature module of Feature 1 into Sub Feature module of Feature 2 and vice a versa. below is sample code. action-routing.module.ts const routes: Routes = [ { path: '', component: ActionComponent, children: [ { path: ':id', loadChildren: 'app/action/action-detail/action-detail.module#ActionDetailModule' } ] } ]; action-detail-routing.module.ts

sqlalchemy.exc.CircularDependencyError: Circular dependency detected

坚强是说给别人听的谎言 提交于 2019-11-30 23:27:33
问题 The business logic - One Category may have multiple (1:M) attributes, like Category "Memory" could have attributes Speed, Size, Type etc. at the same time one Category could be sorted by the attribute value (this is stored inside Category.sortByAttribute - which is foreign key to LookupCategoryAttributes table. Trying to construct it via SQLAlchemy, but getting circular dependency detected. What is wrong? class Attribute(Base): __tablename__ = "LookupCategoryAttributes" types = ["date",

CDI injection loop

三世轮回 提交于 2019-11-30 21:48:00
I'm running into a issue with CDI Injection into a Weld container in JBoss 7.1.1 I've got the following object model : @Stateless class ServiceEjb { @Inject A a; } class A { @Inject B b; } class B { @Inject A a; } When trying to inject A or B in my stateless class, injection loop and crash with a javax.enterprise.inject.CreationException. I try many thing (scoping, @Singleton on A or B but without success). I don't want to break the code, and those injections makes senses. Any clues will be greatly appreciated. Nick Circular dependency injection is not required by the CDI standard , unless at

Circular Dependencies in modules using requireJs

风流意气都作罢 提交于 2019-11-30 18:46:08
Reading the requireJs documentation, in order to fix the Circular Dependencies, is suggested to use exports to create an empty object for the module that is available immediately for reference by other modules. I try this code but it seems to do not work. What is wrong? P.S.: read the comments for seeing the output, especially the B module inside setTimeout call. // A module define([ 'b' ], function (b) { console.log('B:', b); // B, Object var A = { boo: 1 }; return A; }); // B module define([ 'a', 'exports' ], function (a, exports) { console.log('A:', a); // A, undefined (as I was expecting)

CDI injection loop

被刻印的时光 ゝ 提交于 2019-11-30 17:13:14
问题 I'm running into a issue with CDI Injection into a Weld container in JBoss 7.1.1 I've got the following object model : @Stateless class ServiceEjb { @Inject A a; } class A { @Inject B b; } class B { @Inject A a; } When trying to inject A or B in my stateless class, injection loop and crash with a javax.enterprise.inject.CreationException. I try many thing (scoping, @Singleton on A or B but without success). I don't want to break the code, and those injections makes senses. Any clues will be

Two classes and inline functions

╄→гoц情女王★ 提交于 2019-11-30 15:56:57
问题 I have two classes and both of them uses some of the other class, on example: // class1.h class Class1; #include "class2.h" class Class1 { public: static Class2 *C2; ... }; // class2.h class Class2; #include "class1.h" class Class2 { public: static Class1 *C1; ... }; And when I define it like in example above, it works (I also have some #ifndef to avoid infinite header recurency). But I also want to add some inline functions to my classes. And I read here that I should put definition of

Detecting circular imports

情到浓时终转凉″ 提交于 2019-11-30 11:27:46
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 course, when I add the circular import, I'm unaware of it. Sometimes it's pretty obvious I've made a circular import when I get an error like AttributeError: 'module' object has no attribute 'attribute' where I clearly defined 'attribute' . But other times, the code doesn't throw exceptions because of the way it's used. So, to my question: Is it possible to programmatically detect when and where a

Is this a Circular dependency?

柔情痞子 提交于 2019-11-30 09:15:11
is this code a example of circular dependency? package expr; import sheet.Sheet public class AdressExpr implements Expr { private Address address; private Sheet sheet; public double value(Sheet sheet) { return sheet.value(address); } } public interface Expr { public double value(Sheet sheet); } public class Adress { // omissions } package sheet; import expr.Address; import expr.Expr; public class Sheet implements SuperSheet { private Map <Address, Expr> map; public double value(Address address) { return map.get(Address).value(this); } } public interface SuperSheet { public double value(Address

Circular Dependency Solution

一曲冷凌霜 提交于 2019-11-30 08:36:19
Our current project has ran into a circular dependency issue. Our business logic assembly is using classes and static methods from our SharedLibrary assembly. The SharedLibrary contains a whole bunch of helper functions, such as a SQL Reader class, Enumerators, Global Variables, Error Handling, Logging and Validation. The SharedLibrary needs access to the Business objects, but the Business objects need access to SharedLibrary. The old developers solved this obvious code smell by replicating the functionality of the business objects in the shared library (very anti-DRY). I've spent a day now

Circular Dependencies / Incomplete Types

一个人想着一个人 提交于 2019-11-30 06:02:51
问题 In C++, I have a problem with circular dependencies / incomplete types. The situation is as follows: Stuffcollection.h #include "Spritesheet.h"; class Stuffcollection { public: void myfunc (Spritesheet *spritesheet); void myfuncTwo (); }; Stuffcollection.cpp void Stuffcollection::myfunc(Spritesheet *spritesheet) { unsigned int myvar = 5 * spritesheet->spritevar; } void myfunc2() { // } Spritesheet.h #include "Stuffcollection.h" class Spritesheet { public: void init(); }; Spritesheet.cpp void