Skip to content

Commit

Permalink
chore: deprecate types/errors aliases (#11380)
Browse files Browse the repository at this point in the history
## Description

Closes: #11379

### Author Checklist

*All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.*

I have...

- [ ] included the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.*

I have...

- [ ] confirmed the correct [type prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json) in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed 
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)
  • Loading branch information
robert-zaremba authored Mar 16, 2022
1 parent 1863576 commit 6f16d01
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
9 changes: 9 additions & 0 deletions types/errors/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Package errors provides a shared set of errors for use in the SDK,
// aliases functionality in the github.com/cosmos/cosmos-sdk/errors module
// that used to be in this package, and provides some helpers for converting
// errors to ABCI response code.
//
// New code should generally import github.com/cosmos/cosmos-sdk/errors directly
// and define a custom set of errors in custom codespace, rather than importing
// this package.
package errors
21 changes: 10 additions & 11 deletions types/errors/errors.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
//Package errors provides a shared set of errors for use in the SDK,
//aliases functionality in the github.com/cosmos/cosmos-sdk/errors module
//that used to be in this package, and provides some helpers for converting
//errors to ABCI response code.
//
//New code should generally import github.com/cosmos/cosmos-sdk/errors directly
//and define a custom set of errors in custom codespace, rather than importing
//this package.
package errors

import (
errorsmod "github.com/cosmos/cosmos-sdk/errors"
)

// Type Aliases to errors module
//
// Deprecated: functionality of this package has been moved to it's own module:
// github.com/cosmos/cosmos-sdk/errors
// Please use the above module instead of this package.
var (
SuccessABCICode = errorsmod.SuccessABCICode
ABCIInfo = errorsmod.ABCIInfo
Expand All @@ -28,9 +25,11 @@ var (
AssertNil = errorsmod.AssertNil
)

type (
Error = errorsmod.Error
)
// Error type alias for errorsmod.Error
//
// Deprecated: the type has been moved to github.com/cosmos/cosmos-sdk/errors
// module. Please use the above module instead of this package.
type Error = errorsmod.Error

// RootCodespace is the codespace for all errors defined in this package
const RootCodespace = "sdk"
Expand Down

0 comments on commit 6f16d01

Please sign in to comment.