Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: module spec mis-match on Android (new Architecture) #237

Conversation

alanleedev
Copy link
Contributor

@alanleedev alanleedev commented Apr 18, 2024

Overview

I get the following build error on Android with new architecture enabled.
Created a test app using the guide here: https://gist.github.com/cipolleschi/82b7a9561b8861330efabbd3eb08c6f5#file-test-your-library-against-react-native-0-74-0-rcs-md
RN version: 0.74.0-rc.9

/src/ClipboardTest/node_modules/@react-native-clipboard/clipboard/android/src/main/java/com/reactnativecommunity/clipboard/ClipboardModule.java:39: error: ClipboardModule is not abstract and does not override abstract method removeListeners(int) in NativeClipboardModuleSpec
public class ClipboardModule extends NativeClipboardModuleSpec {
       ^
/src/ClipboardTest/node_modules/@react-native-clipboard/clipboard/android/src/main/java/com/reactnativecommunity/clipboard/ClipboardModule.java:240: error: method does not override or implement a method from a supertype
  @Override
  ^

This is due to mismatch with JS Spec in NativeClipboardModule.ts:
removeListeners(count: Int32): void;

Where as NativeClipboardModuleSpec.java defines as public abstract void removeListeners(float count);

==> Update float to int so both legacy and new architecture is using the same type defined in the spec.

Test Plan

Created a test app using the guide here: https://gist.github.com/cipolleschi/82b7a9561b8861330efabbd3eb08c6f5#file-test-your-library-against-react-native-0-74-0-rcs-md

@alanleedev alanleedev changed the title fix module spec mis-match on Android fix: module spec mis-match on Android Apr 18, 2024
@alanleedev alanleedev changed the title fix: module spec mis-match on Android fix: module spec mis-match on Android (new Architecture) Apr 19, 2024
@alanleedev
Copy link
Contributor Author

@Naturalclar Could you review this PR? It is needed to support new architecture.
Java spec for legacy architecture does not match the auto generated spec on new architecture.

Copy link
Member

@Naturalclar Naturalclar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for the fix!

@Naturalclar Naturalclar merged commit 16e1f15 into react-native-clipboard:master Apr 22, 2024
github-merge-queue bot referenced this pull request in valora-inc/wallet Apr 30, 2024
…14.1 (#5371)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@react-native-clipboard/clipboard](https://togithub.com/react-native-clipboard/clipboard)
| [`^1.13.2` ->
`^1.14.1`](https://renovatebot.com/diffs/npm/@react-native-clipboard%2fclipboard/1.13.2/1.14.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@react-native-clipboard%2fclipboard/1.14.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@react-native-clipboard%2fclipboard/1.14.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@react-native-clipboard%2fclipboard/1.13.2/1.14.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@react-native-clipboard%2fclipboard/1.13.2/1.14.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>react-native-clipboard/clipboard
(@&#8203;react-native-clipboard/clipboard)</summary>

###
[`v1.14.1`](https://togithub.com/react-native-clipboard/clipboard/releases/tag/v1.14.1)

[Compare
Source](https://togithub.com/react-native-clipboard/clipboard/compare/v1.14.0...v1.14.1)

#### What's Changed

- add missing `getEnforcing` jest mock by
[@&#8203;siddarthkay](https://togithub.com/siddarthkay) in
[https://github.com/react-native-clipboard/clipboard/pull/220](https://togithub.com/react-native-clipboard/clipboard/pull/220)
- Use Yarn 4 by [@&#8203;Saadnajmi](https://togithub.com/Saadnajmi) in
[https://github.com/react-native-clipboard/clipboard/pull/230](https://togithub.com/react-native-clipboard/clipboard/pull/230)
- fix: eslint config by
[@&#8203;Naturalclar](https://togithub.com/Naturalclar) in
[https://github.com/react-native-clipboard/clipboard/pull/232](https://togithub.com/react-native-clipboard/clipboard/pull/232)
- fix: android ci by
[@&#8203;Naturalclar](https://togithub.com/Naturalclar) in
[https://github.com/react-native-clipboard/clipboard/pull/233](https://togithub.com/react-native-clipboard/clipboard/pull/233)
- Update React Native minimum version supported, fix test app
autolinking by [@&#8203;Saadnajmi](https://togithub.com/Saadnajmi) in
[https://github.com/react-native-clipboard/clipboard/pull/235](https://togithub.com/react-native-clipboard/clipboard/pull/235)
- fix: module spec mis-match on Android (new Architecture) by
[@&#8203;alanleedev](https://togithub.com/alanleedev) in
[https://github.com/react-native-clipboard/clipboard/pull/237](https://togithub.com/react-native-clipboard/clipboard/pull/237)

#### New Contributors

- [@&#8203;siddarthkay](https://togithub.com/siddarthkay) made their
first contribution in
[https://github.com/react-native-clipboard/clipboard/pull/220](https://togithub.com/react-native-clipboard/clipboard/pull/220)
- [@&#8203;alanleedev](https://togithub.com/alanleedev) made their first
contribution in
[https://github.com/react-native-clipboard/clipboard/pull/237](https://togithub.com/react-native-clipboard/clipboard/pull/237)

**Full Changelog**:
react-native-clipboard/clipboard@v1.14.0...v1.14.1

###
[`v1.14.0`](https://togithub.com/react-native-clipboard/clipboard/compare/v1.13.2...v1.14.0)

[Compare
Source](https://togithub.com/react-native-clipboard/clipboard/compare/v1.13.2...v1.14.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 5pm,every weekend" in timezone
America/Los_Angeles, Automerge - "after 5pm,every weekend" in timezone
America/Los_Angeles.

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/valora-inc/wallet).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMjEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjMyMS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJucG0iLCJyZW5vdmF0ZSJdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: valora-bot <valorabot@valoraapp.com>
github-merge-queue bot referenced this pull request in valora-inc/wallet Apr 30, 2024
…14.1 (#5371)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@react-native-clipboard/clipboard](https://togithub.com/react-native-clipboard/clipboard)
| [`^1.13.2` ->
`^1.14.1`](https://renovatebot.com/diffs/npm/@react-native-clipboard%2fclipboard/1.13.2/1.14.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@react-native-clipboard%2fclipboard/1.14.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@react-native-clipboard%2fclipboard/1.14.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@react-native-clipboard%2fclipboard/1.13.2/1.14.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@react-native-clipboard%2fclipboard/1.13.2/1.14.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>react-native-clipboard/clipboard
(@&#8203;react-native-clipboard/clipboard)</summary>

###
[`v1.14.1`](https://togithub.com/react-native-clipboard/clipboard/releases/tag/v1.14.1)

[Compare
Source](https://togithub.com/react-native-clipboard/clipboard/compare/v1.14.0...v1.14.1)

#### What's Changed

- add missing `getEnforcing` jest mock by
[@&#8203;siddarthkay](https://togithub.com/siddarthkay) in
[https://github.com/react-native-clipboard/clipboard/pull/220](https://togithub.com/react-native-clipboard/clipboard/pull/220)
- Use Yarn 4 by [@&#8203;Saadnajmi](https://togithub.com/Saadnajmi) in
[https://github.com/react-native-clipboard/clipboard/pull/230](https://togithub.com/react-native-clipboard/clipboard/pull/230)
- fix: eslint config by
[@&#8203;Naturalclar](https://togithub.com/Naturalclar) in
[https://github.com/react-native-clipboard/clipboard/pull/232](https://togithub.com/react-native-clipboard/clipboard/pull/232)
- fix: android ci by
[@&#8203;Naturalclar](https://togithub.com/Naturalclar) in
[https://github.com/react-native-clipboard/clipboard/pull/233](https://togithub.com/react-native-clipboard/clipboard/pull/233)
- Update React Native minimum version supported, fix test app
autolinking by [@&#8203;Saadnajmi](https://togithub.com/Saadnajmi) in
[https://github.com/react-native-clipboard/clipboard/pull/235](https://togithub.com/react-native-clipboard/clipboard/pull/235)
- fix: module spec mis-match on Android (new Architecture) by
[@&#8203;alanleedev](https://togithub.com/alanleedev) in
[https://github.com/react-native-clipboard/clipboard/pull/237](https://togithub.com/react-native-clipboard/clipboard/pull/237)

#### New Contributors

- [@&#8203;siddarthkay](https://togithub.com/siddarthkay) made their
first contribution in
[https://github.com/react-native-clipboard/clipboard/pull/220](https://togithub.com/react-native-clipboard/clipboard/pull/220)
- [@&#8203;alanleedev](https://togithub.com/alanleedev) made their first
contribution in
[https://github.com/react-native-clipboard/clipboard/pull/237](https://togithub.com/react-native-clipboard/clipboard/pull/237)

**Full Changelog**:
react-native-clipboard/clipboard@v1.14.0...v1.14.1

###
[`v1.14.0`](https://togithub.com/react-native-clipboard/clipboard/compare/v1.13.2...v1.14.0)

[Compare
Source](https://togithub.com/react-native-clipboard/clipboard/compare/v1.13.2...v1.14.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 5pm,every weekend" in timezone
America/Los_Angeles, Automerge - "after 5pm,every weekend" in timezone
America/Los_Angeles.

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/valora-inc/wallet).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMjEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjMyMS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJucG0iLCJyZW5vdmF0ZSJdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: valora-bot <valorabot@valoraapp.com>
github-merge-queue bot referenced this pull request in valora-inc/wallet Apr 30, 2024
…14.1 (#5371)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@react-native-clipboard/clipboard](https://togithub.com/react-native-clipboard/clipboard)
| [`^1.13.2` ->
`^1.14.1`](https://renovatebot.com/diffs/npm/@react-native-clipboard%2fclipboard/1.13.2/1.14.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@react-native-clipboard%2fclipboard/1.14.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@react-native-clipboard%2fclipboard/1.14.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@react-native-clipboard%2fclipboard/1.13.2/1.14.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@react-native-clipboard%2fclipboard/1.13.2/1.14.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>react-native-clipboard/clipboard
(@&#8203;react-native-clipboard/clipboard)</summary>

###
[`v1.14.1`](https://togithub.com/react-native-clipboard/clipboard/releases/tag/v1.14.1)

[Compare
Source](https://togithub.com/react-native-clipboard/clipboard/compare/v1.14.0...v1.14.1)

#### What's Changed

- add missing `getEnforcing` jest mock by
[@&#8203;siddarthkay](https://togithub.com/siddarthkay) in
[https://github.com/react-native-clipboard/clipboard/pull/220](https://togithub.com/react-native-clipboard/clipboard/pull/220)
- Use Yarn 4 by [@&#8203;Saadnajmi](https://togithub.com/Saadnajmi) in
[https://github.com/react-native-clipboard/clipboard/pull/230](https://togithub.com/react-native-clipboard/clipboard/pull/230)
- fix: eslint config by
[@&#8203;Naturalclar](https://togithub.com/Naturalclar) in
[https://github.com/react-native-clipboard/clipboard/pull/232](https://togithub.com/react-native-clipboard/clipboard/pull/232)
- fix: android ci by
[@&#8203;Naturalclar](https://togithub.com/Naturalclar) in
[https://github.com/react-native-clipboard/clipboard/pull/233](https://togithub.com/react-native-clipboard/clipboard/pull/233)
- Update React Native minimum version supported, fix test app
autolinking by [@&#8203;Saadnajmi](https://togithub.com/Saadnajmi) in
[https://github.com/react-native-clipboard/clipboard/pull/235](https://togithub.com/react-native-clipboard/clipboard/pull/235)
- fix: module spec mis-match on Android (new Architecture) by
[@&#8203;alanleedev](https://togithub.com/alanleedev) in
[https://github.com/react-native-clipboard/clipboard/pull/237](https://togithub.com/react-native-clipboard/clipboard/pull/237)

#### New Contributors

- [@&#8203;siddarthkay](https://togithub.com/siddarthkay) made their
first contribution in
[https://github.com/react-native-clipboard/clipboard/pull/220](https://togithub.com/react-native-clipboard/clipboard/pull/220)
- [@&#8203;alanleedev](https://togithub.com/alanleedev) made their first
contribution in
[https://github.com/react-native-clipboard/clipboard/pull/237](https://togithub.com/react-native-clipboard/clipboard/pull/237)

**Full Changelog**:
react-native-clipboard/clipboard@v1.14.0...v1.14.1

###
[`v1.14.0`](https://togithub.com/react-native-clipboard/clipboard/compare/v1.13.2...v1.14.0)

[Compare
Source](https://togithub.com/react-native-clipboard/clipboard/compare/v1.13.2...v1.14.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 5pm,every weekend" in timezone
America/Los_Angeles, Automerge - "after 5pm,every weekend" in timezone
America/Los_Angeles.

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/valora-inc/wallet).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMjEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjMyMS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJucG0iLCJyZW5vdmF0ZSJdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: valora-bot <valorabot@valoraapp.com>
shottah referenced this pull request in zed-io/kolektivo May 15, 2024
…14.1 (valora-inc#5371)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@react-native-clipboard/clipboard](https://togithub.com/react-native-clipboard/clipboard)
| [`^1.13.2` ->
`^1.14.1`](https://renovatebot.com/diffs/npm/@react-native-clipboard%2fclipboard/1.13.2/1.14.1)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@react-native-clipboard%2fclipboard/1.14.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@react-native-clipboard%2fclipboard/1.14.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@react-native-clipboard%2fclipboard/1.13.2/1.14.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@react-native-clipboard%2fclipboard/1.13.2/1.14.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>react-native-clipboard/clipboard
(@&#8203;react-native-clipboard/clipboard)</summary>

###
[`v1.14.1`](https://togithub.com/react-native-clipboard/clipboard/releases/tag/v1.14.1)

[Compare
Source](https://togithub.com/react-native-clipboard/clipboard/compare/v1.14.0...v1.14.1)

#### What's Changed

- add missing `getEnforcing` jest mock by
[@&#8203;siddarthkay](https://togithub.com/siddarthkay) in
[https://github.com/react-native-clipboard/clipboard/pull/220](https://togithub.com/react-native-clipboard/clipboard/pull/220)
- Use Yarn 4 by [@&#8203;Saadnajmi](https://togithub.com/Saadnajmi) in
[https://github.com/react-native-clipboard/clipboard/pull/230](https://togithub.com/react-native-clipboard/clipboard/pull/230)
- fix: eslint config by
[@&#8203;Naturalclar](https://togithub.com/Naturalclar) in
[https://github.com/react-native-clipboard/clipboard/pull/232](https://togithub.com/react-native-clipboard/clipboard/pull/232)
- fix: android ci by
[@&#8203;Naturalclar](https://togithub.com/Naturalclar) in
[https://github.com/react-native-clipboard/clipboard/pull/233](https://togithub.com/react-native-clipboard/clipboard/pull/233)
- Update React Native minimum version supported, fix test app
autolinking by [@&#8203;Saadnajmi](https://togithub.com/Saadnajmi) in
[https://github.com/react-native-clipboard/clipboard/pull/235](https://togithub.com/react-native-clipboard/clipboard/pull/235)
- fix: module spec mis-match on Android (new Architecture) by
[@&#8203;alanleedev](https://togithub.com/alanleedev) in
[https://github.com/react-native-clipboard/clipboard/pull/237](https://togithub.com/react-native-clipboard/clipboard/pull/237)

#### New Contributors

- [@&#8203;siddarthkay](https://togithub.com/siddarthkay) made their
first contribution in
[https://github.com/react-native-clipboard/clipboard/pull/220](https://togithub.com/react-native-clipboard/clipboard/pull/220)
- [@&#8203;alanleedev](https://togithub.com/alanleedev) made their first
contribution in
[https://github.com/react-native-clipboard/clipboard/pull/237](https://togithub.com/react-native-clipboard/clipboard/pull/237)

**Full Changelog**:
react-native-clipboard/clipboard@v1.14.0...v1.14.1

###
[`v1.14.0`](https://togithub.com/react-native-clipboard/clipboard/compare/v1.13.2...v1.14.0)

[Compare
Source](https://togithub.com/react-native-clipboard/clipboard/compare/v1.13.2...v1.14.0)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "after 5pm,every weekend" in timezone
America/Los_Angeles, Automerge - "after 5pm,every weekend" in timezone
America/Los_Angeles.

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/valora-inc/wallet).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zMjEuMiIsInVwZGF0ZWRJblZlciI6IjM3LjMyMS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJucG0iLCJyZW5vdmF0ZSJdfQ==-->

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: valora-bot <valorabot@valoraapp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants