allow for "budgets" as a deprecation handler
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
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript
- Ambito
- tooling
Direzione di ricerca
Inizia dalla configurazione del workflow in config/deprecation-workflow.js e verifica come sono configurati gli handler esistenti. Definisci come vengono tracciati i conteggi del budget, quando il superamento di un budget genera un errore e come i conteggi correnti possono essere copiati dal browser nella configurazione. Il lavoro è completato quando il comportamento di budget proposto funziona in esecuzioni controllate senza compromettere gli handler silence, log o throw.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Context
Currently, ember-cli-deprecation-workflow supports 3 handlers for deprecations:
| silence | Keeps this deprecation from spewing all over the console |
|---|---|
| log | Normal deprecation behavior runs for this deprecation and messages are logged to the console |
| throw | The error is thrown instead of allowing the deprecated behavior to run. WARNING: APPLICATION MAY GO 💥 |
While these work for their intended purposes really well, they don't necessarily help cases where you might not be able to address a deprecation right away, but a team wants to prevent the deprecation count from growing from things like copy-pasting code that will cause new deprecations to pile up.
Proposal
Users of this addon will be able to specify a budget option to the handler option for each deprecation. If the deprecation is triggered more than the allowed budget in certain scenarios (e.g. a test suite run where conditions are more controlled), then the handler will throw. This would allow a team to keep existing code that causes deprecations but fail builds in CI for any new code that increases deprecation use.
For example, take the following config/deprecation-workflow.js:
// config/deprecation-workflow.js
window.deprecationWorkflow = window.deprecationWorkflow || {};
window.deprecationWorkflow.config = {
workflow: [
{ matchId: 'ember-string-utils.fmt', handler: { budget: 10 } },
]
};
if a new pull request was opened with the following code:
Ember.String.format('some string %s', 'hi')
This would increase the number of deprecations invoked to 11, violating the budget, causing ember-cli-deprecation-workflow to throw, failing the build.
We would likely also need some facility to make copy/pasting the existing deprecation count (to set the initial budget) to config/deprecation-workflow.js from the browser easier as well.
I'd be happy to PR this, just wanted to get thoughts on the idea before going through the effort of writing code.
- Lingua principale
- JavaScript
- Stelle
- 166
- Fork
- 44
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di ember-cli/ember-cli-deprecation-workflow
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
ember-cli/ember-cli-deprecation-workflow#216 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
ember-cli/ember-cli-deprecation-workflow#208 · 3 commenti · 1 reazione ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
ember-cli/ember-cli-deprecation-workflow#195 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 38/100
-
documentation
Difficoltà 3/5 1-2 giorni Idoneità per principianti 42/100
ember-cli/ember-cli-deprecation-workflow#153 · 1 commento ·
Tutte le issue di ember-cli/ember-cli-deprecation-workflow
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
NationalSecurityAgency/skills-service#4052 ·
I maintainer di solito rispondono entro 1 giorno
-
documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
githubnext/gh-aw-workshop#4251 ·
I maintainer di solito rispondono entro 1 giorno
-
customer-support needs-triage Platform(Default)
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Leonxlnx/taste-skill#129 ·
I maintainer di solito rispondono entro 1 giorno