Azure / Azure/monaco-kusto

Kusto bridge.js conflicts with SystemJS global

Open
#300 6 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
84
Forks
36
PR merge metrics
No merged PRs in 30d

Description

### Description

I'm not sure this is the right place to report this issue as the code appears to live in `@kusto/language-service` but I cannot find a repository related to that code.

When loading Kusto, `bridge.js` is loaded which contains `globals.System = {};` which deletes SystemJS from the global/window.

### Steps to Reproduce

It's gonna be a bit tricky to reproduce it. I'll try to put a sandbox together if needed however the offending code can be seen here:

![image](https://github.com/Azure/monaco-kusto/assets/73201/3d8cb7ba-0a31-4b8e-a2bc-b6e87014697c)

Here I log `System` then navigate to a page to load Kusto and then log `System` again.

![image](https://github.com/Azure/monaco-kusto/assets/73201/3f7601ab-0eef-4ad4-9ab1-ca994b245228)

**Expected behavior:**
I would expect that loading Kusto doesn't replace the global variable `System`.

**Actual behavior:**
Loading Kusto will replace the global variable `System`.

**Reproduces how often:**
I can reproduce it 💯 of the time.

### System configuration

monaco-kusto version: 7.7.0
monaco-editor version: 0.34.0
Browser: Chrome
OS: Mac OS

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the bridge.js file from the @kusto/language-service package and inspect the globals.System assignment shown in the issue. Reproduce the load sequence in Chrome with SystemJS present, then verify that loading Kusto no longer replaces the existing global System variable.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.