[
https://issues.apache.org/jira/browse/CB-11174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15265061#comment-15265061
]
ASF GitHub Bot commented on CB-11174:
-------------------------------------
Github user stevengill commented on the pull request:
https://github.com/apache/cordova-lib/pull/433#issuecomment-215922979
LGTM
> cordova platformApi cache isn't dealing correctly with symlinked project dirs
> -----------------------------------------------------------------------------
>
> Key: CB-11174
> URL: https://issues.apache.org/jira/browse/CB-11174
> Project: Apache Cordova
> Issue Type: Bug
> Components: CordovaLib
> Affects Versions: 6.1.1
> Reporter: Vladimir Kotikov
> Assignee: Vladimir Kotikov
>
> When project dir is inside of symlinked directory (say {{/var}} on OS X),
> {{getPlatformApi}} method in cordova-lib doesn't resolve real path before
> dealing with cache and uses provided path as-is. This causes returning two
> separate instances of {{PlatformApi}} class when {{getPlatformApi}} is first
> called with symlinked path and then with real one, despite of the fact that
> both paths are pointing to the same project.
> In the real life this issue causes the following 'npm test' failures for
> cordova-lib on OS X, caused by mocking methods for one PlatformApi instance
> and using another one:
> {noformat}
> 1) plugin end-to-end should not run prepare after plugin
> installation/removal if platform return non-falsy value
> Message:
> Expected spy preparePlatforms not to have been called.
> Stacktrace:
> Error: Expected spy preparePlatforms not to have been called.
> at
> /Users/csantana23/Documents/dev/cordova/cordova-lib/cordova-lib/spec-cordova/plugin.spec.js:175:50
> at _fulfilled
> (/Users/csantana23/Documents/dev/cordova/cordova-lib/cordova-lib/node_modules/q/q.js:787:54)
> at self.promiseDispatch.done
> (/Users/csantana23/Documents/dev/cordova/cordova-lib/cordova-lib/node_modules/q/q.js:816:30)
> at Promise.promise.promiseDispatch
> (/Users/csantana23/Documents/dev/cordova/cordova-lib/cordova-lib/node_modules/q/q.js:749:13)
> at
> /Users/csantana23/Documents/dev/cordova/cordova-lib/cordova-lib/node_modules/q/q.js:557:44
> at flush
> (/Users/csantana23/Documents/dev/cordova/cordova-lib/cordova-lib/node_modules/q/q.js:108:17)
> at nextTickCallbackWith0Args (node.js:419:9)
> at process._tickCallback (node.js:348:13)
>
> 2) plugin end-to-end should not run prepare after plugin
> installation/removal if platform return non-falsy value
> Message:
> Expected spy preparePlatforms not to have been called.
> Stacktrace:
> Error: Expected spy preparePlatforms not to have been called.
> at
> /Users/csantana23/Documents/dev/cordova/cordova-lib/cordova-lib/spec-cordova/plugin.spec.js:179:50
> at _fulfilled
> (/Users/csantana23/Documents/dev/cordova/cordova-lib/cordova-lib/node_modules/q/q.js:787:54)
> at self.promiseDispatch.done
> (/Users/csantana23/Documents/dev/cordova/cordova-lib/cordova-lib/node_modules/q/q.js:816:30)
> at Promise.promise.promiseDispatch
> (/Users/csantana23/Documents/dev/cordova/cordova-lib/cordova-lib/node_modules/q/q.js:749:13)
> at
> /Users/csantana23/Documents/dev/cordova/cordova-lib/cordova-lib/node_modules/q/q.js:557:44
> at flush
> (/Users/csantana23/Documents/dev/cordova/cordova-lib/cordova-lib/node_modules/q/q.js:108:17)
> at nextTickCallbackWith0Args (node.js:419:9)
> at process._tickCallback (node.js:348:13)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]