ITADN

[Report] Library build differences between Linux and Windows environments

#9858Openpmario 创建于 2026-05-23
improvementactionable:code
P
pmariocommented
`$tw.loadPluginFolder` packs `pluginInfo.tiddlers` in `fs.readdir()` order, which differs between Windows and Linux. Rebuilding the same plugin library on a different OS produces byte-different `text` fields (same keys, same values, different key order) — every plugin shows up as a huge one-line diff in git for no real change. **Location:** `boot/boot.js` in `$tw.loadPluginFolder`: **Current State:** ```js pluginInfo.text = JSON.stringify({tiddlers: pluginInfo.tiddlers}); ``` **Possible Fix:** Needs to be tested ``` var sorted = Object.create(null); Object.keys(pluginInfo.tiddlers).sort().forEach(function(t) { sorted[t] = pluginInfo.tiddlers[t]; }); pluginInfo.text = JSON.stringify({tiddlers: sorted}); ``` ----------- **Same bug** exists in `core-server/commands/makelibrary.js` and needs the same fix.
0 条评论