dcrd icon indicating copy to clipboard operation
dcrd copied to clipboard

multi: update wire error types.

Open dnldd opened this issue 5 years ago • 5 comments

This updates the wire error types to leverage go 1.13 errors.Is/As functionality as well as confirm to the error infrastructure best practices outlined in #2181.

dnldd avatar Jul 16 '20 00:07 dnldd

Similarly, there are multiple types of errors that can come out of the wire package, so I really don't like renaming it to something generic that loses that extra information.

davecgh avatar Jul 16 '20 17:07 davecgh

This is going to be a pretty big hassle to implement to be honest. It needs a major module bump because it changes the API in an incompatible way. The wire package is also pretty much used in the API of every single other package which means all of their module majors will need to be bumped too.

I'm not convinced it's worth it to be honest. However, if you really want to get this one, it'll need the standard set of PRs to start the development cycle for the new major version, etc.

davecgh avatar Oct 20 '20 18:10 davecgh

I'm going to hold off on this one for a while until we really need a new major wire version as a result of changing the primitives out.

I expect that will happen either late in the 1.7.0 dev cycle or for 1.8.0. So, I'm going to mark this one as 1.8.0 for now to set expectations properly.

davecgh avatar Dec 18 '20 20:12 davecgh

Now that we're in the 1.8.0 development cycle, we should decide about working towards getting this in.

It requires a major module bump and that will require major module bumps of a bunch of other modules that use the types in their public APIs. I believe that will include addrmgr, blockchain, blockchain/standalone, blockchain/stake, connmgr, database, dcrutil, gcs, peer, rpcclient, and txscript.

Given it will necessarily cause so many major module version bumps, I wonder if we should just hold off until primitives (#2786) is ready to go because it too will require major bumps to all of the same modules. However, I don't foresee that module being done for quite some time, and almost positively not within the 1.8.0 time frame.

davecgh avatar Jan 14 '22 03:01 davecgh

As discussed in chat, I think we are better off bundling this with the changes coming in #2786 since this isn't priority and would require similar amounts of work to get in.

dnldd avatar Jan 24 '22 21:01 dnldd