Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Non-exportable objects: Add support for future.globals.onReference=function(...) { }

Aperta
#335 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
35/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
r

Direzione di ricerca

Inizia dalla gestione esistente di future.globals.onReference e future:::reference_filters(), incluso il filtro ignore_envirs mostrato nell'issue. Definisci il contratto di ritorno del callback e il modo in cui interagisce con i tipi di riferimento accettati; il lavoro è completato quando il comportamento è specificato e supportato in modo coerente.

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

Descrizione

enhancement

Currently, R option future.globals.onReference can take values:

  • "ignore" - don't check for non-exportable objects among globals (fastest)
  • "message" - produce a message when a non-exportable objects is detected
  • "warning" - produce a warning when a non-exportable objects is detected
  • "error" - produce an error when a non-exportable objects is detected

I think it could be useful to provide some further control to savvy users/developers out there. More precisely, support for something like:

options(future.globals.onReference = function(ref) {
   # accept / reject 'ref' based on inspect
   # Q: What should be returned?  Above `"ignore"`, ..., `"error"`, or TRUE/FALSE?
})

Having this in place would simplify enabling future.globals.onReference = "error" by default. For instance, if it turns out there are references that can indeed be exported (yet to be heard of), then we can fall back to above filter.

OTH, there's alteady an internal future:::reference_filters() function that allows us to set, add, drop, reset the list of accepted reference types, e.g. (the following is already set)

future:::reference_filters("append", ignore_envirs = function(ref, typeof, class, ...) {
  typeof != "environment"
})

Maybe this is enough for now?

Lingua principale
R
Stelle
1k
Fork
93
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

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 futureverse/future

Tutte le issue di futureverse/future

Issue simili

Altre issue su R

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.