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

ZMQ wrapper - add Windows/Mac native libs and loading logic #829

Merged
merged 4 commits into from
Feb 19, 2019

Conversation

aion-kelvin
Copy link
Contributor

@aion-kelvin aion-kelvin commented Feb 15, 2019

Notice

It is not allowed to submit your PR to the master branch directly, please submit your PR to the master-pre-merge branch.

Description

Please include a brief summary of the change that this pull request proposes. Include any relevant motivation and context. List any dependencies required for this change.

  • Recently, changes were made to 3rdParty/libnzmq so that it performs the work of loading native libraries. It was previously scattered about in the kernel.
  • The new native loading logic is hardcoded for Linux. This PR adds support for Mac and Windows.

Fixes Issue # .

Type of change

Insert x into the following checkboxes to confirm (eg. [x]):

  • Bug fix.
  • New feature.
  • Enhancement.
  • Unit test.
  • Breaking change (a fix or feature that causes existing functionality to not work as expected).
  • Requires documentation update.

Testing

Please describe the tests you used to validate this pull request. Provide any relevant details for test configurations as well as any instructions to reproduce these results.

  • Testing involved followed this template:
    • build the Maven jar for 3rdParty/libnzmq with this new code
    • bundle that jar into a version of aion_api that uses an updated version of kernel dependencies (versions that don't do the ZMQ native lib loading logic that they used to be responsible for) and build a new aion_api jar, which is a fat jar containing all its dependencies
    • Run the Aion Desktop Wallet using the new aion_api jar, for each platform
  • Testing for each platform was different because I wanted to avoid having to build the Mac and Windows installers
    • For Linux: build Desktop Wallet as usual, but with the updated aion_api Jar, and with the old ZMQ Native loading logic removed. Start Wallet and see that it connects to Nodesmith and can get peers and sync info.
    • For Win/Mac: to avoid building their installers, download the latest release of Wallet and install it. Then go into the installed location -- the native libs are in that folder as part of the installer process. Delete them all to prove that the old Native loading logic is not being relied upon; start up the Wallet and see that it fails to connect to Nodesmith. Then replace the aion_api jar with the new one we built and see that it succeeds at connecting to Nodesmith.

Verification

Insert x into the following checkboxes to confirm (eg. [x]):

  • I have self-reviewed my own code and conformed to the style guidelines of this project.
  • New and existing tests pass locally with my changes.
  • I have added tests for my fix or feature.
  • I have made appropriate changes to the corresponding documentation.
  • My code generates no new warnings.
  • Any dependent changes have been made.

@aion-kelvin aion-kelvin added wip Indicates that a PR or issue is Work In Progress, issuer should be notified before any actions build script Build script change only labels Feb 15, 2019
@aion-kelvin aion-kelvin self-assigned this Feb 15, 2019
@aion-kelvin aion-kelvin removed the wip Indicates that a PR or issue is Work In Progress, issuer should be notified before any actions label Feb 15, 2019
@aion-kelvin aion-kelvin added this to the 0.3.3 milestone Feb 15, 2019
Copy link
Contributor

@arajasek arajasek left a comment

Choose a reason for hiding this comment

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

Thanks for this! Changes look good, so I've approved.

I haven't manually tested yet, will do that this weekend just to double-check.

@AionJayT AionJayT merged commit 0d2e48e into master-pre-merge Feb 19, 2019
@aion-kelvin aion-kelvin deleted the zmq-non-linux2 branch February 20, 2019 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build script Build script change only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants