You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Jake Degiovanni (JIRA)" <ji...@apache.org> on 2018/01/03 18:03:02 UTC

[jira] [Updated] (CB-13725) Circular module dependency

     [ https://issues.apache.org/jira/browse/CB-13725?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jake Degiovanni updated CB-13725:
---------------------------------
    Environment: 
h4. +Target OS Affected+
* Blackberry10
* Seemingly every other platform that has not been updated to the PlatformAPI (in this scenario every platform marked deprecated)

h4. +Cordova Version+
* 7.1.0

h4. +Host Operating System+
* Ubuntu Xenial docker container running on Windows 10
* Ubuntu 14.04 LTS

h4. +NodeJS Version+
* v6.10.2 LTS
* v8.9.4 LTS

  was:
+Target OS Affected+
* Blackberry10
* Seemingly every other platform that has not been updated to the PlatformAPI (in this scenario every platform marked deprecated)

+Cordova Version+
* 7.1.0

+Host Operating System+
* Ubuntu Xenial docker container running on Windows 10
* Ubuntu 14.04 LTS

+NodeJS Version+
* v6.10.2 LTS
* v8.9.4 LTS


> Circular module dependency
> --------------------------
>
>                 Key: CB-13725
>                 URL: https://issues.apache.org/jira/browse/CB-13725
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-lib
>    Affects Versions: 7.0.0
>         Environment: h4. +Target OS Affected+
> * Blackberry10
> * Seemingly every other platform that has not been updated to the PlatformAPI (in this scenario every platform marked deprecated)
> h4. +Cordova Version+
> * 7.1.0
> h4. +Host Operating System+
> * Ubuntu Xenial docker container running on Windows 10
> * Ubuntu 14.04 LTS
> h4. +NodeJS Version+
> * v6.10.2 LTS
> * v8.9.4 LTS
>            Reporter: Jake Degiovanni
>              Labels: blackberry10, bug, question, ubuntu
>             Fix For: 7.0.0
>
>
> There is a circular dependency within the util.js file (src/cordova/util.js) and the platforms.js file (src/platforms/platforms.js).
> This circular dependency causes the platforms variable to equal an empty JavaScript object ({}); as a result when within the getPlatformApiFunction the else condition !platforms[platform] on line 498 is always trigerred causing deprecated platforms to always fail upon attempted addition to the project.
> This bug also seems to affect the hostSupports function on line 94.
> Can someone more versed in this components inner workings confirm if this is indeed a bug? I would be happy to attempt a fix if it is but would need to discuss my idea for a potential fix with a more experienced dev first to ensure I don't break hidden dependencies.
> Potential fix:
> On line 30 change var platforms = require('../platforms/platforms'); to var platforms = require('../platforms/platformsConfig.json');



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org