Skip to content

Conversation

@simka
Copy link
Contributor

@simka simka commented Aug 7, 2019

Summary:

Previous implementation made assumption that path to podspec contains
path to project root, which is not always the case, for example in
monorepos. This caused incorrect generation of podspec path, since in
that case it would return absolute podspec path prepended with root path.
Used pathname class method relative_path_from to avoid this issue.

Resolves #537

Test Plan:

Tested manually in freshly initialised project and on an example mentioned by @sm1th here. This is still a WIP and I want to test it in other repos to make sure it works as expected.

Previous implementation made assumption that path to podspec contains
path to project root, which is not always the case, for example in
monorepos. This caused incorrect generation of podspec path, since in
that case it would return absolute podspec path prepended with root path.
Used `pathname` class method `relative_path_from` to avoid this issue.

Resolves #537
@Ehesp
Copy link
Contributor

Ehesp commented Aug 7, 2019

We'll get this checked out on RNFB and let you know.. Ta!

Copy link
Member

@grabbou grabbou left a comment

Choose a reason for hiding this comment

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

This looks much better now (except for my limited Ruby knowledge).

Copy link
Member

@thymikee thymikee left a comment

Choose a reason for hiding this comment

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

Tested with 3 different scenarios and it seems to work just fine, thanks!

@thymikee thymikee merged commit 6ad4eed into react-native-community:master Aug 8, 2019
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.

autoLinking doesn't work with monorepo

4 participants