Make `UnexpectedNilError` un-rescueable from tests
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
Comienza localizando UnexpectedNilError y la implementación de not_nil!, y luego inspecciona cómo el proyecto invoca minitest o RSpec. Determina cómo pueden los tests evitar que un rescue => e sin más oculte este error sin bloquear el test runner. Se considera terminado cuando el error sigue sin poder ser capturado por el código de test ordinario, mientras minitest y RSpec continúan ejecutándose.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
It currently inherits from Exception, so that a bare rescue => e doesn't unintentionally rescue it. We've already run into a real-world case where that proved useful, where a fork of the not_nil! implementation made it derive from StandardError, which indeed hid a test failure (only detected because we switched that copy of the code to use Type Toolkit).
To make it truly uncatchable, we can do something like throw Object.new. In a production app, this would crash your Rails app with UncaughtThrowError, so we'd have to limit it to tests. But we also don't want to crash minitest/RSpec, so we'd need to wrap the test runner in a catch call. We would need some kind of secret-ish tag to throw, that only the test runner can catch.
- Lenguaje dominante
- Ruby
- Estrellas
- 3
- Forks
- 5
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Shopify/type_toolkit
-
Enforce that `interface!` isn't called from a `class`Posiblemente ocupada @mliem2k la tomó hace 84 días. Abiertogood first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Shopify/type_toolkit#4 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Shopify/type_toolkit#45 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
Shopify/type_toolkit#14 ·
-
Allow abstract methods to be implemented via `method_missing`Posiblemente ocupada @kshtzkr la tomó hace 69 días. Abiertogood first issue
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Shopify/type_toolkit#11 · 3 comentarios ·
-
Delegate to super `abstract!` implementation, if anyPosiblemente ocupada @goshanraj-g la tomó hace 191 días. Abiertogood first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 52/100
Shopify/type_toolkit#10 ·
Todos los issues de Shopify/type_toolkit
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
forem/forem#23933 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Allow customizing the page titleAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
rails/mission_control-jobs#347 ·