You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "erisu (via GitHub)" <gi...@apache.org> on 2024/11/13 01:54:40 UTC
[PR] fix: remove pollOnce from NativeToJsMessageQueue.popAndEncodeAsJs [cordova-android]
erisu opened a new pull request, #1746:
URL: https://github.com/apache/cordova-android/pull/1746
<!--
Please make sure the checklist boxes are all checked before submitting the PR. The checklist is intended as a quick reference, for complete details please see our Contributor Guidelines:
http://cordova.apache.org/contribute/contribute_guidelines.html
Thanks!
-->
### Motivation and Context
<!-- Why is this change required? What problem does it solve? -->
<!-- If it fixes an open issue, please link to the issue here. -->
Remove the require block for `cordova/plugin/android/polling`, a module that doesn't exist.
Resolves #1735
### Description
<!-- Describe your changes in detail -->
The `cordova/plugin/android/polling` module appears to have been removed since 2012.
The last known version of Cordova-JS where this module existed was **[cordova-js@2.1.0 - polling.js](https://github.com/apache/cordova-js/blob/2.1.0/lib/android/plugin/android/polling.js)** in the `polling.js` file, with the version tag created on Sep 13, 2012.
The module was removed in `cordova-js@2.2.0rc1`, a tag/release created on Oct 16, 2012.
The **[exact commit](https://github.com/apache/cordova-js/commit/01a2683adffd6198f6d28344b1d2c87ba98023b7)** that removed the module from Cordova-JS does not have an associated PR, GitHub issue, or CB ticket to explain the reason for this change.
Additionally, the platform-specific Cordova-JS modules, which reside in the `cordova-js-src` directory of this repository ([originally labeled as `platform_modules`](https://github.com/apache/cordova-android/commit/828edb3a439ace4ecd169ee8e87a93418fc623b9)), were not created until 2015—2 years and 4 months later. This directory has also never contained the polling module as far as I can see.
Since this part of the code has not been functional since 2012, I believe it is safe to remove it.
### Testing
<!-- Please describe in detail how you tested your changes. -->
n/a
### Checklist
- [ ] I've run the tests to see all new and existing tests pass
- [ ] I added automated test coverage as appropriate for this change
- [ ] Commit is prefixed with `(platform)` if this change only applies to one platform (e.g. `(android)`)
- [x] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct [keyword to close issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/))
- [ ] I've updated the documentation if necessary
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix: remove pollOnce from NativeToJsMessageQueue.popAndEncodeAsJs [cordova-android]
Posted by "erisu (via GitHub)" <gi...@apache.org>.
erisu closed pull request #1746: fix: remove pollOnce from NativeToJsMessageQueue.popAndEncodeAsJs
URL: https://github.com/apache/cordova-android/pull/1746
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix: remove pollOnce from NativeToJsMessageQueue.popAndEncodeAsJs [cordova-android]
Posted by "dpogue (via GitHub)" <gi...@apache.org>.
dpogue commented on PR #1746:
URL: https://github.com/apache/cordova-android/pull/1746#issuecomment-2472211966
I believe the polling implementation was brought into the main exec file, and still exists here: https://github.com/apache/cordova-android/blob/5a2c50d1ed67c1cdad0d12f1b6fbbd04ab55dff6/cordova-js-src/exec.js#L120-L132
I don't know whether that means we should be calling it from Java or not... clearly this has been broken for a long while
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix: remove pollOnce from NativeToJsMessageQueue.popAndEncodeAsJs [cordova-android]
Posted by "erisu (via GitHub)" <gi...@apache.org>.
erisu commented on PR #1746:
URL: https://github.com/apache/cordova-android/pull/1746#issuecomment-2472306721
> I believe the polling implementation was brought into the main exec file, and still exists here:
>
> https://github.com/apache/cordova-android/blob/5a2c50d1ed67c1cdad0d12f1b6fbbd04ab55dff6/cordova-js-src/exec.js#L120-L132
>
> I don't know whether that means we should be calling it from Java or not... clearly this has been broken for a long while
Might be able to expose that method by added it to `androidExec`:
```javascript
androidExec.pollOnce = pollOnce;
```
Then instead of deleting the line, update it to:
```java
if (!willSendAllMessages) {
sb.append("window.setTimeout(function(){cordova.require('cordova/exec').pollOnce();},0);");
}
```
But I don't know what the behavior it will have after adding a pollOnce call to something that never ran for 12 years...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org
Re: [PR] fix: remove pollOnce from NativeToJsMessageQueue.popAndEncodeAsJs [cordova-android]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #1746:
URL: https://github.com/apache/cordova-android/pull/1746#issuecomment-2617782821
## [Codecov](https://app.codecov.io/gh/apache/cordova-android/pull/1746?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 72.45%. Comparing base [(`b623311`)](https://app.codecov.io/gh/apache/cordova-android/commit/b623311efa2a809bff9dbf96897fcef097dc2d71?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`9a21426`)](https://app.codecov.io/gh/apache/cordova-android/commit/9a2142657d3cae6dedd529b33e5d3abe5068bab5?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #1746 +/- ##
==========================================
- Coverage 72.50% 72.45% -0.06%
==========================================
Files 23 23
Lines 1837 1837
==========================================
- Hits 1332 1331 -1
- Misses 505 506 +1
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/cordova-android/pull/1746?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org