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

How should parseAddress() be replaced? #31

Open
christianbundy opened this issue Dec 15, 2018 · 3 comments
Open

How should parseAddress() be replaced? #31

christianbundy opened this issue Dec 15, 2018 · 3 comments
Assignees
Labels

Comments

@christianbundy
Copy link
Contributor

I've recently noticed a deprecation notice in Scuttlebot, but I'm having a difficult time replacing the deprecated function. I found a reference to multiserver-address, but I don't think ma.decode() is providing { host, port, key } the same way. Here's the error I'm getting when running npm test in the Scuttlebot repo:

/home/christianbundy/src/ssbc/scuttlebot/plugins/gossip/index.js:165
        else throw new Error('must provide id:'+JSON.stringify(addr))
             ^

Error: must provide id:[[{"name":"net","data":["localhost","45451"]},{"name":"shs","data":["QnTycBc1Bm+suBWZmRWEbb7HqlJ/RIsQp/0TFswnHeA="]}]]
    at Object.get (/home/christianbundy/src/ssbc/scuttlebot/plugins/gossip/index.js:165:20)
    at Object.<anonymous> (/home/christianbundy/src/ssbc/scuttlebot/plugins/gossip/index.js:247:24)
    at apply (/home/christianbundy/src/ssbc/scuttlebot/node_modules/muxrpc-validation/index.js:173:15)
    at Object.add (/home/christianbundy/src/ssbc/scuttlebot/node_modules/muxrpc-validation/index.js:62:14)
    at /home/christianbundy/src/ssbc/scuttlebot/plugins/gossip/init.js:12:37
    at Array.forEach (<anonymous>)
    at module.exports (/home/christianbundy/src/ssbc/scuttlebot/plugins/gossip/init.js:12:4)
    at Object.init (/home/christianbundy/src/ssbc/scuttlebot/plugins/gossip/index.js:304:5)
    at /home/christianbundy/src/ssbc/scuttlebot/node_modules/secret-stack/api.js:43:28
    at Array.forEach (<anonymous>)
npm ERR! Test failed.  See above for more details.
@christianbundy
Copy link
Contributor Author

In case it's useful, I've pushed my [failing] branch to deprecated-parse-address.

cc: @dominictarr

@dominictarr
Copy link
Contributor

look at the stack trace! line 12

https://github.com/ssbc/ssb-server/blob/master/plugins/gossip/init.js#L12

that's coming from the local config. I think some test is using the seeds config to set an old format address, which requires parseAddress.

@stale
Copy link

stale bot commented Mar 23, 2019

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

@stale stale bot added the stale label Mar 23, 2019
@christianbundy christianbundy self-assigned this Mar 25, 2019
@stale stale bot removed the stale label Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants