Skip to content

Conversation

@Empact
Copy link
Contributor

@Empact Empact commented Aug 2, 2018

For consistency with other bundled dependencies. Having it in the top-level
directory makes it clear that it is a library that we're including
rather than a file that is a part of the project.

tinyformat/tinyformat.h and tinyformat/README.md are drawn from the existing
sha reference:
https://github.com/c42f/tinyformat/tree/689695cf58700e6defe3741829564cd682d5ae57

Existing modifications to tinyformat are moved to utilstrprintf.h, clearly
separating upstream and project code.

This includes changes in:
695041e - util: Update tinyformat
1b8fd35 - Make tinyformat errors raise an exception instead of assert()ing
9b6d4c5 - Move strprintf define to tinyformat.h
6e5fd00 - Move *Version() functions to version.h/cpp
9eaa0af - tinyformat: force USE_VARIADIC_TEMPLATES
b651270 - util: Throw tinyformat::format_error on formatting error

This does not include changes below, which are cosmetic or apparently unintentional:
64fb0ac - Declare single-argument (non-converting) constructors "explicit"
4d9b425 - Fix typos

Note I excluded only the tinyformat cpp from the boost lint checks out of an
abundance of caution - these files are not actually built into bitcoin so are
not at risk of pulling in unwanted dependencies, whereas the header, and other
dependencies might be.

@Empact
Copy link
Contributor Author

Empact commented Aug 2, 2018

This is an alternative to #13845. This includes just the header and readme, while #13845 includes the full subtree - more automatic checking is possible with that, but at the cost of including support files.

@laanwj
Copy link
Member

laanwj commented Aug 2, 2018

Concept ACK

@DrahtBot
Copy link
Contributor

DrahtBot commented Aug 2, 2018

No more conflicts as of last run.

@laanwj
Copy link
Member

laanwj commented Aug 7, 2018

Closing this in favor of #13845, at least I'd say that if we're going to move it anyhow go the full yard and make it a subtree.

@laanwj laanwj closed this Aug 7, 2018
@laanwj laanwj reopened this Aug 7, 2018
@laanwj
Copy link
Member

laanwj commented Aug 7, 2018

Reopening because of @MarcoFalke's concern, agree that #13845 pulls in a bizarrely high number (46!) of files. And the whole intent of tinyformat.h is to have a file that can be easily copied into a project.
It's not clear it is worth it.

Copy link
Member

Choose a reason for hiding this comment

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

No need to add a third party readme. This will show up in all history/logs and greps.

@maflcko
Copy link
Member

maflcko commented Aug 12, 2018

Concept ACK

@Empact Empact force-pushed the tinyformat-subdir branch from 8e60387 to c5ee680 Compare August 13, 2018 02:06
@Empact
Copy link
Contributor Author

Empact commented Aug 13, 2018

Dropped the readme. 👍

Copy link
Member

Choose a reason for hiding this comment

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

nit: Not a subtree

@maflcko
Copy link
Member

maflcko commented Aug 27, 2018

utACK c5ee680fdfe806ab6ffbfca47f6cd28e4fb4e049

For consistency with other bundled dependencies. Having it in the top-level
directory makes it clear that it is a library that we're including
rather than a file that is a part of the project.

tinyformat/tinyformat.h and tinyformat/README.md are drawn from the existing
sha reference:
https://github.com/c42f/tinyformat/tree/689695cf58700e6defe3741829564cd682d5ae57

Existing modifications to tinyformat are moved to utilstrprintf.h, clearly
separating upstream and project code.

This includes changes in:
695041e - util: Update tinyformat
1b8fd35 - Make tinyformat errors raise an exception instead of assert()ing
9b6d4c5 - Move strprintf define to tinyformat.h
6e5fd00 - Move `*Version()` functions to version.h/cpp
9eaa0af - tinyformat: force USE_VARIADIC_TEMPLATES
b651270 - util: Throw tinyformat::format_error on formatting error

This does not include changes below, which are cosmetic or apparently unintentional:
64fb0ac - Declare single-argument (non-converting) constructors "explicit"
4d9b425 - Fix typos

Note I excluded only the tinyformat cpp from the boost lint checks out of an
abundance of caution - these files are not actually built into bitcoin so are
not at risk of pulling in unwanted dependencies, whereas the header, and other
dependencies might be.
@Empact Empact force-pushed the tinyformat-subdir branch from c5ee680 to d48249e Compare August 28, 2018 01:12
@Empact
Copy link
Contributor Author

Empact commented Aug 28, 2018

Removed inaccurate test/lint/README mention and unnecessary test/lint/lint-includes.sh filter.

@maflcko
Copy link
Member

maflcko commented Aug 29, 2018

re-utACK d48249e

@laanwj
Copy link
Member

laanwj commented Aug 31, 2018

This was discussed at the 2018-08-30 IRC meeting and there was no agreement to do this at all.

21:20 < wumpus> one topic I'd like to discuss is where to move tinyformat in the source tree, if we're going to do
                that at all, I hate it when there's two competing PRs open for something
21:20  * jonasschnelli is lost in PRs
21:20 < wumpus> #topic tinyformat move
21:20 < wumpus> e.g.: #13846, #13845, or keep as is
21:20 < gribble> https://github.com/bitcoin/bitcoin/issues/13846 | Move src/tinyformat.h to
                 src/tinyformat/tinyformat.h by Empact . Pull Request #13846 . bitcoin/bitcoin . GitHub
21:20 < gribble> https://github.com/bitcoin/bitcoin/issues/13845 | Include tinyformat as a subtree by Empact . Pull
                 Request #13845 . bitcoin/bitcoin . GitHubAsset 1Asset 1
21:21 < wumpus> I'm ok with all three options but not with leaving those PRs open forever
21:22 < jonasschnelli> The subtree looked to me after an overkill,... I would prefer #13846 (no strong opinion)
21:22 < gribble> https://github.com/bitcoin/bitcoin/issues/13846 | Move src/tinyformat.h to
                 src/tinyformat/tinyformat.h by Empact . Pull Request #13846 . bitcoin/bitcoin .
21:22 < wumpus> I guess MarcoFalke is not here?
21:23 < wumpus> I think he has the strongest opinion about it
21:23 < gmaxwell> would we really do a subtree for a single file?
21:23 < wumpus> no.
21:24 < wumpus> I think this is pretty much unnecessary, and certainly the subtree one contains lots of changes
21:24 < gmaxwell> seems like change for the sake of change to me.
21:24 < wumpus> too much of that
21:25 < achow101> I'm in favor of keeping it as is

If there's no agreement how to go forward here, I'd say it's not extremely important to do, so I'm closing both PRs for now.

@laanwj laanwj closed this Aug 31, 2018
@maflcko
Copy link
Member

maflcko commented Aug 31, 2018

Imo this could still be done the next time we touch tinyformat, but yeah no rush

@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants