Never seeing the first progress message from `cli_progress_along()`

Aperta
#668 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
r
Ambito
cli

Direzione di ricerca

Start by reproducing the issue with cli_progress_along(1:2) and the format shown in the report, then trace the cli_progress_along() entry point and its progress-update timing. Confirm the behavior across both iterations. Done means the first progress message appears for the first iteration and subsequent messages correspond to the current iteration.

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

Descrizione

bug tidy-dev-day :nerd_face:

cli_progress_along() seems to be skipping the first iteration, and after 2 seconds, the function outputs the message regarding the first iteration even though it is on the second?
 

library(cli)
lapply(cli_progress_along(1:2, 
                        format = "Downloading data file {cli::pb_current}"),
     function(i) {
Sys.sleep(2)
})
#> Downloading data file 1
#> [[1]]
#> NULL
#> 
#> [[2]]
#> NULL

Created on 2024-02-02 with reprex v2.0.2

Lingua principale
R
Stelle
726
Fork
94
Merge medio
3h 35m
PR unite (30g)
1

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

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 r-lib/cli

Tutte le issue di r-lib/cli

Issue simili

Altre issue su R

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.