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

Replace getAddress() with address() #724

Merged
merged 3 commits into from
May 27, 2020
Merged

Conversation

christianbundy
Copy link
Contributor

@christianbundy christianbundy commented May 26, 2020

See the commits for more details.

TL;DR:

  • Replace getAddress() with address() when call is happening over MuxRPC.
  • Since our dependencies don't support Node.js 6, change Travis config to test 8 - 14.

Problem: The `getAddress()` MuxRPC calls seem to be failing, but it's
unclear when the problem started or why. The Secret-Stack documentation
specifies a `getAddress()` method, but it seems to only be available via
an in-process Node.js method call rather than a MuxRPC method call. For
some reason, the MuxRPC method call (which implements the same behavior)
is called `address` rather than `getAddress`.

Solution: Replace all instances of the `getAddress()` MuxRPC method call
with the exact same method call to `address()`. This *is* a breaking
change, but it's a breaking change that already existed in previous
versions of SSB-Server (!) and the next version of SSB-Server needs to
have a major version bump anyway since FlumeDB and SSB-DB have had
breaking changes. This commit also reverts recent changes to
`test/bin.js`, which were causing test failures.
Problem: Our dependencies don't support Node.js 6 anymore, since its
been EOL since April 2019.

Solution: Drop Travis tests for Node.js 6 and add tests for Node.js 12
and the latest version.
Problem: Removing all `getAddress()` usage was too aggressive -- it's
still a method that Secret-Stack exposes, and so we should still test
for it, but we should **only test for it over in-process method calls**.
When using MuxRPC, we should always use `address()`.

Solution: Use `getAddress()` when the method isn't being called via
MuxRPC.
@christianbundy christianbundy mentioned this pull request May 26, 2020
@mixmix mixmix merged commit 2d40031 into ssb-private1 May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants