-
Notifications
You must be signed in to change notification settings - Fork 38.8k
refactor: move interfaces/* to common/interfaces/* #26293
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
Conversation
fe97d8f to
4294f2f
Compare
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
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. |
|
Concept ACK. |
|
I think something should be done about the inconsistency of having
I think I like these options a little better, because they would keep source structure flat and avoid too much nesting. They would also avoid namespace inconsistencies or the need to have a nested I want look into option 2 a little more since it seems like the 3 .cpp files in the interfaces directory are very minimal and don't contain much real code. |
|
As you mentioned, I agree that we should go for a less nested option when possible. Now considering the alternatives you mentioned, Option 2 seems like a pretty interesting idea. I thought it to be a preferable option because it seemed a cleaner way to achieve our goal. This might be an infeasible scenario, and there might exist other options than the two you mentioned to achieve this goal, which I haven't considered. But I just wanted to explain why I think the second option, though cleaner, might not be feasible in the long run. |
|
I implemented option 2 above in #26298. It changes fewer files than this PR and avoids the nested directory structure.
I don't see this happening, just because the point of |
Is this something we are actively trying to avoid? i.e in #26250 (comment) we seem to be going the other direction. In any case, closing this in favour of #26298. |
I think both changes make sense. In that case, the file In this case, this PR isn't just changing a The idea for Hope that makes sense. |
3a0b352 refactor: move url.h/cpp from lib util to lib common (fanquake) 058eb69 build: add missing event cflags to libbitcoin_util (fanquake) Pull request description: Move `util/url` to `common/url`. Also add missing `event_*` flags to `libbitcoin_util`. #26293 + the commit dropping boost cppflags from `libbitcoin_util` shows this issue. i.e: ```bash CXX util/libbitcoin_util_a-url.o util/url.cpp:7:10: fatal error: 'event2/http.h' file not found #include <event2/http.h> ^~~~~~~~~~~~~~~ 1 error generated. ``` ACKs for top commit: hebasto: ACK 3a0b352 ryanofsky: Code review ACK 3a0b352 Tree-SHA512: 600a76fd334267a02d332df9b67891a38d3fd7f5baf8a82b2447879b3bc65eab2552d2c081c0a5f1ec927bf80df7fc1f0cbbdda4cb76994b46dadf260b8e1cb3
…_common.a b19c412 refactor: Rename ambiguous interfaces::MakeHandler functions (Ryan Ofsky) dd6e8bd build: remove BOOST_CPPFLAGS from libbitcoin_util (fanquake) 82e272a refactor: Move src/interfaces/*.cpp files to libbitcoin_common.a (Ryan Ofsky) Pull request description: These belong in `libbitcoin_common.a`, not `libbitcoin_util.a`, because they aren't general-purpose utilities, they just contain some common glue code that is used by both the node and the wallet. Another reason not to include these in `libbitcoin_util.a` is to prevent them from being used by the kernel library. Also rename ambiguous `MakeHandler` functions to `MakeCleanupHandler` and `MakeSignalHandler`. Cleanup function handler was introduced after boost signals handler, so original naming didn't make much sense. This just contains a move-only commit, and a rename commit. There are no actual code or behavior changes. This PR is an alternative to #26293, and solves the same issue of removing a boost dependency from the _util_ library. The advantages of this PR compared to #26293 are that it keeps the source directory structure more flat, and it avoids having to change #includes all over the codebase. ACKs for top commit: hebasto: ACK b19c412 Tree-SHA512: b3a1d33eedceda7ad852c6d6f35700159d156d96071e59acae2bc325467fef81476f860a8855ea39cf3ea706a1df2a341f34fb2dcb032c31a3b0e9cf14103b6a
This came up in #26196: #26196 (comment). Opening this as a draft for the minute, to point to from another PR.
Ultimately the goal here (aside from common quite possibly being a better home for this code) is to move the Boost Signals2 using code out of libbitcoin_util, which is/will be used by the kernel.
When this is done, we can drop
$(BOOST_CPPFLAGS)from libbitcoin_util (last commit).