-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UI5 linter gives "Maximum call stack size exceeded" error for defineProperty call #75
Comments
This is caused by the following kind of Object.defineProperty(globalThis, "myProp", {
configurable: "false",
writable: "true",
value: window.location.search
}); If a call like this is contained in any file of the project (e.g. a test file), any other file that accesses
I suspect this is a known TypeScript issue: microsoft/TypeScript#55889 Interestingly, there are multiple ways to work around it by changing the relevant code to any of the following options: Option AUse a variable var locationSearch = window.location.search;
Object.defineProperty(globalThis, "myProp", {
configurable: "false",
writable: "true",
value: locationSearch
}); Option BUse Object.defineProperty(window, "myProp", {
configurable: "false",
writable: "true",
value: window.location.search
}); Option CUse Object.defineProperty(globalThis, "myProp", {
configurable: "false",
writable: "true",
value: globalThis.location.search
}); |
@RandomByte will have another look into respective findings |
I checked the newly reported findings and found them to have the same root cause as described in #75 (comment) |
microsoft/TypeScript#55889 has been resolved. We should re-test with TypeScript 5.8 once released. |
I can still reproduce the issue with the current |
I think our issue is more complex as it only appears in combination with our |
Expected Behavior
UI5 linter should process our project without running into an internal error.
Current Behavior
When executing the UI5 linter on one of our projects, we see a "Maximum call stack size exceeded" error.
Steps to Reproduce the Issue
I can't share internal URLs here. I'll provide the information via a different channel.
Context
unknown
Linux (no further details known)
n/a
nothing
Log Output / Stack Trace
The text was updated successfully, but these errors were encountered: