From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 2E69769C1A for ; Tue, 23 Mar 2021 19:23:30 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1696B32328 for ; Tue, 23 Mar 2021 19:23:00 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [212.186.127.180]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 01E4232318 for ; Tue, 23 Mar 2021 19:22:59 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id BB8FE46399 for ; Tue, 23 Mar 2021 19:22:58 +0100 (CET) Date: Tue, 23 Mar 2021 19:22:27 +0100 (CET) From: Dietmar Maurer To: Thomas Lamprecht , Wolfgang Bumiller Cc: pmg-devel@lists.proxmox.com Message-ID: <79994563.854.1616523747514@webmail.proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Priority: 3 Importance: Normal X-Mailer: Open-Xchange Mailer v7.10.5-Rev5 X-Originating-Client: open-xchange-appsuite X-SPAM-LEVEL: Spam detection results: 0 AWL 0.109 Adjusted score from AWL reputation of From: address KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pmg-devel] applied: [PATCH] panel/acme-domains: fix cyclic dependency in view model X-BeenThere: pmg-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Mail Gateway development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Mar 2021 18:23:30 -0000 > So, if on evaluation a get(X) is missed due to it being not always called, > like with boolean statements where a single truthy is enough for an or expression > like above, that data dependency is lost and one may see bug like behaviour. > > Use intermediate variables to combat that, for example, above `accountValueHidden` > formula should read: > > accountValueHidden: (get) => { > let editable = get('accountEditable'), available = get('accountsAvailable'); > return !editable || !available; > }, I guess a good JIT can still optimize that away?