[SERVER-82621] Shadowing declaration of 'version' in jstest Created: 31/Oct/23  Updated: 05/Feb/24

Status: Open
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Mathis Bessa Assignee: Matt Broadstone
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to SERVER-74787 Prepare jstest corpus to be run in st... Closed
Operating System: ALL
Sprint: Service Arch 2023-12-25, Service Arch 2024-01-08, Service Arch 2024-01-22, Service Arch 2024-02-05, Service Arch 2024-02-19
Participants:
Linked BF Score: 153

 Description   

We recently had an issue where a jstest introduced the following code : 

const version = db.version().split('.');

Which resulted in 

ReferenceError: can't access lexical declaration 'version' before initialization

(see this comment for more details)

This seems to be caused because globalThis.connect uses version() instead of globalThis.version().

We should fix this by calling globalThis.version() here instead.

 


Generated at Thu Feb 08 06:49:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.