Missing and incorrect documentation and specs for atomvm:posix_* functions

Aperta
#2,029 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
55/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
erlang
Ambito
documentation

Direzione di ricerca

Read posix_nifs.c and the atomvm module documentation to identify the listed functions and compare their documented behavior with the NIF implementations. Add documentation and specs for the listed functions and atomvm:file_get_cwd/0, and correct the posix_write/2 reference; done when each named function is documented accurately and has a useful spec. No test file or test command is named in the issue.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

The documentation for atomvm:posix_write/2 states:

Write data to a file. Files are open non-blocking. ˋatomvm:posix_select_write/3` can be used to determine if the file can be written.

The function ˋatomvm:posix_select_write/3` does not seem to be implemented in posix_nifs.c

Several other nifs in posix_nifs.c are not documented, since these are not standard functions from an OTP module users will have no way of knowing they exist. These functions include:

  • atomvm:posix_closedir/1
  • atomvm:posix_mkfifo/2
  • atomvm:posix_select_read/2
  • atomvm:posix_select_write/2
  • atomvm:posix_select_stop/2
  • atomvm:posix_unlink/1

Also in the atomvm module atomvm:file_get_cwd/0 is lacking documentation.

As well as making the existence of these functions known to users, specs would be beneficial for dialyzer.

Lingua principale
Erlang
Stelle
2.3k
Fork
171
Merge medio
5g 11h
PR unite (30g)
19

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di atomvm/AtomVM

Tutte le issue di atomvm/AtomVM

Issue simili

Altre issue su Documentation

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.