Add assertion passes

Abierto
#2,158 7 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
20/100
Tipo de issue
Refactorización
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
python
Área
compilers

Línea de trabajo

Start with the linked Implementation Overview, especially the type checker's passes and the semantic analysis phase. The issue has no concrete design or files identified, so first define the assertion boundaries, checks, and expected post-conditions in the discussion. Done means an agreed design and implemented checks that catch invalid pass transitions without cluttering normal code.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

priority-2-low refactoring

(Stealing text from #2150)

It would be nice to have "assertion passes" between the different passes, to verify and document the post-conditions of each pass and pre-conditions of the next, without adding more clutter to the code. Examples (due to Jukka):

We could, for example, verify that unbound types don't leak from semantic analysis, and that every name expression refers to something after semantic analysis.

In addition, currently breaking something in e.g. the semantic analysis pass, is likely to result in a seemingly unrelated error message in latter phases. Of course it cannot be completely avoided, but it can be reduced.

I don't have any concrete design in mind. My intention is that the scope, nature, design and other details are to be fleshed out in this thread. The idea is very half-baked, so I'm looking forward for your comments.

Lenguaje dominante
Python
Estrellas
20.6k
Forks
3.3k
Merge medio
1 d 18 h
PR fusionados (30 d)
54

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de python/mypy

Todos los issues de python/mypy

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.