Skip to content

Commit

Permalink
Upgrade dugite Dependency (2.5.1->2.7.1) to Resolve Linux Build Issues (
Browse files Browse the repository at this point in the history
logseq#11550)

### Overview

This PR addresses a build failure encountered on Linux systems within the Logseq DB branch. The issue stems from a hash mismatch in the dugite dependency, which prevents successful builds. By upgrading dugite to the latest stable version, this PR aims to resolve the build errors without introducing any regressions.

Problem Description

Over the past few days, attempts to build logseq-desktop on Linux have consistently failed due to a hash mismatch error in the dugite package. Below is the error log for reference:
```sh
error /tmp/makepkg/logseq-desktop-git/src/logseq-desktop-git/static/node_modules/dugite: Command failed.
Exit code: 1
Command: node ./script/download-git.js
Arguments: 
Directory: /tmp/makepkg/logseq-desktop-git/src/logseq-desktop-git/static/node_modules/dugite
Output:
Validation failed. Expected '78375b97c802caa33c4ab585e3cf113001f0f53d0ab623ef0086e7c5b819189d' but got '1605228e7cad9e7229a8ff992b8c100caaf632323402dd64475efd33ee8acc01'
/tmp/makepkg/logseq-desktop-git/src/logseq-desktop-git/static/node_modules/dugite/script/download-git.js:123
          rmSync(tempFile)
          ^

ReferenceError: rmSync is not defined
    at /tmp/makepkg/logseq-desktop-git/src/logseq-desktop-git/static/node_modules/dugite/script/download-git.js:123:11
    at Hash.<anonymous> (/tmp/makepkg/logseq-desktop-git/src/logseq-desktop-git/static/node_modules/dugite/script/download-git.js:18:5)
    at Hash.emit (node:events:529:35)
    at finish (node:internal/streams/writable:748:10)

```

I acknowledge that building the db branch locally is not the recommended testing method. However, this approach facilitates my workflow by integrating custom scripts for window layout management. Rest assured, all issues I report are still reproduced and verified on official testing builds such as test.logseq.com and db-demo.logseq.com before any bug reports are submitted.


This error is easy to fix by upgrading the duglite dependency. I have been using this fix for the last few commits over the past two days and there are no issues with the change.

Please consider accepting this PR i.e. upgrading duglite if it doesn't affect anything else.

Changelog:
https://github.com/desktop/dugite/releases
  • Loading branch information
Bad3r authored Dec 4, 2024
1 parent d0a6ebf commit 39a1b95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion resources/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"chokidar": "^3.5.1",
"command-exists": "1.2.9",
"diff-match-patch": "1.0.5",
"dugite": "2.5.1",
"dugite": "2.7.1",
"electron-deeplink": "1.0.10",
"electron-dl": "3.3.0",
"electron-log": "4.3.1",
Expand Down

0 comments on commit 39a1b95

Please sign in to comment.