sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Incorrect import order in output when compiling into single AMD file
Labels: Bug,Help Wanted

# Bug Report

### 🔎 Search Terms

wrong import order amd single file side effects global

### 🕗 Version & Regression Information

This affects at least TypeScript 4.2.4.

### ⏯ Playground Link

[Workbench Repro](https://www.typescriptlang.org/dev/bug-workbench/?module=2&outFile=main.js&ts=4.2.3#code/PTAEAEFsHsBMFcA2BTAXKAhpWAoEFp4AXAMQEsV1IMyA7AOgCsBnHPMcAMwuVqzUz0irZAA8ADtABORUJ3i0AxkTLRamABQBKUAG8coQ6CnIi8KeoAGACzKgAkgHJIoAEQZXlnAF82+Ljx8kAIARkKsimrM0Cj0iNAA5hqOGKC0ZIrIoMxksFnInJzIyo5afhzcKEEC1HThOGSQkjKgjvTAIY4NTdKyupig3nJS0C5twBhdOJG00bHxSRjaZUA)

### 💻 Code

```ts repro
// @module: amd
// @outFile: main.js

// @filename: a.ts
export function a() {
    return `hi I'm "a"`
}

// @filename: b.ts
console.log('a nice side effect')

// @filename: main.ts
import './b'
import { a } from './a'

console.log(a())
```

Becomes...

```js
"use strict";
define("a", ["require", "exports"], function (require, exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.a = void 0;
function a() {
return `hi I'm "a"`;
}
exports.a = a;
});
console.log('a nice side effect'); // Too late! This should run first.
define("main", ["require", "exports", "a", "./b"], function (require, exports, a_1) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
console.log(a_1.a());
});
```

### 🙁 Actual behavior

Import order was not respected in output, so side effects in which the rest of the code was relying were not executed at the appropriate time. Instead, the order is derived from the filenames somehow.

### 🙂 Expected behavior

The order of TypeScript's output should respect that of the input with regards to [side-effects-only imports](https://www.typescriptlang.org/docs/handbook/modules.html#import-a-module-for-side-effects-only).
Repository: deno
Issue: location.reload() should restart the process
Labels: suggestion,runtime

maybe...
Repository: TypeScript
Issue: Alias Binding incorrectly propagates through properties on ephemeral import
Labels: Bug,Help Wanted

# Bug Report

This is related to the [closed] issue #41628. We have some code that requires JSON (with `"resolveJsonModule": true` set in our `tsconfig.json`) and immediately accesses a `string` field (package version) on the returned JSON object, assigning it to a `var`/`let` variable. This produces the following error:

```
Cannot assign to 'version' because it is not a variable. ts(2539)
```

### 🔎 Search Terms

require json cannot assign let alias

### 🕗 Version & Regression Information

- This changed between versions 4.0 and 4.1

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/play?ts=4.2.3&useJavaScript=true#code/LAKANgpgLgBARgVwJZgCYwLwwEQEYBMAzACwCs2A3KJLAG4QBOAzkgPYB2mMDEAjsjwAUAcgB0AegAOAQwDGAa2kBzCKIBWTDsICUo+szbsqIfSw4wA1FmwBabJfjI0xoA)

### 💻 Code

```ts
let version = require('./package.json').version;
version += "-debug";
```

### 🙁 Actual behavior

TypeScript reports the following error:

```
Cannot assign to 'version' because it is not a variable.
```

### 🙂 Expected behavior

We expect no error in this case. The `version` property on the object returned by the `require` function should not be considered an alias, but a simple string.

One workaround is, of course, to use the `//ts-ignore` hammer. Another is to do something like the following:

```ts
const pkg = require('./package.json');
let version = pkg.version;
version += "-debug";
```
Repository: rust
Issue: rustdoc: Structured suggestion for intra-doc links based on current crate name
Labels: T-rustdoc,A-intra-doc-links,A-suggestion-diagnostics

Within a crate `xyz`, the link ```[`xyz::path::some_item`]``` gives an error. This would be challenging to fix in the rustdoc resolver. However, we could provide a rustfix-applicable structured suggestion on the error, suggesting ```[`xyz::path::some_item`][`crate::path::some_item`]```.
Repository: terminal
Issue: [megathread] Accessibility links
Labels: Area-Accessibility,Product-Terminal,Issue-Scenario

A tracking thread for different accessibility queries. These bugs are also tracked internally, and require additional process around resolving in a timely fashion.

### Immediately relevant:

* [x] #13019
* [ ] #13020

### Queries
* [All issues](https://github.com/microsoft/terminal/issues?q=is%3Aissue+is%3Aopen+label%3AHCL-WindowsTerminal)
* [`A11ySev1`](https://github.com/microsoft/terminal/issues?q=is%3Aissue+is%3Aopen+label%3AA11ySev1++label%3AHCL-WindowsTerminal+)''s: These go into the current release milestone
* [`A11ySev2`](https://github.com/microsoft/terminal/issues?q=is%3Aissue+is%3Aopen+label%3AA11ySev2++label%3AHCL-WindowsTerminal+)''s: These go into the current semester
* [`A11ySev3`](https://github.com/microsoft/terminal/issues?q=is%3Aissue+is%3Aopen+label%3AA11ySev3++label%3AHCL-WindowsTerminal+)'s: These go into the current year.
* [`A11yUsable`](https://github.com/microsoft/terminal/issues?q=is%3Aissue+is%3Aopen+label%3AA11yUsable++label%3AHCL-WindowsTerminal+)': These go on the backlog


> #### Triage Guidelines:
> 
> Please triage bugs as per below:
> 
> * To stay compliant, Triage MAS tagged with “A11yMAS” on priority.
> * Triage MAS bugs in the sequence tagged with A11ySev1, A11ySev2 and A11ySev3
>  
> 
> #### Criteria to calculate Accessibility compliance grading:
> 
> * High impact/A11ySev1 bugs greater than 60 days ​ 
> * Medium impact/A11ySev2 bugs and exceptions greater than 120 days ​ 
> * More than 5 medium impact/A11ySev2 bugs and partner dependencies 
> * Conformance statements older than a year ​ 


### Blocked on upstream:

_No Sev2 or higher bugs currently blocked on upstream_

* [x] #11250
  - upstream: https://github.com/microsoft/microsoft-ui-xaml/issues/3494
* [x] #11159
  - upstream: https://github.com/microsoft/microsoft-ui-xaml/issues/3156
  - Closed by just removing all the `RadioButton`s in the SUI, #12833

<details>
<summary>SV2 Era</summary>


* [x] #11155
* [x] #11248
  - fixed in #11442
* [x] #8480
  - fixed in #12260
* [x] #11251
  - fixed in #12259
* [x] #7907
  - fixed in #12266
* [x] #11996
  - fixed in #12299 
* [x] #12052
  - fixed in #12097
* [x] [**UPSTREAM**] #12021 blocked on https://github.com/microsoft/microsoft-ui-xaml/issues/1607
  - Closed by very manually yeeting focus, #12798


</details>
Repository: terminal
Issue: Add per-window-name global settings
Labels: Issue-Feature,Area-Settings,Product-Terminal,Area-Windowing

This one's from a team sync chat thread.

What if there was a way to say

```json
"windows": {
  "work": {
    "alwaysOnTop" : true,
    "initialPosition": "2000, 50",
    "centerOnLaunch": true,
    "launchMode": "focus",
    "startupActions": "sp ; sp ; nt -p Ubuntu"
  },
  "_quake": {
    "launchMode": "default",
    "startupActions": "nt -p PowerShell"
  }
}
```

So that you could have different sets of global settings for different window names? What properties would make sense here? Definitely not `windowingBehavior`, because that's a global setting, not a window setting.


* `dev/migrie/fhl-fall-2023/9992-window-name-settings` https://github.com/microsoft/terminal/compare/main...dev/migrie/fhl-fall-2023/9992-window-name-settings
  * ~`dev/migrie/fhl-fall-2023/9992-default-quake-settings`~ this was a dead end
  * `dev/migrie/fhl-fall-2023/9992-quake-II` https://github.com/microsoft/terminal/compare/dev/migrie/fhl-fall-2023/9992-window-name-settings...dev/migrie/fhl-fall-2023/9992-quake-II
    * `dev/migrie/fhl-fall-2023/11162-quake-III-arena` https://github.com/microsoft/terminal/compare/dev/migrie/fhl-fall-2023/9992-quake-II...dev/migrie/fhl-fall-2023/11162-quake-III-arena for #11162, #11174
Repository: terminal
Issue: Display a indicator on the cursor's line
Labels: Area-TerminalControl,Area-Extensibility,Product-Terminal,Issue-Task


this is inspired by a Notepads feature - there's this little reveal-enabled box that can be drawn over the line with the cursor on it. It looks kinda cool. I don't know if I'd really use it, but it's a cool idea.

Probably makes more sense as an extension, so I'll tag it as part of #4000. Probably something that would be a good example of a _simple_ UI feature that an extension could provide.
Repository: terminal
Issue: Allow for ExecuteCommandline actions to be called straight from the commandline
Labels: Issue-Feature,Product-Terminal,Area-Commandline

So I can do something like `wt good-morning` and have it immediately start up with my `Good Morning` actions. Maybe something like

```json
{
  "command": {
    "action": "wt",
    "subcommand": "good-morning",
    "commandline": "nt ; sp"
  },
  "name": "Good Morning"
},
```

that lets the given commandline be treated as the provided commandline.

I suppose:
* does it have to be limited to `wt` actions?
* what happens for `wt good-morning ; new-tab`?
* does `{ "command": {"action": "wt", "subcommand": "gm", "commandline": "good-morning" } }` work?


Also relevant: #6899, [#6899 - Action IDs.md](https://github.com/microsoft/terminal/blob/main/doc/specs/%236899%20-%20Action%20IDs/%236899%20-%20Action%20IDs.md)
Repository: terminal
Issue: [megathread] Background Image follow-ups
Labels: Area-TerminalControl,Area-Settings,Product-Terminal,Issue-Scenario

## Backlog Features

* [ ] #3193
* [ ] #2620
* [x] #6028
  - see also #3327 for that one
* [ ] #2370
* [ ] #5480 
  - might just be the same as the above #2370
* [ ] #10296
* [ ] #7279 and #3900 are very similar
* [ ] #1726
* [ ] #866 
* [ ] #11006

## bugs

* [ ] #2441
* [ ] #6128
* [ ] #6164
* [ ] #6340
* [ ] #12643
Repository: terminal
Issue: Enable `globalSummon` / `quakeMode` to work even when there isn't a running Terminal
Labels: Issue-Feature,Product-Terminal,Area-Remoting

This is probably going to need the "headless monarch" work we theorized. Different parts to this:

* We've already got `startOnUserLogin` which starts the Terminal window. 
* Is any window the monarch then?
* Is the monarch a phoenix (when it's killed, who restarts it?)

I've had many more thoughts on the matter in the past, I just need to have somewhere to put them.
Repository: terminal
Issue: [MEGATHREAD] AtlasEngine bugs and missing features (`experimental.useAtlasEngine`)
Labels: Product-Terminal,Priority-1,Issue-Scenario,Area-AtlasEngine

# Bugs

- [ ] Desktop stutters on Nvidia GPUs due to G-SYNC switching on/off when two MPO planes are active (MSFT:37283316)
- [ ] Zooming (font changes in general) are much slower than DxEngine
      👉 Doesn't occur with a local dev build. What's wrong with our release builds? 🤔
- [x] Atlas acts like `IntenseIsBold` is always on
- [x] Remaining gridlines (left, right, top, bottom, double underline)
- [x] Missing cursor when experimental text rendering engine is enabled in HDR enabled monitor #12507
- [x] Changing transparency from the command palette doesn't change the transparency until committed / pressing enter

# Missing features

- [x] ClearType
- [x] Links not underlined with experimental.useAtlasEngine enabled #11871
- [x] A more conservative GPU memory usage
- [ ] Shrinking the backing texture if possible
- [x] Double-height and double-width line support
- [x] #13853

# New features
- [ ] Raster fonts
- [x] Soft fonts
- [x] Investigate alternative ways to handle box drawing/block elements #5897
  * Closes: experimental.useAtlasEngine breaks draw-box rendering #12512
  * Possibly also #6161
- [x] Arrow (➜) character in prompt is rendered small #6864

# Cleanup
- [x] Deduplicate font fallback selection during `UpdateFont()`. Both `DxEngine` and `AtlasEngine` fall back to Consolas, etc. separately.

# Things we think were fixed by this renderer...
...Or at least, this renderer got out of the way so that these can be fixed now. 

- [x] #800 Ligatures do not render under cursor column in Vim
- [ ] #3075 Processing large data is extremely slow (in VMware)
- [x] #3515 Extremely sluggish behavior when in full screen on a 4K monitor
- [ ] #4974 [v0.10] When two characters are ligatured, the first one becomes invisible
- [x] #6738 Some of the extended Unicode characters are rendered with incorrect size and placement
- [x] #6974 Extremely lower performance when displaying too many box-shading glyphs
- [x] #7147 Support renderer fast presents
- [x] #7927 Frames and special characters from bitmap TTF font are not visible
- [ ] #10462 Extremely slow performance when processing virtual terminal sequences
- [x] #13527 Unicode Box drawings characters not rendered correctly (disappear) with Japanese fonts
- [ ] MSFT-38159826

# Not _really_ a bug
- [x] #12349
Repository: terminal
Issue: VT Passthrough enhancements beyond the FHL
Labels: Product-Conhost,Area-VT,Issue-Scenario

~Claimed by @miniksa.~

See also:
* #1173
* #11264

This issue represents the follow-on items from #11264. It's a bunch of known issues from the PR that will be required to make the VT passthrough more robust.

It is not all-encompassing and resolving all of these will not necessarily be the end (and therefore not necessarily the satisfactory completion of #1173).

### Conhost-side issues:
- [ ] Peek/Read console input should probably only synchronize the cursor during cooked mode
- [x] Fill output character is converting WC2MB way too many times but it works
- [ ] (also `VtEngine::_WriteFill` could do with a `REP` command which is I think a VT thing too)
- [ ] `GetConsoleCursorInfo` could probably work but we'd have to pipe through a bunch of stuff
- [ ] `GetConsoleScreenBufferInfoEx` is... just some data. But it's probably not correct.
- [x] Popups erase stuff behind them which is gonna be gross...
- [x] Scroll could just be DECCRA implemented in Terminal
- [x] `WriteConsoleOutput` should probably trim to the buffer size
- [x] `ReadConsoleOutput` likely needs some sort of trim as well
- [ ] Console Title might be able to resolve a more complete answer (either by asking the host or spying on the VT going by or parallel running commands locally... idk)
- [ ] Reconcile inheriting the cursor on PTY startup with the Looking For DSR methods (a.k.a. should we always set up the DSR watcher every time the cursor query command is called? See https://github.com/microsoft/terminal/pull/11264#discussion_r784132481 for details)
- [ ] Reconcile how many times we copy the API routines into the message packet. Do we really need to do it on every message? https://github.com/microsoft/terminal/pull/11264#discussion_r784106977

### Terminal-side

Broadly, the Terminal doesn't actually support that many VT sequences. We'll likely run into issues immediately...

- [x] #1883
- [ ] #13408
- [ ] Implement scrolling margins
- [x] Support the alt buffer. #381 is the ConPTY side of things. #3492 looks a bit like the Terminal version
Repository: PowerToys
Issue: Allow "No Layout" as quick-switchable option within FancyZones (or hotkey to disable FZ)
Labels: Idea-Enhancement,FancyZones-Editor,Product-FancyZones

### Provide a description of the new feature / enhancement

"No Layout" exists as an option in the FancyZones templates, but cannot be quickly switched to with keyboard shortcuts. A blank layout can be created by creating a Canvas layout and removing the zone, but that does not allow for standard use of the Windows Snap shortcut (while the No Layout option does). There are occasions where FancyZones are exactly what I need (including the override of Windows Snap), and there are others where it's more useful to be able to directly manipulate Snap without FancyZones.


Solutions:

- Allow "No Layout" as a quick-switchable option
- Add a shortcut to enable/disable FancyZones altogether
- Add a shortcut to enable/disable the Override Windows Snap feature within FancyZones
Repository: pytorch
Issue: [jit] pickling custom classes may lead to invalid pickle files
Labels: oncall: jit

Our implementation of the pickle vm should be compatible with the Python one. One case where it isn't is due to a difference in how TS and Python encode strings (ascii vs. utf8).

See this internal thread for context: https://fburl.com/apkosmph. Basically, we can serialize a custom class that holds onto a string that isn't a valid utf-8 string, which causes attempts to unpickle it from Python to error out.

cc @gmagogsfm
Repository: godot
Issue: `Shadows a native class` error doesn't appear for `class_name Engine`
Labels: bug,topic:gdscript

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
<!-- Specify commit hash if using non-official build. -->
3.3 stable

**OS/device including version:**
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->
Linux

**Issue description:**
<!-- What happened, and what was expected. -->
I can create a script and write `class_name Engine` and see no errors/warnings.

For comparison, if I write `class_name Button` this error appears:
`The class Button shadows a native class`.
I think the same should go for `Engine`

**Steps to reproduce:**
Create a script, define a custom class named `Engine`:
`class_name Engine`

**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
Repository: vscode
Issue: Make a single Windows installer
Labels: feature-request,install-update,windows

Please make a single Windows installer, combining the system installer and the user one.

Most other apps have a single installer.

You can also ask when a user first runs the installer if he wants to install the application for all users (system) or just for the current user.

And also, some users only during the installation process realize that they downloaded the installer for the user, and then they have to go to the site and look for the installer for the system, which is inconvenient.

There has already been such an issue https://github.com/microsoft/vscode/issues/67089, but you closed the comments there, and you may reconsider your decision about this feature request.
Repository: pytorch
Issue: Renaming Autograd dispatch keys to ADCreateGraph
Labels: triaged,enhancement,module: dispatch

Summarizing our discussions around dispatch key naming with @albanD @bhosmer @ezyang here: 

After we splitted inplace and view handling outside `VariableType` kernel to `ADInplaceOrView` key, now `Autograd` is handled by two kernels: `AutogradCPU`(VariableType) + `ADInplaceOrView`. So we propose to rename `AutogradCPU` -> `ADCreateGraphCPU`(similar to other backends) and define `AutoDispatchBelowAutograd = AutoDispatchBelowADInplaceOrView` so that `Autograd` can still be a concrete concept. 

But thinking about the gain & cost of renaming, 
1. Users who are affected by this incorrect `Autograd` naming is only custom kernel writers. For them they have to learn about `ADInplaceOrView` anyways just in cast they want to add a custom inplace/view kernel. So we feel less worried about exposing `ADInplaceOrView` to them. 

2. If we do extra work to rename, it's definitely more accurate, but now we need to explain to backend extenders (who mainly focus on existing ops) why they need to use the new key instead of new keys. And we need to revisit a lot of our tutorials to make sure we use Autograd/ADCreateGraph key properly in different context. This work seems to impact many more people that don't have to know the minor difference between these two keys. 

So currently my preference is:
1. Update our tutorial for custom kernel so that kernel writers knows what to do. 
2. Open this issue here so that if we have a chance to rename autograd dispatch keys in the future, we should consider making it more accurate.
Repository: TypeScript
Issue: JSDoc can't reference global-injected types declared in an ES module
Labels: Bug,Rescheduled

# Bug Report

When exporting types from ES6 modules as namespaces in a typings file, some extraordinary care is required in order to make the types "work" properly via JSDoc. It's non-trivial and a bit verbose.

### 🔎 Search Terms

jsdoc es6 export import namespace

### 🕗 Version & Regression Information


- This is the behavior in every version I tried, and I reviewed the FAQ for entries about ES6 imports/exports and TypeScript

### ⏯ Playground Link

Playground unavailable as it spans multiple files.

### 💻 Code

```js
// ExportedTypes.js
class ClassOne
{
    test() { return false; }
    static test2() { return true; }
}

export { ClassOne }```

```ts
// globals.d.ts
import * as TypesToExport from './ExportedTypes'

declare global
{
    var Types: typeof TypesToExport
}```

``js
// UseTypes.js
/** @type {Types.ClassOne} */
let x = null;
x = new Types.ClassOne();
x.test();
x;

/** @type {typeof Types.ClassOne} */
let y = null;
y = new Types.ClassOne();
y.test();
y;

/** @type {InstanceType<typeof Types.ClassOne>} */
let z = null;
z = new Types.ClassOne();
z.test();
z;
```

### 🙁 Actual behavior

Attempting to document the types exported here with JSDoc is confusing.
The first thing people would attempt is @type {Types.ClassOne} -
this does not work, however, and just puts it in as an "any".
Hovering over the namespace or type name gives "any".
As a second resort, people might try @type {typeof Types.ClassOne},
but this won't work - note that `x.test()` is not typed properly.
This is typing it as the type of the class, not the class itself.
The only way I've been able to make this work properly is via
/** @type {InstanceType<typeof Types.ClassOne>} */, but that's
extremely verbose.

### 🙂 Expected behavior

The first `@type` hint should work, as hovering over `Types.ClassOne` in the context of `new` shows the correct type, but in JSDoc it does not recognize the namespace or type.
Repository: rust
Issue: rustdoc: Display `crate::` as the name of the crate in intra-doc links
Labels: T-rustdoc,C-enhancement,A-intra-doc-links

This would solve the issue described in https://github.com/rust-lang/rust/pull/84716#discussion_r623424304 and wouldn't require using `extern crate`.

A link like ``[`crate::collections::HashMap`]`` in `std` would be rendered as [`std::collections::HashMap`](#), and would continue to link to `HashMap`'s docs.

I don't think there are any use cases where a library author would want `crate::` to show up in their docs.

cc #84721
cc @jyn514 @joshtriplett
Repository: godot
Issue: Export Project window's Path can not be changed to other directories of the same drive
Labels: enhancement,topic:editor,usability

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
3.3
<!-- Specify commit hash if using non-official build. -->


**OS/device including version:**
Windows 10 1909
<!-- Specify GPU model, drivers, and the backend (GLES2, GLES3, Vulkan) if graphics-related. -->


**Issue description:**
Export Project window's Path can not be changed by clicking on the drive selection if the actual project is in that drive.
<!-- What happened, and what was expected. -->


**Steps to reproduce:**
Project -> Export... -> Export Project -> Choose different hard drives -> the one's path has the actual project is fixed
( For example in my case I have C D E drives, and my actual Godot project is in D, when I click C or E it will change the path into their root directory, but when I click D, it's fixed in my actual project path which is D:\ass\cursor\ , and can only be changed if I manually type in the address bar )


**Minimal reproduction project:**
<!-- A small Godot project which reproduces the issue. Drag and drop a zip archive to upload it. -->
![1619751085(1)](https://user-images.githubusercontent.com/46274753/116642694-0a726f80-a9a2-11eb-9904-a79dd47e4e41.jpg)