Arbitrary Strings Not Properly Encodable.
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 30/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 领域
- testing
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- PureScript
- 星标
- 108
- 派生
- 42
- 平均合并
- 2 天 23 小时
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
purescript/purescript-quickcheck 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 35/100
purescript/purescript-quickcheck#136 · 1 条评论 ·
-
Lazy List Arbitrary Instance可能已有人在做 @eviefp 于 2207 天前认领。 未关闭type: enhancement
难度 3/5 1-2 天 新手友好度 20/100
purescript/purescript-quickcheck#111 · 2 条评论 · 2 个 reaction ·
-
type: documentation
难度 1/5 1 小时以内 新手友好度 55/100
-
purs-0.15 type: breaking change
难度 5/5 一周以上 新手友好度 20/100
purescript/purescript-quickcheck#104 · 12 条评论 ·
-
Shrinking未关闭type: enhancement
难度 5/5 一周以上 新手友好度 15/100
purescript/purescript-quickcheck#103 · 6 条评论 · 4 个 reaction ·
查看 purescript/purescript-quickcheck 的全部 Issue
相似的 Issue
-
[prefer-expect-resolves] autofix leaves a stray ")" when the awaited expression is parenthesized未关闭
难度 2/5 1-3 小时 新手友好度 78/100
jest-community/eslint-plugin-jest#2052 ·
-
难度 1/5 1 小时以内 新手友好度 88/100
johanhaleby/occurrent#1505 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
jeanibarz/knowledge-base-mcp-server#1262 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
future-agi/future-agi#4092 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复