Results 1 to 8 of 8

Thread: [WRN] C1009: Circular reference in requirements chain

  1. #1

    Default [WRN] C1009: Circular reference in requirements chain

    CMD 5.1.2.52, ExtJS 4.2.0.663

    When I'm building my app I frequently see the warning for "Circular reference in requirements chain."
    I can hunt and peck through my Application.js requires and my various other classes for a duplicate requires statement, but it is hardly ever obvious which requires statement is causing the issue. Is there a better way (more verbose) to debug this? As well, I may fix one issue, but this will then just warn on the next. Is there any way to get all "circular reference" warnings printed out at once. Also, is this an issue I have to fix? Thanks.

    Code:
    [WRN] C1009: Circular reference in requirements chain (
    /Users/projects/myApp/ext/src/app/Application.js ->
    /Users/projects/myApp/app/Application.js:44 [ClassRequire] ->
    /Users/projects/myApp/app/view/myView.js ->
    /Users/projects/myApp/app/Application.js
    ) -- unknown-file:-1
    [INF] writing content to /Users/projects/myApp/bootstrap.js

  2. #2
    Sencha User
    Join Date
    Feb 2013
    Location
    California
    Posts
    11,985

    Default

    It might not be a duplicate requires, rather two classes requiring each other.

  3. #3

    Default

    Not typically what I am seeing, however I'm still looking for ways to get more insight out of these warnings.

  4. #4
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379

    Default

    What is /Users/projects/myApp/app/view/myView.js and /Users/projects/myApp/app/Application.js requiring?
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  5. #5

    Default

    Those were dummy examples. I can share this example:
    Code:
    [WRN] C1009: Circular reference in requirements chain (
    \ext\src\app\Application.js ->
    \app\Application.js:95 [ClassRequire] ->
    \app\controller\MapOnClickController.js ->
    \app\Application.js
    ) -- unknown-file:-1
    Application.js requires MapOnClickController (plus various other requires), MapOnClickController has various requires, none that are Application.js.

    I can comment out MapOnClickController and move on to the next Circular reference from the build
    Code:
    \app\Application.js:100 [ClassRequire] ->
    \app\controller\DesignController.js ->
    \app\Application.js
    DesignController has no requires. It has a couple of mixins but those have no requires.

  6. #6
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379

    Default

    Is there any code in MapOnClickController that would refer to the application. Something like MyApp.Application?
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  7. #7

    Default

    None. It's very basic:
    Code:
       singleton : true,
        config : {
        },
        constructor : function (config) {
            this.initConfig(config);
        },
    
        requires : [someOtherControllers],
    
        mapOnClick : function (evt) {
          if(something){
            otherController.doSomething();
          } else {
            otherController.doSomethingElse();
          }
       }

  8. #8
    Sencha User
    Join Date
    May 2015
    Posts
    7

    Default

    I've been searching for answers to problems like this for days. Did you figure out what was causing this?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •