Create interface drops attributes in front of type declarations
Les mainteneurs répondent en général sous 1 jour
Une pull request liée a déjà été fusionnée.
- #9096 par @cknitt — fusionnée
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 58/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- ocaml
- Domaine
- developer-experience
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- OCaml
- Étoiles
- 7.5k
- Forks
- 484
- Merge moyen
- 20 h 19 min
- PR mergées (30 j)
- 242
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de rescript-lang/rescript
-
Record coercion can construct a private record from outside its modulePeut-être pris @cknitt l’a pris il y a 1 jour. Ouverte
Difficulté 4/5 1-2 jours Accessibilité débutants 52/100
rescript-lang/rescript#9124 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 3/5 1-2 jours Accessibilité débutants 56/100
rescript-lang/rescript#9123 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 4/5 1-2 jours Accessibilité débutants 55/100
rescript-lang/rescript#9122 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 15/100
rescript-lang/rescript#9109 ·
Les mainteneurs répondent en général sous 1 jour
-
Formatter: five cases where comments and doc comments are placed wronglyPeut-être pris @cknitt l’a pris il y a 1 jour. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
rescript-lang/rescript#9107 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de rescript-lang/rescript
Issues similaires
-
Add 'upm' tag on githubOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
-
🐛 tunnel diag: Docker log collection deadlocks when the container's stderr log exceeds 64 KiBOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
cloudflare/cloudflared#1783 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 63/100
leecade/caniuse_local#12 ·
-
b:minor bug
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
software-mansion/argent#1698 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
objectionary/jeo-maven-plugin#1933 ·
Les mainteneurs répondent en général sous 2 jours