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

Post install script for installing Indy binary dependencies for Android #139

Closed
wants to merge 6 commits into from
Closed

Post install script for installing Indy binary dependencies for Android #139

wants to merge 6 commits into from

Conversation

cvarjao
Copy link
Contributor

@cvarjao cvarjao commented Nov 17, 2021

Summary of Changes

Externalize dependency for indy-sdk-react-native (android)

Related Issues

N/A

Pull Request Checklist

This is just a reminder about the most common mistakes. Please make sure that you tick all appropriate boxes. But please read our contribution guide at least once; it will save you a few review cycles!

If an item doesn't apply to your pull request, check it anyway to make it apparent that there's nothing to do.

  • All commits contain a DCO Signed-off-by line (we use the DCO GitHub app to enforce this).
  • Updated LICENSE-3RD-PARTY.md for any added dependencies or vendored components.
  • Run prettier: npm run style-format
  • Updated documentation for changed code and new or modified features.

If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!

PR template adapted from the Python attrs project.

Signed-off-by: Clécio Varjão <1348549+cvarjao@users.noreply.github.com>
@cvarjao cvarjao requested a review from a team as a code owner November 17, 2021 23:17
@@ -11,7 +11,8 @@
"test": "jest",
"lint": "eslint --ignore-path .gitignore --ext .js,.jsx,.ts,.tsx --color .",
"prettier": "prettier --ignore-path .gitignore '**/*.+(js|jsx|json|ts|tsx|md|yml|yaml)'",
"postinstall": "patch-package",
"prepack": "rimraf *.tgz",
"postinstall": "patch-package && node post-install-setup.js",
Copy link
Contributor

Choose a reason for hiding this comment

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

This will run after every install right? Maybe you can add some form of check to see if this setup has already be done, that way on multiple runs it will actually only run once

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think that can be optimized for sure. I am assuming npm install or npm ci is not something that developer runs very frequently, so I didn't think the overhead was too much. I've added to the existing postinstall, since I am not sure what patch-package is used for. I will add some extra checks to allow for caching

Copy link
Contributor

Choose a reason for hiding this comment

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

patch-package is used for patching files in the node_modules directory (see patches directory)

Copy link
Contributor

@TimoGlastra TimoGlastra left a comment

Choose a reason for hiding this comment

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

I'm curious to hear a bit more about your setup. Are you consuming bifold as a library? How would that work? Do you import files/components from this package?

@cvarjao
Copy link
Contributor Author

cvarjao commented Nov 18, 2021

I'm curious to hear a bit more about your setup. Are you consuming bifold as a library? How would that work? Do you import files/components from this package?

The bootstrapping workflow that I am thinking does something like:

npx react-native init MyWallet --template @aries-framework/bifold-template

@aries-framework/bifold-template is package published in npm. That template will generate the whole project (it is a clone of react-native-template-typescript and in the package.json will have something like:

{
 "dependencies": {
    "@aries-framework/bifold": "^1.0.0"
  }
}

The generated/default index.js will looks something like:

 import Bifold from '@aries-framework/bifold'

 const Base = () => {
   useEffect(() => {
     LogBox.ignoreLogs(['VirtualizedLists', 'Mediator Invitation', 'Non-serializable values'])
   }, [])
 
   return (
     <NavigationContainer>
       <Bifold.App />
     </NavigationContainer>
   )
 }

Signed-off-by: Clécio Varjão <1348549+cvarjao@users.noreply.github.com>
@cvarjao
Copy link
Contributor Author

cvarjao commented Nov 19, 2021

@TimoGlastra, here is a crude idea of what I am thinking.

TimoGlastra
TimoGlastra previously approved these changes Jan 13, 2022
Copy link
Contributor

@TimoGlastra TimoGlastra left a comment

Choose a reason for hiding this comment

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

Haven't tested, but otherwise LGTM.

I'm still in favour of not adding this for the main repo as it complicates setup, but fine with merging.

@JamesKEbert what are your thoughts?

post-install-setup.js Outdated Show resolved Hide resolved
post-install-setup.js Outdated Show resolved Hide resolved
@@ -11,7 +11,8 @@
"test": "jest",
"lint": "eslint --ignore-path .gitignore --ext .js,.jsx,.ts,.tsx --color .",
"prettier": "prettier --ignore-path .gitignore '**/*.+(js|jsx|json|ts|tsx|md|yml|yaml)'",
"postinstall": "patch-package",
"prepack": "rimraf *.tgz",
"postinstall": "patch-package && node post-install-setup.js",
Copy link
Contributor

Choose a reason for hiding this comment

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

patch-package is used for patching files in the node_modules directory (see patches directory)

cvarjao and others added 2 commits January 17, 2022 15:51
Co-authored-by: Timo Glastra <timo@animo.id>
Signed-off-by: Clécio Varjão <1348549+cvarjao@users.noreply.github.com>
Co-authored-by: Timo Glastra <timo@animo.id>
Signed-off-by: Clécio Varjão <1348549+cvarjao@users.noreply.github.com>
@jleach jleach changed the title build: post install script for installing Indy binary dependencies for Android Post install script for installing Indy binary dependencies for Android Jan 28, 2022
@jleach
Copy link
Contributor

jleach commented Jul 19, 2022

I think this issue has gone stale. We can re-introduce it once we get the Indy SDK for Apple Silicon tested and in the bag.

@jleach jleach closed this Jul 19, 2022
jcdrouin21 pushed a commit to MCN-ING/aries-mobile-agent-react-native that referenced this pull request May 16, 2023
…cred-failure

fix Person cred test gmail invite handling
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.

None yet

4 participants