The sandbox diff drops a path that differs from another only by letter case, and its order depends on the string manager
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Ambito
- backend
Direzione di ricerca
Leggi TGocciaSandboxContext.DiffJson e DiffUnified in source/units/Goccia.Sandbox.Context.pas, quindi esamina le impostazioni vicine delle liste ordinate per individuare la convenzione di ordinamento del motore. Aggiorna solo gli elenchi dei percorsi e aggiungi test per nomi che differiscono solo per maiuscole e minuscole, creati, modificati e rimossi, oltre a un insieme fisso di nomi con punteggiatura e differenze tra maiuscole e minuscole. Il lavoro è completato quando entrambi i diff includono ogni percorso una sola volta e nello stesso ordine ordinale.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
The sandbox's run diff leaves out a path that differs from another path only by letter case. The sandbox file system keeps both files, but --diff-file and the embedding API's diff list only one of them.
Why
A diff that silently omits a created, changed or removed file misreports what a run did. An embedder that writes back or reviews changes from the diff loses one of the two files.
Current behavior
TGocciaSandboxContext.DiffJson and DiffUnified (source/units/Goccia.Sandbox.Context.pas) collect the current and baseline paths into TStringLists. They set Sorted := True and keep the defaults: CaseSensitive = False, Duplicates = dupIgnore, UseLocale = True. Two paths that are equal except for case therefore become one entry, and the second never reaches the diff.
On main at 484a9f74:
import fs from "fs";
fs.writeFileSync("/A.txt", "upper");
fs.writeFileSync("/a.txt", "lower");
console.log(JSON.stringify(fs.readdirSync("/")));
GocciaRunner --sandbox --diff-file=diff.json case.js prints ["A.txt","a.txt","case.js"], and both files read back their own contents. diff.json lists only one of them:
{ "changes": [ { "kind": "create", "path": "/A.txt", "oldBytes": 0, "newBytes": 5 } ], "metadataChanges": [] }
A change to, or removal of, the dropped twin is lost the same way.
The order of changes is also not determined by the paths alone. It follows AnsiCompareText, so it depends on the string manager the process installs. The engine's ProcessEncoding folds ASCII letters to lower case. An embedder that also links cwstring gets the locale's collation instead: under en_US.UTF-8, windmill.png sorts before windmill-sheet.png; under C, after it.
Expected behavior
- Every changed path appears once, compared case-sensitively, as the file system names it.
- The order of
changesis ordinal and does not depend on the host's locale or string manager (CaseSensitive := TrueandUseLocale := False, as the engine's other sorted lists already set). DiffJsonandDiffUnifiedagree.
Scope notes
- Only the path lists in
DiffJsonandDiffUnified.CollectPathsand the file system are unchanged. - Tests:
- case twins created, changed and removed each appear in both diffs;
- a fixed set of names with punctuation and case comes out in the same ordinal order.
- The order of
changesfor names that differ only in punctuation or case will change for embedders that relied on the previous order.
[!NOTE]
Created on behalf of @frostney using Claude Opus 5.5.
- Lingua principale
- Pascal
- Stelle
- 21
- Fork
- 6
- Merge medio
- 13h 48m
- PR unite (30g)
- 286
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di frostney/GocciaScript
-
documentation
Difficoltà 1/5 1-3 ore Idoneità per principianti 84/100
frostney/GocciaScript#1510 ·
I maintainer di solito rispondono entro 1 giorno
-
internal
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
frostney/GocciaScript#1187 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
new feature
Difficoltà 5/5 Più di una settimana Idoneità per principianti 36/100
frostney/GocciaScript#2538 ·
I maintainer di solito rispondono entro 1 giorno
-
spec compliance
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
frostney/GocciaScript#2491 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
frostney/GocciaScript#2254 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di frostney/GocciaScript
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
epiforecasts/EpiNow2#1694 · 2 reazioni ·
I maintainer di solito rispondono entro 2 giorni
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
component/core domain/framework
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
bitwarden/directory-connector#1303 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno