Binary test data is not fully covered by .gitattributes and can be mangled by EOL conversion
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 78/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- git
- Bereich
- tooling
Rechercherichtung
Beginne mit .gitattributes und prüfe die bestehenden Binärregeln zusammen mit TestCommon/Data. Verwende git check-attr für die aufgeführten Unity-Datendateien und verifiziere, dass README.md-Dateien Text bleiben. Bestätige mit git diff --numstat und SHA-256-Vergleichen, dass die gewählte Regel die EOL-Konvertierung verhindert, ohne bestehende committete Inhalte zu ändern.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Binary test data under TestCommon/Data is only partly covered by the binary rules in
.gitattributes, so some of it is stored as text and is exposed to end-of-line conversion.
.gitattributes sets * text=auto eol=lf and then names specific binary paths:
assetbundle binary
scenes binary
level* binary
*.dll binary
*.dylib binary
*.so binary
...
Unity data files whose names do not match those patterns fall through to text=auto, which leaves
the decision to git's heuristic — and that only looks for a NUL byte in the first 8000 bytes.
sharedassets0.assets.resS is the clearest case. It is 512 KB with just 8 NUL bytes, none of them
early, so git classifies it as text:
$ git check-attr -a TestCommon/Data/PlayerWithTypeTrees/sharedassets0.assets.resS
... text: auto
... eol: lf
$ git diff --numstat <commit-that-added-it>
1 0 TestCommon/Data/PlayerWithTypeTrees/sharedassets0.assets.resS
(A file git considered binary shows - - there, as the .assets and level* files in the same
folder do.)
Nothing is corrupted today. Both checked-in .resS files happen to contain zero CR bytes, so
eol=lf normalization is a no-op and they round-trip byte for byte — verified by comparing the
SHA-256 of the blob in git against the source file. This is a latent hazard, not a live bug.
The risk is the next binary fixture whose bytes happen to include 0d 0a. On checkout it would
have those bytes rewritten to 0a, producing a corrupt file that still looks plausible, and the
resulting test failure would point at the parser rather than at git. Anything without an extension
already covered by a binary rule is affected — .resS, .resource, .assets, .bundle,
.buildreport, .cf, and the extensionless CAB-* files.
Suggested fix: mark the data folder's binary formats explicitly, e.g.
TestCommon/Data/** -text
or per-extension binary rules for *.resS, *.resource, *.assets, *.bundle, *.buildreport,
*.cf alongside the existing ones. Worth checking afterwards that no already-committed file changes
content (they should not — the ones that would have been mangled are the ones that do not exist
yet), and that the README.md files inside TestCommon/Data are not caught by a blanket rule.
Found while adding Unity 6.7 test data in #145, where the new .resS reproduced the same
classification.
- Vorherrschende Sprache
- C#
- Sterne
- 829
- Forks
- 72
- Ø Merge
- 23 Std. 24 Min.
- Gemergte PRs (30 T.)
- 14
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus Unity-Technologies/UnityDataTools
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Unity-Technologies/UnityDataTools#138 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Unity-Technologies/UnityDataTools#116 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Unity-Technologies/UnityDataTools#93 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 52/100
Unity-Technologies/UnityDataTools#139 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
Unity-Technologies/UnityDataTools#127 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in Unity-Technologies/UnityDataTools
Ähnliche Issues
-
[Bug]: Missing extensions in Agent Card capabilities in v0.3 compat modeEvtl. vergeben @hwanders hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
a2aproject/a2a-dotnet#514 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
agentic-workflows untriaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
VS Code
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
AlamoEngine-Tools/pg-starwarsgame-lsp#207 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
elsa-workflows/elsa-core#8593 ·
Maintainer antworten meist innerhalb von 1 Tag
-
GpioController.QueryComponentInformation() throws NotSupportedException with RaspberryPi3DriverOffenuntriaged
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100