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

multi: Introduce database v3 #2689

Merged
merged 2 commits into from
Aug 2, 2021
Merged

Conversation

matheusd
Copy link
Member

This PR introduces a new major version for the github.com/decred/dcrd/database module, namely v3.

The current code on master already has breaking changes compared to the last released version of the database module (v2.0.2) (for example, the Error structure switched the ErrorCode member for Err). Therefore, a new major version bump is required before releasing the next version of this module.

The first commit "locks" local users of the database module to the last available development version of the module (the one in the current tip of the master branch) and removes replace directives, so that the next commit can perform the version bump of the database module without requiring changes in client code.

A future PR will switch all client code to database/v3. This needs to be done separately (instead of on a single PR) because otherwise go mod download will fail and CI tests won't pass (due to the first database/v3 commit not yet being present in a branch of the dcrd repository).

This prepares the dependent modules for a version bump of the database
module by pointing their required version to the most recent one and
removing replace directives where they exist.
This bumps the major version of the database module to v3. This is
needed because the current code already has backwards incompatible
changes.
@matheusd
Copy link
Member Author

Just noticed #2653 was already opened and closed (unmerged).

To make it more explicit, the specific change that prompted me to send this was introduced by #2261, which changed the exported Error struct in a non-backwards-compatible way, by removing the ErrorCode member and adding the Err member (here).

Dcrwallet already updated to the newest (master) version of the database/v2 module, so this now breaks projecs which use both dcrwallet and database/v2 (through transitive deps) but haven't been updated to use the new error structure in database (e.g. rpcclient/v6).

I hadn't noticed the previous PR, otherwise I would have asked first whether to open this or re-open the old one.

@davecgh davecgh merged commit 9ede6ae into decred:master Aug 2, 2021
@matheusd matheusd deleted the add-database-v3 branch August 2, 2021 14:51
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.

2 participants