Check types of method/signal arguments and return values
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- ruby
- Área
- backend-api-design
Línea de trabajo
Start by reviewing the requirements for client and service method arguments and return values, signal delivery, and Properties.Set, along with related issue #97. Identify the existing client/service dispatch and introspection paths before deciding the scope. Done should include deliberate type errors with defined error behavior across the listed cases.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Both at the client and service side we should add type checking of method arguments and return values
(This is related to #97 which was specifically about properties)
-
Client method arguments, emitting signals: trying to use a string instead of an integer, or the other way around, will raise an exception before the bus sees the wrong type, but the exception is an implementation accident. It should be an explicit
type A was expected but type B was seen, in argument foo
(the the method and interface names will be easily seen from the backtrace)
-
Client return values: not trying to catch confused/malicious services for now
-
Service method arguments: this should be avoided by client libraries paying attention to introspection data and doing their own type checking (see (1)), but it is relatively easy to send a mistyped call. Here an example of passing an integer where a string is expected, the caller gets to see an exception caused by the wrong type:
$ dbus-send --print-reply --session --dest=org.ruby.service /org/ruby/MyInstance org.ruby.AnotherInterface.Reverse uint32:42 Error org.freedesktop.DBus.Error.Failed: undefined method `split' for 42:Integer outstr = instr.split(//).reverse.join ^^^^^^; caused by 1 sender=:1.1226 -> dest=org.ruby.service serial=2 reply_serial= path=/org/ruby/MyInstance; interface=org.ruby.AnotherInterface; member=Reverse error_name=TODO: find a well known error name+format for type errors
Listening for signals: what if someone sends a mistyped signal? Could be even pretty easy if the listener filters only on interface and not a well-known sender
Properties.Set with a wrong type: I know I said this was about methods, not properties, but I think this check is still missing :-(
-
Service return values: similar to (1)
- Lenguaje dominante
- Ruby
- Estrellas
- 174
- Forks
- 51
- 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 mvidner/ruby-dbus
-
Specify rexml versioningAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
-
Rexml or Nokogiri?Abierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
-
NetworkManager.Settings.Connection cannot round-trip, calling Update with what GetSettings returnedAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 45/100
-
UNIX_FD in practice?Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 32/100
Todos los issues de mvidner/ruby-dbus
Issues similares
-
Local evaluation buckets percentage splits with the server key, so results differ from FlagsmithAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
TheOdinProject/curriculum#31458 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
主催者以外(未ログイン含む)でもイベントを中止できてしまうAbiertobug priority: high
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
mitakarb/beerkeeper#1259 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día