Skip to content

Create no-std-error crate#3732

Closed
tcharding wants to merge 1 commit intorust-bitcoin:masterfrom
tcharding:dev-input-string
Closed

Create no-std-error crate#3732
tcharding wants to merge 1 commit intorust-bitcoin:masterfrom
tcharding:dev-input-string

Conversation

@tcharding
Copy link
Copy Markdown
Member

@tcharding tcharding commented Dec 11, 2024

Chasing concept ACK please @apoelstra. Also we need to bike shed the crate name and create the repo.

Split out the write_err and InputString from internals into their own crate currently called no-std-error.

As a demo the crate is part of this repo still but it should be moved up to a standalone repo because it is not Bitcoin specific.

Please note the authors list has Kix up front because he wrote all this code originally. He is not around right now to give his consent but I believe this is still the correct thing to do to give him credit for work done. Andrew is up next because he is BDFL round here. I'm last because I just did the cut'n paste and raised the PR.

Next step, if this gets concept ACK'd is to create a new repo.

Close: #3322

Split out the `write_err` and `InputString` from `internals` into their
own crate.

As a demo the crate is part of this repo still but it should be moved up
to a standalone repo because it is not Bitcoin specific.

Please note the authors list has Kix up front because he wrote all this
code originally. He is not around right now to give his consent but I
believe this is still the correct thing to do to give him credit for
work done. Andrew is up next because he is BDFL round here. I'm last
because I am just did the cut'n paste and raised the PR.

Next step, if this gets concept ACK'd is to create a new repo.
@github-actions github-actions bot added C-bitcoin PRs modifying the bitcoin crate test doc C-error labels Dec 11, 2024
@tcharding tcharding marked this pull request as draft December 11, 2024 22:51
@apoelstra
Copy link
Copy Markdown
Member

weak concept ACK. Musing on whether we just want to bump our MSRV to 1.80 before we do 1.0. Probably not ... it'll be over a year before our rules would let us do that.

Can you clarify why these things should have their own crate rather than internals? Are we planning to expose InputString in the public API?

@tcharding
Copy link
Copy Markdown
Member Author

Yes, described in #3708

@tcharding
Copy link
Copy Markdown
Member Author

tcharding commented Dec 17, 2024

Bump @apoelstra , needs:

  • Us to agree that this needs doing
  • Consensus on the crate name
  • You to add the new repo
  • Me to do the rebase

@apoelstra
Copy link
Copy Markdown
Member

Personally I'd rather we just encapsulate the offending InputString type.

@tcharding
Copy link
Copy Markdown
Member Author

Might be easier said that done. Its used by units::parse::int which is public because its used by the public impl_parse_str_from_int_infallible! macro, which is used in primitives. Shock horror, bitten by cross crate macros again. Perhaps we duplicate the macro [and stop calling macros across crates]?

@apoelstra
Copy link
Copy Markdown
Member

stop calling macros across crates

Yeah, this I can get behind.

@tcharding
Copy link
Copy Markdown
Member Author

Playing with this led to #3817

@tcharding
Copy link
Copy Markdown
Member Author

This has no legs, we are going to try and encapsulate the InputString and write_err macros instead.

@tcharding tcharding closed this Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-bitcoin PRs modifying the bitcoin crate doc test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider moving no-std/alloc error stuff from internals to a new stable crate

2 participants