-
Notifications
You must be signed in to change notification settings - Fork 873
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
Move IPFS pinning related code behind local node build flag #16866
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -47,13 +48,15 @@ class IPFSJSONParser { | |||
static std::string RemovePeerFromConfigJSON(const std::string& json, | |||
const std::string& peer_id, | |||
const std::string& address); | |||
#if BUILDFLAG(ENABLE_IPFS_LOCAL_NODE) | |||
// Local pins | |||
static absl::optional<ipfs::AddPinResult> GetAddPinsResultFromJSON( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably guard header includes for these *PinResult structs too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want to take it even further then, right? There are instances of including ipfs_local_pin_service
for instance in the brave_wallet
component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, for any headers that's only built when ENABLE_IPFS_LOCAL_NODE is true should be guarded with it. cc @cypt4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added guards to headers and moved the pin service in wallet to be behind buildflag
@@ -968,6 +968,7 @@ void IpfsService::OnPreWarmComplete( | |||
std::move(prewarm_callback_for_testing_).Run(); | |||
} | |||
|
|||
#if BUILDFLAG(ENABLE_IPFS_LOCAL_NODE) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should guard the declarations in the header file too.
782be7f
to
4abf8ec
Compare
4abf8ec
to
2d5f62e
Compare
supersede by #16873 |
Small build regression fix from #16073
Resolves
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
wikinpm run lint
,npm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: