-
Notifications
You must be signed in to change notification settings - Fork 22
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
multi: remove Pool, Loop and Faraday deps from main LNC module #66
Conversation
63a4c71
to
ceda9eb
Compare
ceda9eb
to
0c3ee4e
Compare
@ellemouton I would try to see if I could update the version of gomobile used here: https://github.com/lightninglabs/lightning-node-connect/blob/master/.github/workflows/main.yml#L52 |
@kaloudis, thanks but I tried using |
b2b871f
to
a2d30b7
Compare
ok, managed to get the linter working by making use of |
70e0b79
to
6d3cf8e
Compare
To prevent version incompatabilities in upcoming commits, we change the aperture version here to a version that uses a tor version supported by lnd v0.15.5-beta.
In this commit, the MailboxRPCConnection function is renamed and moved out of the core package and into the mailbox package.
Update the go version used by Dockerfile-wasm along with the go version used by Github actions.
6d3cf8e
to
c458647
Compare
Nice job! WASM and Android appear to be building now |
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
c458647
to
f591ff6
Compare
cool - updated this to point to the merged Lit PR 👍 |
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.
Very nice! Only two comments around init()
.
cmd/wasm-client/main.go
Outdated
|
||
func init() { | ||
var err error | ||
permsMgr, err = perms.NewManager(true) |
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.
I'm not sure init()
works correctly with WASM. Can we do that at the beginning of main()
instead?
I guess we should also test the changes with the demo HTTP page.
mobile/mobile.go
Outdated
|
||
func init() { | ||
var err error | ||
permsMgr, err = perms.NewManager(true) |
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.
Same here, not sure if the mobile framework calls init()
. Could be in InitLNC
(after the mutex, with a nil check in case it was already initialized).
@guggero , I did test the wasm client with the example page to make sure that the permissions manager works as expected 👍 So is it ok to leave the @kaloudis - could you test if the |
Hmm, I remember there being an issue with |
In this commit, the dependency on the core package is removed and hence the imports of loop, pool and faraday are also removed from LNC. The mobile and wasm-clients now instead import the permissions and JsonCallbacks that they need from Litd.
f591ff6
to
34664e6
Compare
cool cool - updated to remove the |
Very nice! Waiting with merge until we have a confirmation that everything works on mobile as expected. |
^ cc @kaloudis 🙏 📱 |
Awesome, thanks for confirming! |
The main goal of this PR is to remove the Pool, Loop and Faraday dependencies from the main LNC module.
This is done by converting the
mobile
package into a go module and then letting it and thewasm-client
module import Litd permissions and JSON callback registrations from Litd itself rather from thecore
package. The core package is then removed.Depends on lightninglabs/lightning-terminal#476
Replaces #65