binaryage / binaryage/cljs-devtools

Detection of support for custom formatters doesn't work

Abierto
#80 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Clojure
Estrellas
1.1k
Forks
51
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Hi,

The mechanism used to detect support for custom formatters doesn't work. It will always report that custom formatters are not supported or that support is disabled. This is due to the fact that the detection mechanism relies on the application of a custom formatter when strings are logged to the console. However, custom formatters are not applied when logging strings. They are only applied when logging objects.

Executing the following statements in the console will demonstrate this:

```
window.devtoolsFormatters = [{"header": () => {console.count("formatter"); return null;}}]
console.log("string")
console.log({})
```

You'll see that the counter "formatter" is only increased once, when the last statement is executed. I see the same behavior using both Chrome and Firefox.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Reproduce the issue with the window.devtoolsFormatters and console.log statements shown in the report, using Chrome or Firefox. Locate the detection mechanism that applies a custom formatter during logging and trace how it determines support. Done means detection no longer reports custom formatters as unsupported or disabled when object formatting is available.

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

Evaluación

Stack tecnológico
clojure
Área
tooling
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
48/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.