Breaking API features and refactoring for 0.8 #427

Merged
KodrAus merged 9 commits from feat/api-cleanup into master 2019-10-04 18:18:05 -05:00
KodrAus commented 2019-10-01 20:37:17 -05:00 (Migrated from github.com)

I'm submitting a(n) (|feature|refactor|)

Description

Modules and Errors

This PR is a broad refactoring of our error types and module layout. The general pattern I've gone for is:

  • Define specific error types in submodules. These are currently private.
  • Collect these specific error types in an opaque root Error. All methods return this single Error type so it's easier for consumers to carry uuid::Errors in their own code.

It'll also include some implementations for open PRs as we've been discussing. I imagine we'll want to spend time working through these changes :)

I've hidden our prelude module for now, because I'm not sure it's something we'll want to stabilize with (it's only got a few bits in it afterall).

128bit support

Re-enables support for 128-bit numbers in the form of constructors on Uuid, following the pattern that method names without an endian suffix are BE.

No-std

Refactors our no-std support so we always mark the crate as no-std so our std imports are always the same. This simplifies our std/core support so we need fewer modules.

Timestamps

Includes the design proposed in #405 for timestamp support originally implemented by @jonathanstrong.

Related Issue(s)

Related PR(s)

**I'm submitting a(n)** (|feature|refactor|) # Description ## Modules and Errors This PR is a broad refactoring of our error types and module layout. The general pattern I've gone for is: - Define specific error types in submodules. These are currently private. - Collect these specific error types in an opaque root `Error`. All methods return this single `Error` type so it's easier for consumers to carry `uuid::Error`s in their own code. It'll also include some implementations for open PRs as we've been discussing. I imagine we'll want to spend time working through these changes :) I've hidden our `prelude` module for now, because I'm not sure it's something we'll want to stabilize with (it's only got a few bits in it afterall). ## 128bit support Re-enables support for 128-bit numbers in the form of constructors on `Uuid`, following the pattern that method names without an endian suffix are BE. ## No-std Refactors our `no-std` support so we always mark the crate as `no-std` so our std imports are always the same. This simplifies our std/core support so we need fewer modules. ## Timestamps Includes the design proposed in #405 for timestamp support originally implemented by @jonathanstrong. # Related Issue(s) - #406 # Related PR(s) - #405 - #416
KodrAus commented 2019-10-01 20:39:57 -05:00 (Migrated from github.com)

Since this is a pretty big PR I'm trying to keep the individual commits clean so it should be easier to follow along.

Since this is a pretty big PR I'm trying to keep the individual commits clean so it should be easier to follow along.
KodrAus commented 2019-10-01 20:57:19 -05:00 (Migrated from github.com)

This TODO bot is a bit of a nuisance...

This TODO bot is a bit of a nuisance...
kinggoesgaming commented 2019-10-03 01:12:41 -05:00 (Migrated from github.com)

(about the todo bot)
I think we should keep until 1.0, at which point we just remove it. The reason to keep it until then so that we have no overlooked bits. I am ok with the currently deleted comments from the bot

(about the todo bot) I think we should keep **until** 1.0, at which point we just remove it. The reason to keep it until then so that we have no overlooked bits. I am ok with the currently deleted comments from the bot
kinggoesgaming commented 2019-10-03 02:14:47 -05:00 (Migrated from github.com)

Also @KodrAus this is still a WIP right?

Also @KodrAus this is still a WIP right?
KodrAus commented 2019-10-03 02:19:38 -05:00 (Migrated from github.com)

@kinggoesgaming I think this is ready for a review now 👍

There’s definitely more docs work to do and we can consider how to expose richer info out of our errors but I don’t think that needs to block a review or possible merge.

@kinggoesgaming I think this is ready for a review now :+1: There’s definitely more docs work to do and we can consider how to expose richer info out of our errors but I don’t think that needs to block a review or possible merge.
kinggoesgaming (Migrated from github.com) approved these changes 2019-10-04 17:57:59 -05:00
kinggoesgaming commented 2019-10-04 17:58:07 -05:00 (Migrated from github.com)

bors r+

bors r+
bors[bot] commented 2019-10-04 18:18:05 -05:00 (Migrated from github.com)
# Build succeeded * [continuous-integration/appveyor/branch](https://ci.appveyor.com/project/KodrAus/uuid/builds/27894472) * [continuous-integration/travis-ci/push](https://travis-ci.org/uuid-rs/uuid/builds/593770897?utm_source=github_status&utm_medium=notification)
Dylan-DPC-zz (Migrated from github.com) approved these changes 2019-10-09 04:29:14 -05:00
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-uuid-rs/uuid!427
No description provided.