Create interface drops attributes in front of type declarations
Mantenedores costumam responder em até 1 dia
Um pull request relacionado já foi integrado.
- #9096 de @cknitt — integrado
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 58/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- ocaml
- Domínio
- developer-experience
Direção de pesquisa
Start at the editor's "Create interface file" command and trace how it copies type declarations into the generated .resi. Check how source locations handle attributes before type, then compare the generated signature with the implementation for the @tag example. Done means the generated interface preserves representation attributes such as @tag and passes the signature check.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Create interface (the editor's "Create interface file" command) drops attributes written in front of a type declaration:
@tag("kind") type tagged = A(int)
gives
type tagged = A(int)
The type declaration is copied from the source starting at its location, which begins at type, after the attributes in front of it, so they are replaced by spaces. For @tag (and likewise @unboxed and other representation attributes) the generated .resi then no longer matches the implementation, because the signature check compares the variant's tag name.
This happens without any functor involved, also on master. Found while reviewing #9077, part of #9074.
- Linguagem predominante
- OCaml
- Estrelas
- 7.5k
- Forks
- 484
- Merge médio
- 21h 9min
- PRs com merge (30d)
- 255
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o 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 rescript-lang/rescript
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
rescript-lang/rescript#9135 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
rescript-lang/rescript#9132 ·
Mantenedores costumam responder em até 1 dia
-
Printed type declarations drop @tag, @notUndefined and runtime annotationsTalvez já em andamento @cknitt assumiu hoje. Aberta
Dificuldade 4/5 1-2 dias Facilidade para iniciantes 25/100
rescript-lang/rescript#9134 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 35/100
rescript-lang/rescript#9130 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 4/5 1-2 dias Facilidade para iniciantes 55/100
rescript-lang/rescript#9122 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de rescript-lang/rescript
Issues semelhantes
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
dekobon/big-code-analysis#1729 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
solana-foundation/solana-web3.js#4015 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
area: dependencies auto-generated cwe: 400 dependencies ecosystem: npm help wanted package: glob scope: runtime security security-alert severity: medium source: dependabot supply-chain vulnerability
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
tdk-landscape/tdk-cli-core#2814 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
danielmiessler/LifeOS#2490 ·
Mantenedores costumam responder em até 9 dias
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
chapel-lang/chapel-vscode#158 ·
Mantenedores costumam responder em até 1 dia