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 no multiple installations assertion on Android #2174

Merged
merged 10 commits into from
Aug 25, 2022

Conversation

kkafar
Copy link
Member

@kkafar kkafar commented Aug 18, 2022

Description

Previous implementation had flaws:

  1. It crashed when visiting symlink
  2. It did not take Example applications into consideration -- there may be nested react-native-gesture-handler directories inside dependencies. Consider FabricTestExample in react-native-screens. In its package.json it has react-native-screens defined as link:../ -> following error occurs:
Conflict between: 
- /Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/react-native-screens/TestsExample/node_modules/react-native-gesture-handler
- /Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/react-native-screens/Example/node_modules/react-native-gesture-handler
- /Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/react-native-screens/TVOSExample/node_modules/react-native-gesture-handler
- /Users/kacperkafara/workspace/swm/kkafar@screens/FabricTestExample/node_modules/react-native-gesture-handler

This PR resolves both issues:

  1. Crashing on symlink is resolved with filtering the files before executing operations on them (we expect package.json to not be a symlink)
  2. Added possibility to specify assertNoMultipleInstallations property in gradle.properties of root project.

Note that this property is shared with react-native-reanimated - so if someone sets disableMultipleInstancesCheck=true the assertion won't run for neither react-native-reanimated nor react-native-gesture-handler.

Test plan

@kkafar kkafar force-pushed the @kkafar/fix-build-gradle branch from eb02b18 to 044208c Compare August 18, 2022 13:57
@kkafar kkafar changed the base branch from @kkafar/fix-grep-in-podspec to main August 18, 2022 13:57
@kkafar kkafar marked this pull request as ready for review August 23, 2022 09:49
@j-piasecki j-piasecki merged commit a914aa0 into main Aug 25, 2022
@j-piasecki j-piasecki deleted the @kkafar/fix-build-gradle branch August 25, 2022 12:09
piaskowyk pushed a commit to software-mansion/react-native-reanimated that referenced this pull request Sep 9, 2022
)

## Description

See:
software-mansion/react-native-gesture-handler#2174

## Changes

Fixed crashing on symlinks with filtering files before executing
operations on them, added property `disableMultipleInstancesCheck `
(possible to specify in `gradle.properties` of **rootProject**) which
allow application to disable the feature.

Note that this property is shared with `react-native-gesture-handler` -
so if someone sets `disableMultipleInstancesCheck=true` the assertion
won't run for neither `react-native-reanimated` nor
`react-native-gesture-handler`.

## Test code and steps to reproduce

Works fine on `TestsExample` application in `react-native-screens`
repository.

## Checklist

- [ ] Included code example that can be used to test this change
- [ ] Updated TS types
- [ ] Added TS types tests
- [ ] Added unit / integration tests
- [ ] Updated documentation
- [ ] Ensured that CI passes

Co-authored-by: Jakub Piasecki <[email protected]>
piaskowyk pushed a commit to software-mansion/react-native-reanimated that referenced this pull request Oct 6, 2022
)

See:
software-mansion/react-native-gesture-handler#2174

Fixed crashing on symlinks with filtering files before executing
operations on them, added property `disableMultipleInstancesCheck `
(possible to specify in `gradle.properties` of **rootProject**) which
allow application to disable the feature.

Note that this property is shared with `react-native-gesture-handler` -
so if someone sets `disableMultipleInstancesCheck=true` the assertion
won't run for neither `react-native-reanimated` nor
`react-native-gesture-handler`.

Works fine on `TestsExample` application in `react-native-screens`
repository.

- [ ] Included code example that can be used to test this change
- [ ] Updated TS types
- [ ] Added TS types tests
- [ ] Added unit / integration tests
- [ ] Updated documentation
- [ ] Ensured that CI passes

Co-authored-by: Jakub Piasecki <[email protected]>
fluiddot pushed a commit to wordpress-mobile/react-native-reanimated that referenced this pull request Jun 5, 2023
…ftware-mansion#3493)

## Description

See:
software-mansion/react-native-gesture-handler#2174

## Changes

Fixed crashing on symlinks with filtering files before executing
operations on them, added property `disableMultipleInstancesCheck `
(possible to specify in `gradle.properties` of **rootProject**) which
allow application to disable the feature.

Note that this property is shared with `react-native-gesture-handler` -
so if someone sets `disableMultipleInstancesCheck=true` the assertion
won't run for neither `react-native-reanimated` nor
`react-native-gesture-handler`.

## Test code and steps to reproduce

Works fine on `TestsExample` application in `react-native-screens`
repository.

## Checklist

- [ ] Included code example that can be used to test this change
- [ ] Updated TS types
- [ ] Added TS types tests
- [ ] Added unit / integration tests
- [ ] Updated documentation
- [ ] Ensured that CI passes

Co-authored-by: Jakub Piasecki <[email protected]>
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