Arbitrary Strings Not Properly Encodable.
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 30/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Bereich
- testing
Rechercherichtung
Start by locating the Arbitrary instances for strings and characters in the repository, then inspect how generated UTF-16 code units are used by the existing tests. The issue proposes generating strings from code points or restricting the character range to U+0000–U+D7FF; determine which approach fits the library and verify the encoding behavior with the reported text encoding work.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Hi Folks, I have ongoing work to deal with string encoding for the purpose of supporting cryptography in purescript, and I am attempting to isolate the cause of the problem I encounter.
I suspect currently that the cause of the problem is actually in the way that quickcheck generates strings via Arbitrary. That is to say, that generating randomly ordered CodeUnits (purescript Char), is not truly compliant with the way UTF-16 strings should be encoded. If we wanted to join randomly generated strings, these should be the (potenitially) multi code-unit strings, aka CodePoints.
I think the best solution would be to redefine arbitrary string such that it is generated from Code Points, not Code Units. Failing this however, a "quick and dirty" solution would be to redefine the char range used to generate strings to always fall within the U+0000 to U+D7FF range. (Represented identically between their code point and code unit).
I will be happy over the weekend to write the PR should I find time and there are no objections raised here. It will also be used to verify my theory by using it with existing text encoding work I've done.
- Vorherrschende Sprache
- PureScript
- Sterne
- 108
- Forks
- 42
- Ø Merge
- 2 T. 23 Std.
- Gemergte PRs (30 T.)
- 1
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Kein Beitragsleitfaden
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 purescript/purescript-quickcheck
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 35/100
purescript/purescript-quickcheck#136 · 1 Kommentar ·
-
Lazy List Arbitrary InstanceEvtl. vergeben @eviefp hat das vor 2207 Tagen übernommen. Offentype: enhancement
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 20/100
purescript/purescript-quickcheck#111 · 2 Kommentare · 2 Reaktionen ·
-
type: documentation
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 55/100
-
purs-0.15 type: breaking change
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 20/100
purescript/purescript-quickcheck#104 · 12 Kommentare ·
-
ShrinkingOffentype: enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 15/100
purescript/purescript-quickcheck#103 · 6 Kommentare · 4 Reaktionen ·
Alle Issues in purescript/purescript-quickcheck
Ähnliche Issues
-
[prefer-expect-resolves] autofix leaves a stray ")" when the awaited expression is parenthesizedOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
jest-community/eslint-plugin-jest#2052 ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
johanhaleby/occurrent#1505 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
jeanibarz/knowledge-base-mcp-server#1262 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
future-agi/future-agi#4092 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag