sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Repeated single line comment after variable declaration in if/for block when targeting ES5
Labels: Bug,Help Wanted

# Bug Report

### 🔎 Search Terms

comment

### 🕗 Version & Regression Information

- This changed between versions 4.6.4 and 4.7.4

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/play?target=1&ts=4.7.4#code/DYUwLgBAHgXBB2BXAtgIxAJwFAHocQGIBLAMwgFkBRcgeQCUBNANgBYsoIBeCADl3wIhgAZxDsuENnkIh4AE1JYsJRPADGYIgHt4EMgApUcVFq2gAhvACUEAN5YIEUhEM37jx6EgBPOEjSYDh7SxGRUtIysQY7eEnweECFCotEQsdxsCUnyio4AvkqOJFoYLl5OEgAMANwVADwQAIw1EADUrURuqeUAXn4o6NhZAs7h9MyZHj1xqUkiYgnTGbMCsgokQQUFQA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
let x: number
// #if MEMORY64
x = 8
// #else
x = 4
// #endif

function f (b: boolean) {
  if (b) {
    let y: number
    // #if MEMORY64
    y = 8
    // #else
    y = 4
    // #endif
  }

  for (let i = 0; i < 10; ++i) {
    let z: number
    // #if MEMORY64
    z = 8
    // #else
    z = 4
    // #endif
  }
}
```

### 🙁 Actual behavior

Output JavaScript using typescript 4.7.4

```js
"use strict";
var x;
// #if MEMORY64
x = 8;
// #else
x = 4;
// #endif
function f(b) {
    if (b) {
        var y 
        // #if MEMORY64               // <----- ???
        = void 0;
        // #if MEMORY64
        y = 8;
        // #else
        y = 4;
        // #endif
    }
    for (var i = 0; i < 10; ++i) {
        var z 
        // #if MEMORY64               // <----- ???
        = void 0;
        // #if MEMORY64
        z = 8;
        // #else
        z = 4;
        // #endif
    }
}
```

### 🙂 Expected behavior

Output JavaScript using typescript 4.6.4

```js
"use strict";
var x;
// #if MEMORY64
x = 8;
// #else
x = 4;
// #endif
function f(b) {
    if (b) {
        var y = void 0;
        // #if MEMORY64
        y = 8;
        // #else
        y = 4;
        // #endif
    }
    for (var i = 0; i < 10; ++i) {
        var z = void 0;
        // #if MEMORY64
        z = 8;
        // #else
        z = 4;
        // #endif
    }
}
```
Repository: transformers
Issue: Add Mask2Former
Labels: New model

### Model description

Mask2Former is a single architecture for panoptic, instance and semantic segmentation.

**Mask2Former Paper Abstract**:
Image segmentation is about grouping pixels with different semantics, e.g., category or instance membership, where each choice of semantics defines a task. While only the semantics of each task differ, current research focuses on designing specialized architectures for each task. We present Masked-attention Mask Transformer (Mask2Former), a new architecture capable of addressing any image segmentation task (panoptic, instance or semantic). Its key components include masked attention, which extracts localized features by constraining cross-attention within predicted mask regions. In addition to reducing the research effort by at least three times, it outperforms the best specialized architectures by a significant margin on four popular datasets. Most notably, Mask2Former sets a new state-of-the-art for panoptic segmentation (57.8 PQ on COCO), instance segmentation (50.1 AP on COCO) and semantic segmentation (57.7 mIoU on ADE20K).


### Open source status

- [X] The model implementation is available
- [X] The model weights are available

### Provide useful links for the implementation

Paper: https://arxiv.org/abs/2112.01527

Github repo (and weights): https://github.com/facebookresearch/Mask2Former
Repository: PowerToys
Issue: more ways to theme Windows 11 like being able to make the Windows 11 start button the color of the windows theme instead of the blue windows logo
Labels: Product-Tweak UI Design,Needs-Triage

### Description of the new feature / enhancement

to be able to make the start button on Windows 11 the same color as your Windows 11 theme for example if your Windows 11 theme is orange make the start button orange as well instead of just the normal blue Windows 11 Start icon on the taskbar 

### Scenario when this would be used?

Themes it would make them slightly better if it matched the color that you set in the settings this is not something that i NEED but it would be something neat to see in an update

### Supporting information

_No response_
Repository: flutter
Issue: [documentation] Is the MergeSemantics sample code appropriate?
Labels: framework,a: accessibility,d: api docs,P2,team-framework,triaged-framework

The current MergeSemantics sample code looks like this:
```dart
This snippet shows how to use MergeSemantics to merge the semantics of a Checkbox and Text widget.

MergeSemantics(
  child: Row(
    children: <Widget>[
      Checkbox(
        value: true,
        onChanged: (bool? value) {},
      ),
      const Text('Settings'),
    ],
  ),
)
```
https://github.com/flutter/flutter/blob/f1875d570e39de09040c8f79aa13cc56baab8db1/packages/flutter/lib/src/widgets/basic.dart#L7057

My understanding is that `MergeSemantics` widget is used to merge multiple descendant SemanticsNodes into a new one, but the Checkbox and Text widget used in the sample code do not generate its SemanticsNode.
In this case, the MergeSemantics just add a new SemanticsNode, then the Checkbox and Text widget are aggregated into the SemanticsNode, this behavior is equivalent to the simple `Semantics(container: true, child: ...)`.
I think there is a more appropriate sample code to show MergeSemantics' merging mechanisms.

Please let me know if my understanding is wrong. (I'm currently learning the Semantics behaviors)

related:
https://github.com/flutter/flutter/issues/22782
https://github.com/flutter/flutter/pull/68123
Repository: godot
Issue: HTML5: Deleted files reappear after page refresh
Labels: bug,platform:web,topic:porting

### Godot version

3.5-stable

### System information

Chrome 104.0.5112.81, Windows 10

### Issue description

If you call `Directory.remove()`, it only deletes the file for the current instance of the game (also it returns OK). If you refresh the page, the file is still there.
However, if you delete the file then create another file, the first one is deleted successfully.

### Steps to reproduce

1. Download MRP.
2. Add some files.
3. Delete them.
4. Refresh the list. See how they are not there.
5. Refresh the page. See how they are back.
6. Delete them again, but then add a new file.
7. Refresh the page. Only the last added file is there.

### Minimal reproduction project

[Web Directory.remove().zip](https://github.com/godotengine/godot/files/9274929/Web.Directory.remove.zip)
Repository: godot
Issue: Moving a group of AnimationTree graph nodes creates multiple undo entries
Labels: bug,topic:editor,usability,topic:animation

### Godot version

v4.0.alpha.custom_build [8243c7ab5]

### System information

Linux 5.18.14-arch1-1

### Issue description

When drag-selecting a group of nodes in an AnimationTree graph and moving them, pressing `undo` (`ctrl+z`) un-does each move individually.

### Steps to reproduce

1. Add a `AnimationTree`
2. Set the root node to a `AnimationNodeBlendTree`
3. Add several nodes of any kind
4. Click and drag to select several nodes
5. Drag the nodes to a new location
6. Press ctrl+z

Note that ctrl+z moves only one node back to its original position.

I noticed this with the VoxelGraph node in https://github.com/Zylann/godot_voxel as well. However, I can't repro with the VisualShader graph.

### Minimal reproduction project

_No response_
Repository: go
Issue: x/text/language: fails to parse valid BCP47 -t extension string; mistakes field for a region
Labels: NeedsInvestigation

### What did you do?

```
package main

import (
	"fmt"

	"golang.org/x/text/language"
)

func main() {
	t, err := language.Parse("en-t-en-m0-ungegn")
	fmt.Printf("got %s, err %s\n", t, err)
}

```

### What did you expect to see?

```
got en-t-en-m0-ungegn, err nil
```

### What did you see instead?

```
got en-t-en, err language: tag is not well-formed
```

### Cause

In `/x/text/internal/language`, this error happens whenever parseExtension calls parseTag to parse language, script, region and variants if they appear after "-t".

(e.g. "en-t-m0-ungegn" is fine and does not trigger this error, but "en-t-en-m0-..." does.)

rfc6497 gives another example, `und-Cyrl-t-und-latn-m0-ungegn-2007`, which Go also fails to parse for the same reason.

"The field separator subtags, such as 'm0', were chosen because they are short, visually distinctive, and cannot occur in a language subtag". But parseTag believes "m0" is part of the (language, script, region, variants). It thinks "m0" is like the "GB" in "en-GB".

Note also that a language code like "en-001" is a valid part of the language/script/region/variants, so we have to be very specific that Go is parsing the tag incorrectly only when the subtag is exactly two characters long and contains a digit.

### Fix

Trivial small pull request incoming. Passes all existing tests, adds one new test case.
Repository: next.js
Issue: Nextjs fails to detect ESM modules correctly when using exports in package.json
Labels: bug,Webpack,linear: next

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

    Operating System:
      Platform: darwin
      Arch: arm64
      Version: Darwin Kernel Version 21.2.0: Sun Nov 28 20:28:41 PST 2021; root:xnu-8019.61.5~1/RELEASE_ARM64_T6000
    Binaries:
      Node: 16.16.0
      npm: 8.11.0
      Yarn: 1.22.15
      pnpm: 7.5.2
    Relevant packages:
      next: 12.2.4
      eslint-config-next: 12.2.4
      react: 18.2.0
      react-dom: 18.2.0

### What browser are you using? (if relevant)

_No response_

### How are you deploying your application? (if relevant)

_No response_

### Describe the Bug

Next.js fails to resolve sub dependencies correctly and tries to load CJS from ESM modules, causing the build to fail.

```
SyntaxError: Named export 'theme' not found. The requested module '@chakra-ui/react' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
```

@chakra-ui/react a dependency of @saas-ui/react

Saas UI uses exports definition in package.json to define package entries and exports the ESM module as default.

```
{
  "exports": {
    ".": {
      "require": "./dist/index.js",
      "default": "./dist/index.modern.mjs"
    },
    "./src": {
      "default": "./src/index.ts"
    }
  },
  "main": "./dist/index.js",
  "module": "./dist/index.modern.mjs",
  "types": "./dist/index.d.ts"
}
```

Removing exports or changing default to `import` fixes the issue.

However I think Next.js should handle this correctly.



### Expected Behavior

Next.js resolves all packages correctly as ESM.

### Link to reproduction

https://github.com/msnegurski/test-saas-ui

### To Reproduce

1. Clone the repo.
2. npm i
3. npm run dev

Make sure @saas-ui/react@1.2.x is installed (not 1.3)



<sub>[NEXT-1381](https://linear.app/vercel/issue/NEXT-1381/nextjs-fails-to-detect-esm-modules-correctly-when-using-exports-in)</sub>
Repository: excalidraw
Issue: tab-sync can be triggered before initial init
Labels: bug

Not sure whether to consider this a bug, but the tab syncing handler can get triggered before the initial scene init is done, which could result in bugs down the line. It certainly wasn't build with that in mind way so I _would_ consider it a bug.

Steps:

1. open a shareable link which prompts for confirmation
2. upon confirming the modal, the `visibilitychange` is triggered, which syncs state and updates the scene, before the initial scene initialization is finished
Repository: godot
Issue: When clicking `Open User Data Folder` on ChromeOS it loads up VSCODE (If installed)
Labels: platform:linuxbsd,topic:editor,topic:porting

### Godot version

3.4.4 stable

### System information

ChromeOS

### Issue description

When clicking `Open User Data Folder` on ChromeOS it loads up VSCODE (If installed) Then you cant delete game save files if needed

### Steps to reproduce

When clicking `Open User Data Folder` on ChromeOS it loads up VSCODE (If installed) Then you cant delete game save files if needed

### Minimal reproduction project

_No response_
Repository: vscode
Issue: Neo2 Layout Keybinding wrong key used
Labels: bug,linux,keyboard-layout


Type: <b>Bug</b>

Configure vscode to use the key codes with the setting keyboard.dispatch.
Try to define a custom key binding of the umlaut "ö".
The neo layout is ignored and the QWERTZ Key x is used.

Because of this bug, it's not possible to map the X and Ö key to different bindings, as they are handled as the same key.
![image](https://user-images.githubusercontent.com/5613385/183264203-711dfbea-dbee-4bcf-a24d-985a4942bf5d.png)

If the keyboard dispatch option code is used, the behavior is little different: When "Define Keybinding" is used, the Ö Key is displayed as KeyX, which makes the key binding work correctly. However, the navigation layer of the Neo-Layout is then not working correctly, so using keyboard.dispatch = keyCode is always required.
With the option keyCode it's displayed as just x. 


VS Code version: Code 1.70.0 (da76f93349a72022ca4670c1b84860304616aaa2, 2022-08-04T04:38:48.541Z) and Code 1.71.0 (73fd3f11032e7b)
OS version: Linux x64 5.17.1-051701-generic
Modes:

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz (8 x 2400)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: disabled_off<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_renderer: enabled_on<br>video_decode: disabled_software<br>video_encode: disabled_software<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled|
|Load (avg)|0, 0, 0|
|Memory (System)|15.42GB (5.66GB free)|
|Process Argv|--unity-launch --crash-reporter-id ebfc1a19-0e2c-4954-ae92-ec2e7ac41a55|
|Screen Reader|no|
|VM|0%|
|DESKTOP_SESSION|plasma|
|XDG_CURRENT_DESKTOP|KDE|
|XDG_SESSION_DESKTOP|KDE|
|XDG_SESSION_TYPE|x11|
</details>Extensions: none<details>
<summary>A/B Experiments</summary>

```
vsliv368:30146709
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
vslsvsres303:30308271
pythonvspyl392:30443607
vserr242cf:30382550
pythontb:30283811
vsjup518:30340749
pythonvspyt551cf:30345471
pythonptprofiler:30281270
vshan820:30294714
vstes263cf:30335440
vscorecescf:30445987
pythondataviewer:30285071
vscod805cf:30301675
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30525688
vsaa593cf:30376535
vsc1dst:30438360
pythonvs932:30410667
wslgetstarted:30449410
vscscmwlcmt:30465135
cppdebug:30492333
vscaac:30438847
pylanb8912:30529769
vsclangdf:30486550
c4g48928:30535728
hb751961:30541207
dsvsc012cf:30540253

```

</details>

<!-- generated by issue reporter -->
Repository: opencv
Issue: CMake >=3.19 errors `IMPORTED_LOCATION not set for imported target "opencv_world" configuration "MinSizeRel"` when building a simple test program with OpenCV built only in Debug with Visual Studio
Labels: category: build/install,platform: win32

##### System information (version)
- OpenCV => 4.5.4
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2017-2022
- CMake => 3.19.0-3.24.0

##### Detailed description

Assume you built OpenCV with
```bash
cmake -G "Visual Studio 16" -T v141 -A Win32 -D OpenCV_ARCH=x86 -D OpenCV_RUNTIME=vc15 -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules -D OPENCV_ENABLE_NONFREE=ON -D BUILD_opencv_python3=OFF -D BUILD_SHARED_LIBS=ON -D BUILD_WITH_DEBUG_INFO=OFF -D BUILD_DOCS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_TESTS=OFF -D BUILD_opencv_world=ON -D WITH_CUDA=OFF ../opencv
cmake --build . --config Debug --target package
```
and try to build a simple test program with CMake 3.19 or above. CMake fails with warnings and errors similar to
```
CMake Error in CMakeLists.txt:
  IMPORTED_LOCATION not set for imported target "opencv_world" configuration
  "MinSizeRel".
```
and related to "RelWithDebInfo" configuration and https://cmake.org/cmake/help/latest/policy/CMP0111.html. See the logs from all the Visual Studio Debug configurations tested on https://github.com/lebarsfa/Packages/actions/runs/2833658569 (need to be logged in GitHub), generated package on https://github.com/lebarsfa/Packages/releases/download/libopencv-dev.4.5.4.20220805/libopencv-dev.4.5.4_x86_vc15_lib_Debug.exe, test program on https://github.com/lebarsfa/Packages/tree/4b271d2b5c2ed6eb36a5e140c0e9e9fffb7977a7/choco/libopencv-dev/tools/cv_mat_test.

However, the files generated by CMake appear to be OK, we can still build and run the program (in Debug configuration, I did not need the other configurations). 

A workaround can be to add the corresponding Release package (`cmake --build . --config Release --target package`) in the same OpenCV folder (as it is in the official OpenCV Windows packages from e.g. https://sourceforge.net/projects/opencvlibrary/files/4.6.0/opencv-4.6.0-vc14_vc15.exe/download).

The problem does not seem to exist for CMake 3.18 or below.

https://github.com/opencv/opencv/issues/6496 might be related.

I do not know if there can be an easy fix (some code already in .cmake Release files and related to MinSizeRel and RelWithDebInfo configurations should be also in .cmake Debug files...?), maybe ensuring Debug and Release builds of OpenCV are always together could be enough for now...
Repository: vscode
Issue: Add `selectionGroup` to TreeItem to allow for multiselect restrictions
Labels: feature-request,tree-views

Currently allowing multiselect on a TreeView is an all or nothing affair, and if the view contains items of different types that leads to a less than desirable user experience.

I'm starting to enable multiselect in GitLens and here is one example where I've enabled multiselect on the Stashes view

![image](https://user-images.githubusercontent.com/641685/183264527-7d96114c-e683-4323-aa10-1d93d25d1de0.png)

The selection now contains files & stashes, which grouped together as shown don't really make sense. And currently extensions can't limit selection in any way.

I'm proposing the addition of a new optional string `selectionGroup` (or even `selectionContext` property on `TreeItem`s to allow extensions to group/bound the items that can be selected.

So in the example above, I could have the "file" items have a `selectionGroup` of `"files"` and the "stashes" a `selectionGroup` of `"stashes"`. And then based on the first selected item, you would only be able to select other items in that same group. So if I started on a "file" I could only select other files, etc.

We may also want to allow the `selectionGroup` to be set to `*` if there were items you wanted to allow in any group.

This could be taken further, to have 2 props, one for the `selectionGroup` of the item itself, but another `allowedSelectionGroups` which could be a string array of all the selection groups that an item could belong to.

I think starting with `selectionGroup` alone gets us pretty far and imo would start there.

//cc @alexr00
Repository: electron
Issue: [Bug]: Maximize window visual glitch on Windows
Labels: platform/windows,bug :beetle:,component/BrowserWindow,20-x-y

### Preflight Checklist

- [X] I have read the [Contributing Guidelines](https://github.com/electron/electron/blob/main/CONTRIBUTING.md) for this project.
- [X] I agree to follow the [Code of Conduct](https://github.com/electron/electron/blob/main/CODE_OF_CONDUCT.md) that this project adheres to.
- [X] I have searched the [issue tracker](https://www.github.com/electron/electron/issues) for a bug report that matches the one I want to file, without success.

### Electron Version

20.0.1

### What operating system are you using?

Windows

### Operating System Version

Windows 11

### What arch are you using?

x64

### Last Known Working Electron version

_No response_

### Expected Behavior

No visual glitch, the whole window showing the background color (default or set using _backgroundColor_) until the content is loaded.

### Actual Behavior

On Windows using the _maximize_ method of _BrowserWindow_ after opening the app's window causes a visual glitch until it loads the content.
This results in a bad user experience.
Tested on Windows 10 & 11 64-bit.
Also tested on Ubuntu 22.04 64-bit, it's good, no visual glitch.
Tried with default window width and height.

Method:
[https://www.electronjs.org/docs/latest/api/browser-window#winmaximize](https://www.electronjs.org/docs/latest/api/browser-window#winmaximize)

Code:
```
const win = new BrowserWindow();
win.maximize();
```

Workaround:
Don't show the window, maximize it, then show it:
```
const win = new BrowserWindow({show: false});
win.maximize();
win.show();
```
Or hide the window, then maximize it, then show it:
```
const win = new BrowserWindow();
win.hide();
win.maximize();
win.show();
```

Test:
https://github.com/Adam777Z/electron-windows-visual-glitch-test

### Testcase Gist URL

_No response_

### Additional Information

_No response_
Repository: opencv
Issue: OpenCV mixes x86 and x64 when on a Windows 64 bit with MinGW 32 bit
Labels: category: build/install,platform: win32

##### System information (version)
- OpenCV => 4.5.4
- Operating System / Platform => Windows 64 Bit
- Compiler => MinGW 32 bit

##### Detailed description
I guess many people got this type of issue but I did not find existing clear description of what happens and what can be done.

Assume that you are on a 64 bit Windows with MinGW 32 bit installed. If you try to build OpenCV, code similar to 
https://github.com/opencv/opencv/blob/cde18648dc1f0251c782615e8fada80cab452a87/cmake/OpenCVDetectCXXCompiler.cmake#L179-L187
will probably set `OpenCV_ARCH=x64` while the compiler produces 32 bit code, so the 32 bit libraries will end in an x64 folder. This is probably what happens in https://github.com/huihut/OpenCV-MinGW-Build/tree/OpenCV-4.5.0-with-contrib (e.g. compare a .dll  with https://github.com/huihut/OpenCV-MinGW-Build/blob/OpenCV-4.5.5-x64/x64/mingw/bin/libopencv_highgui455.dll with the command `file`). 
The same kind of problem should happen also when building an application, even if OpenCV was built from a 32 bit computer (where everything is OK).

A good workaround seems to set manually CMake variables `OpenCV_ARCH=x86` and `OpenCV_RUNTIME=mingw` when building the library and when building the application (note also it can be a good way to build an old release of OpenCV (e.g. 4.2.0 from around 2020) with a version of Visual Studio not known when it was released (e.g. Visual Studio 2022 i.e. `OpenCV_RUNTIME=vc17`). 

However, begginers with OpenCV will probably not find that easily and might just stop trying to use it just due to that, so it could be good to avoid the problem. 
Unfortunately, from https://stackoverflow.com/questions/11944060/how-to-detect-target-architecture-using-cmake, it seems there is no standard solution (https://github.com/Amber-MD/cmake-buildscripts/blob/master/TargetArch.cmake might be a good idea, maybe `CMAKE_SIZEOF_VOID_P` could be better than `CMAKE_SYSTEM_PROCESSOR`...).