cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jake Degiovanni (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CB-13725) Circular module dependency
Date Wed, 03 Jan 2018 18:01:10 GMT
Jake Degiovanni created CB-13725:
------------------------------------

             Summary: 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: +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
            Reporter: Jake Degiovanni
             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


Mime
View raw message