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

refactor(breaking): remove deprecated link, unlink and associated code #1537

Merged
merged 40 commits into from
Feb 7, 2022

Conversation

grabbou
Copy link
Member

@grabbou grabbou commented Jan 27, 2022

Summary:

This PR removes the code related to link, unlink and rnpm and is a first shot at cleaning up the codebase. It is not going to clean up all the places automatically, but it's a first step.

List of changes:

  • Removed link, unlink, install and uninstall commands from the CLI
  • Removed all entries regarding rnpm, together with migration guides
  • Removed a lot of unnecessary and extraneous properties from IOSProjectConfig, AndroidProjectConfig that were used for link, and not utilised in a new autolinking mechanism. That means things such as assets or hooks are no longer allowed to be present on a configuration and will cause an error when CLI validates the structure of your config.
  • Removed a lot of unnecessary properties from IOSProjectParams, AndroidProjectParams, IOSDependencyParams and AndroidDependencyParams that were used to override settings for link that are no longer needed.
  • Removed ability to set a custom podspecPath for an iOS dependency. This was already marked as deprecated and set to be removed
  • Removed --project-path option from a run-ios CLI command. This was meant to set a source directory for iOS files (unless it equals to iOS). It is now using the detection from config, which makes sure that run-ios uses the same folder that autolinking and other commands (very important for debugging)
  • Changed iOS source directory detection from looking for an Xcode project to looking for a Podfile. Historically, we used to look for an xcodeproj or xcworkspace because that is what link needed to work and manipulate. The new autolinking relies on a Podfile only. There are certain use cases where Podfile is the only file present in a project (e.g. Xcode files are generated programatically or abstracted away). We still keep an information about xcodeProject we detected, as it is used for commands such as upgrade. I believe this may change in the future, so I wouldn't recommend relying too much on it.

We will explain the differences in types/configuration later in a form of a changelog/blog post. Right now, if you want to learn more about the changes, simply check the diff for cli-types package or a documentation.

Todo in a follow-up PRs:

@grabbou grabbou changed the title refactor: remove deprecated link, unlink and associated code refactor(breaking): remove deprecated link, unlink and associated code Feb 2, 2022
@mikehardy
Copy link
Contributor

First feedback coming in from react-native-vector-icons user, and it's basically, "Okay so now what do I do?"

oblador/react-native-vector-icons#1416 (comment)

stackchain added a commit to Emurgo/csl-mobile-bridge that referenced this pull request Apr 21, 2023
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.

6 participants