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

Improve dependencies logging #1110

Merged
merged 2 commits into from
Apr 12, 2019

Conversation

belemaire
Copy link
Member

@belemaire belemaire commented Apr 10, 2019

This PR contains two commits

  • c173c33 adds a new YarnLockParser utility class which as of now contains utility methods to parse and generate dependency trees out of a yarn.lock file.
    This utility class is used to replace primitive/limited dependency logging following Container generation. Complete dependency trees of all resolved native dependencies are now debug logged following Container generation along with the tree of potential mismatching native dependencies versions.

  • 31982ff Leverage the new YarnLockParser class by adding a new command ern cauldron why, deprecating the ern why command that was too rudimentary and ultra slow to be of any practical use.
    This new command relies on the yarn.lock files stored in the Cauldron for each Container, and will list a dependency tree of any given native or JS dependency, which is a much faster way to check why a dependency is included in the Container of a native application version than having to go through Cauldron yarn.lock files manually following each dependency to walk up the tree.
    It will list each found version of the dependency as a dependency tree along with the resolved version of any dependency. For example :

➜ ern cauldron why react-native-code-push -d MyApp:android:1000.0.0

 └─ [email protected] [5.3.2]
    ├─ miniapp-one@https://github.com/foo/MiniAppOne.git#8cb271b3cd0492b622d392f5d0e28a106d5b42d0 [0.0.1]
    ├─ [email protected] [1.2.3]
    └─ miniapp-three@^4.0.0 [4.1.1]
➜ ern cauldron why react-native-electrode-bridge -d MyApp:ios:1000.0.0

 └─ [email protected] [1.5.17]
    └─ my-awesome-api@^0.2.1 [0.2.3]
       ├─ [email protected] [0.2.49]
       │   ├─ miniapp-one@https://github.com/foo/MiniAppOne.git#8cb271b3cd0492b622d392f5d0e28a106d5b42d0 [0.0.1]
       │   └─ [email protected] [1.2.3]
       └─[email protected] [0.2.1]

@belemaire belemaire force-pushed the improve-dependencies-logging branch 2 times, most recently from e399f95 to 56276cc Compare April 10, 2019 01:56
@belemaire belemaire force-pushed the improve-dependencies-logging branch from 56276cc to 31982ff Compare April 10, 2019 02:01
@belemaire belemaire merged commit b31226f into electrode-io:master Apr 12, 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.

1 participant