Arbitrary Strings Not Properly Encodable.
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 30/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Domínio
- testing
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- PureScript
- Estrelas
- 108
- Forks
- 42
- Merge médio
- 2d 23h
- PRs com merge (30d)
- 1
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Sem guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de purescript/purescript-quickcheck
-
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 35/100
purescript/purescript-quickcheck#136 · 1 comentário ·
-
Lazy List Arbitrary InstanceTalvez já em andamento @eviefp assumiu há 2207 dias. Abertatype: enhancement
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 20/100
purescript/purescript-quickcheck#111 · 2 comentários · 2 reações ·
-
type: documentation
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 55/100
-
purs-0.15 type: breaking change
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 20/100
purescript/purescript-quickcheck#104 · 12 comentários ·
-
ShrinkingAbertatype: enhancement
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 15/100
purescript/purescript-quickcheck#103 · 6 comentários · 4 reações ·
Todas as issues de purescript/purescript-quickcheck
Issues semelhantes
-
[prefer-expect-resolves] autofix leaves a stray ")" when the awaited expression is parenthesizedAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
jest-community/eslint-plugin-jest#2052 ·
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
johanhaleby/occurrent#1505 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
jeanibarz/knowledge-base-mcp-server#1262 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
future-agi/future-agi#4092 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia