Empact
commented at 6:52 am on May 17, 2022:
member
This is an attempt to significantly improve code organization while making changes as simple as possible to review.
Here I split four files out of util/system:
util/exception, holding PrintExceptionContinue
util/shell, holding ShellEscape, runCommand
util/fs, holding various file, folder, and path-specific functions (building on fs.h and filesystem)
util/args, holding ArgsManager and related functions
The goal was to minimize review burden, so I made an effort to minimize the diffs and only modify the code when it was easy to confirm that the change would not have negative consequences.
That said, sourcing all of the windows-related headers was not straightforward, so I expect I’ll need to touch this up to correct any issues there.
Empact
commented at 6:54 am on May 17, 2022:
member
Empact
commented at 5:35 am on May 19, 2022:
member
Thanks @dongcarl - I’ve got some issues to figure out, particularly on the WIN32 side, and I’ll be doing it via CI so it’s going to mean some back and forth on this PR. E.g. the change is 5 commits but I’m going to have to play them out one by one to validate them.
Empact force-pushed
on May 21, 2022
Empact force-pushed
on May 24, 2022
Empact force-pushed
on May 24, 2022
Empact force-pushed
on May 24, 2022
Empact force-pushed
on May 24, 2022
DrahtBot
commented at 1:28 pm on May 24, 2022:
contributor
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviews
See the guideline for information on the review process.
#14485 (Try to use posix_fadvise with CBufferedFile by luke-jr)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
Empact force-pushed
on May 24, 2022
Empact force-pushed
on May 25, 2022
Empact force-pushed
on Jun 7, 2022
Empact force-pushed
on Jun 7, 2022
Empact force-pushed
on Jun 7, 2022
Empact force-pushed
on Jun 7, 2022
Empact force-pushed
on Jun 7, 2022
Empact force-pushed
on Jun 8, 2022
Empact force-pushed
on Jun 8, 2022
Empact force-pushed
on Jun 9, 2022
DrahtBot added the label
Needs rebase
on Jun 10, 2022
Empact force-pushed
on Jun 16, 2022
DrahtBot removed the label
Needs rebase
on Jun 16, 2022
Empact force-pushed
on Jun 16, 2022
Empact force-pushed
on Jun 18, 2022
DrahtBot added the label
Needs rebase
on Jun 21, 2022
TheCharlatan
commented at 11:33 am on September 18, 2022:
contributor
I reproduced much of the code move / split diff manually. The splitting makes sense to me, I had to overthink the split of functions into logging.* and exception.* , but keeping platform specific logging things in util/ (as done for the exceptions) seems sane to me.
@Empact is there any platform testing I can do to get this PR moving again?
Empact force-pushed
on Oct 10, 2022
Empact force-pushed
on Oct 10, 2022
Empact force-pushed
on Oct 10, 2022
Empact force-pushed
on Oct 10, 2022
Empact force-pushed
on Oct 10, 2022
Empact force-pushed
on Oct 10, 2022
Empact force-pushed
on Oct 10, 2022
Empact force-pushed
on Oct 10, 2022
DrahtBot removed the label
Needs rebase
on Oct 10, 2022
Empact force-pushed
on Oct 10, 2022
Empact force-pushed
on Oct 11, 2022
Empact marked this as ready for review
on Oct 12, 2022
Empact marked this as a draft
on Oct 12, 2022
DrahtBot added the label
Needs rebase
on Oct 19, 2022
refactor: Extract util/exception from util/system
This is a minimal extraction of a single public method, but also
the only use of std::exception in util/system.
Include libloaderapi.h for GetModuleFileNameA as that's the
source noted here: https://docs.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-getmodulefilenamea
f12cd1d77b
refactor: Extract util/shell from util/system
This is a minimal extraction of shell-specific functions
from util/system.
e5243d3676
refactor: Move error() from util/system.h to logging.h
error is a low-level function with a sole dependency on LogPrintf,
which is defined in logging.h
f1daaf1d89
refactor: Extract util/fs from util/system7745b29ca4
refactor: Extract util/args from util/system9ff4bb56ba
refactor: Drop now-unnecessary includes of util/system.hb070db4f1f
Empact force-pushed
on Jan 10, 2023
DrahtBot removed the label
Needs rebase
on Jan 10, 2023
TheCharlatan
commented at 10:20 pm on January 17, 2023:
AFAICT the build failures are coming from including these lines and I don’t think they are needed, so I’m guessing this was included to debug a windows problem? I’m keen on moving this PR forward,. Is there some deeper problem here with running this patch on windows, or is it a compile-time issue?
fanquake
commented at 10:48 am on January 18, 2023:
in e5243d3676136e4b0a590e76a07c86e62ca7d1f7:
and I don’t think they are needed,
Yea, there is no Boost usage in this file (and is no-longer any in the util library), so the entire ENABLE_EXTERNAL_SIGNER chunk here should be removed.
in
src/util/exception.cpp:15
in
f12cd1d77boutdated
fanquake
commented at 10:44 am on January 18, 2023:
In f12cd1d77bc062f1313f98a8aaea8afd96c4f52e:
Why is compat being included here? if it’s for a windows.h include (which isn’t in compat anyways), then I’d rather we just include windows.h.
fanquake
commented at 10:54 am on January 18, 2023:
In 9ff4bb56baa509c587698cb3a2877dfd4ff6d136:
This seems unrelated to this commit, and is not mentioned in the commit message.
DrahtBot
commented at 4:26 pm on January 18, 2023:
contributor
🐙 This pull request conflicts with the target branch and needs rebase.
DrahtBot added the label
Needs rebase
on Jan 18, 2023
TheCharlatan
commented at 3:02 pm on March 7, 2023:
contributor
I redid this work (fixing more of the includes and splitting out a few more functions) and have a branch over here: https://github.com/TheCharlatan/bitcoin/pull/10@Empact I’m still keen on moving this work forward. If you don’t have the time right now, I’ll attribute the commits to you and try to get my branch merged instead.
christ79ma approved
fanquake
commented at 7:48 pm on March 7, 2023:
member
I’m still keen on moving this work forward. If you don’t have the time right now, I’ll attribute the commits to you and try to get my branch merged instead.
Yep, it would be good to start getting some of this merged.
fanquake referenced this in commit
b175bdb9b2
on Mar 14, 2023
fanquake
commented at 11:37 am on March 14, 2023:
member
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2024-12-22 15:12 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me