array()'s cached string representation can go out of sync
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 25/100
Piste de recherche
Commencez par suivre le cache de représentation sous forme de chaîne de array() et le comportement de marquage dirty des éléments parents à l’aide des deux exemples de reproduction de l’issue. Comparez la sortie mise en cache avec le tableau sous-jacent et les valeurs primitives mutables après une mutation. La tâche est terminée lorsque les messages répétés ne renvoient plus de représentations obsolètes et que le comportement de mise en cache choisi est couvert par des tests.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
The cache used for array() its string representation runs out of sync with the actual array data in the following examples:
@a = array(1);
@b = array(@a);
@c = array(@a);
msg(@b); // Caching happens here, result is `{{1}}`.
msg(@c); // Caching happens here, result is `{{1}}`.
@a[0] = 2; // The array marks its last parent's cache as dirty, but not its other parent.
msg(@b); // Return cached result `{{1}}`, which is wrong at this point.
msg(@c); // Re-cache, returning the actual result `{{2}}`.
@a = mutable_primitive('test');
@b = array(@a);
msg(@b); // Caching happens here, result is `{test}`.
@a[] = 'newValue';
msg(@b); // Return cached result `{test}`, which is wrong at this point.
For arrays, marking all parents as dirty can be a solution (whereas it currently only marks the last parent as dirty). For mutable primitives, or user objects, the solution is not trivial. In my opinion, we could go without caching array string representations as soon as #1225 is merged and a similar solution for not sconcatting all code together is implemented in non-strict mode. I believe that arrays are not often used as their string representation, and if they are, they are rarely used twice (in which case the cache would improve performance).
- Langage dominant
- Java
- Étoiles
- 128
- Forks
- 70
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de EngineHub/CommandHelper
-
discussion wanted documentation
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
EngineHub/CommandHelper#1403 ·
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
EngineHub/CommandHelper#1370 · 1 commentaire ·
-
bug
Difficulté 4/5 3-5 jours Accessibilité débutants 35/100
EngineHub/CommandHelper#1354 ·
-
bug
Difficulté 4/5 3-5 jours Accessibilité débutants 45/100
EngineHub/CommandHelper#1349 · 3 commentaires ·
-
bug
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 25/100
EngineHub/CommandHelper#1341 · 2 commentaires ·
Toutes les issues de EngineHub/CommandHelper
Issues similaires
-
executions.Query — startDate and timeRange filters are sent with inverted comparison operators Ouvertearea/plugin
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
kestra-io/plugin-kestra#190 ·
-
litertlm-android AAR ships no consumer ProGuard rules → "mid == null" SIGABRT in minified apps Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
Add canonical URLs and a sitemap Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
apache/rocketmq-dashboard#5064 ·
-
Consent portal: creating a duplicate Purpose shows a generic error instead of "already exists" Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
wso2/dpdp-accelerator#287 ·