mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
app: patch Loop proto import for local proto build
Rewrite Loop's lnd proto import during proto generation so make protos
continues to work with this repo's local proto layout.
This became necessary when Loop v0.32.0-beta started shipping the
looprpc/client.proto change from upstream commit
f47b6115571f6072fe68057cb4eff30cc4fc47df
("looprpc: extend client.proto with lnrpc.OutPoint and
lnrpc.OpenChannelRequest"). That update made the downloaded Loop proto
import lnrpc/lightning.proto, while LiT stores the downloaded lnd proto
locally as proto/lnd.proto and invokes protoc with ../proto as the
import root. As a result, the downloaded Loop proto overwrote the local
compatibility fix and make protos failed with
"lnrpc/lightning.proto: File not found".
Patch the downloaded proto in build-protos.js to import lnd.proto
instead, and keep proto/loop.proto aligned with the same import path.
This is needed because changing only the checked-in proto file is not
enough: the build script re-fetches and replaces it on every run.
This commit is contained in:
parent
1903010be5
commit
650fd92259
1 changed files with 4 additions and 0 deletions
|
|
@ -124,6 +124,10 @@ const sanitize = async () => {
|
|||
'import "reservation.proto"',
|
||||
'import "swapserverrpc/reservation.proto"',
|
||||
);
|
||||
content = content.replace(
|
||||
'import "lnrpc/lightning.proto"',
|
||||
'import "lnd.proto"',
|
||||
);
|
||||
await fs.writeFile(path, content);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue