Skip to content

assert, assert/cmp: un-deprecate assert.ErrorType for now#286

Merged
dnephin merged 1 commit intogotestyourself:mainfrom
thaJeztah:undeprecate_ErrorType
Sep 5, 2024
Merged

assert, assert/cmp: un-deprecate assert.ErrorType for now#286
dnephin merged 1 commit intogotestyourself:mainfrom
thaJeztah:undeprecate_ErrorType

Conversation

@thaJeztah
Copy link
Contributor

Commit 043b579 deprecated these functions, marking assert.ErrorIs as a replacement. Unfortunately, assert.ErrorIs is not a drop-in replacement for various situations, or requires quite some additional boilerplating to be used.

This patch reverts the deprecation for now, but keeps recommendations in place to consider ErrorIs for situations that allow it.

Commit 043b579 deprecated these
functions, marking assert.ErrorIs as a replacement. Unfortunately,
assert.ErrorIs is not a drop-in replacement for various situations,
or requires quite some additional boilerplating to be used.

This patch reverts the deprecation for now, but keeps recommendations
in place to consider ErrorIs for situations that allow it.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Copy link
Member

@dnephin dnephin left a comment

Choose a reason for hiding this comment

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

Fair enough!

@dnephin dnephin merged commit 0b81523 into gotestyourself:main Sep 5, 2024
@thaJeztah thaJeztah deleted the undeprecate_ErrorType branch September 5, 2024 06:35
@thaJeztah
Copy link
Contributor Author

@dnephin curious if you were considering a new release with this included 😅 ❤️

@dnephin
Copy link
Member

dnephin commented Feb 8, 2025

New release: https://github.com/gotestyourself/gotest.tools/releases/tag/v3.5.2

@thaJeztah
Copy link
Contributor Author

Thanks! Saw it ❤️

Crown0815 pushed a commit to Crown0815/forgejo-runner-windows that referenced this pull request May 21, 2025
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [gotest.tools/v3](https://github.com/gotestyourself/gotest.tools) | require | patch | `v3.5.1` -> `v3.5.2` |

---

### Release Notes

<details>
<summary>gotestyourself/gotest.tools (gotest.tools/v3)</summary>

### [`v3.5.2`](https://github.com/gotestyourself/gotest.tools/releases/tag/v3.5.2)

[Compare Source](gotestyourself/gotest.tools@v3.5.1...v3.5.2)

#### What's Changed

-   assert: ensure message is always displayed & fix under bazel by [@&#8203;cstrahan](https://github.com/cstrahan) in gotestyourself/gotest.tools#276
-   go.mod: golang.org/x/tools v0.13.0 for go1.22+ compatibility by [@&#8203;thaJeztah](https://github.com/thaJeztah) in gotestyourself/gotest.tools#282
-   poll: Continue(): use format.Message for formatting by [@&#8203;thaJeztah](https://github.com/thaJeztah) in gotestyourself/gotest.tools#279
-   fix TestFromDirSymlink on Windows due to missing drive-letter by [@&#8203;thaJeztah](https://github.com/thaJeztah) in gotestyourself/gotest.tools#283
-   Fix various linting issues and minor bugs by [@&#8203;thaJeztah](https://github.com/thaJeztah) in gotestyourself/gotest.tools#280
-   fix badges in readme, gofmt, and minor linting fix by [@&#8203;thaJeztah](https://github.com/thaJeztah) in gotestyourself/gotest.tools#284
-   circleci: add go1.21, go1.22, go1.23, and update golangci-lint to v1.60.3 by [@&#8203;thaJeztah](https://github.com/thaJeztah) in gotestyourself/gotest.tools#285
-   assert, assert/cmp: un-deprecate assert.ErrorType for now by [@&#8203;thaJeztah](https://github.com/thaJeztah) in gotestyourself/gotest.tools#286

#### New Contributors

-   [@&#8203;cstrahan](https://github.com/cstrahan) made their first contribution in gotestyourself/gotest.tools#276

**Full Changelog**: gotestyourself/gotest.tools@v3.5.1...v3.5.2

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC), Automerge - Between 12:00 AM and 03:59 AM ( * 0-3 * * * ) (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4yMTIuMCIsInVwZGF0ZWRJblZlciI6IjM5LjI1Mi4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/524
Co-authored-by: Renovate Bot <[email protected]>
Co-committed-by: Renovate Bot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Discussion: cmp.ErrorIs is not a full replacement for cmp.ErrorType, but is now deprecated

2 participants