sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: 5.0: An opaque type from other modules isn't inferred correctly
Labels: Bug,Help Wanted,Domain: Quick Info

# Bug Report

### 🔎 Search Terms

- unique symbol
- type inference
- opaque

### 🕗 Version & Regression Information

- This changed between versions v4.9.5 and v5.0.2
- The nightly build also has the bug

### ⏯ Playground Link

[Playground (v5.0.2)](https://www.typescriptlang.org/play?ts=5.0.2#code/CYUwxgNghgTiAEBbA9sArhBAiA5jKADgBYCOEW8A3gFDzxjIB2AzgC7ytQ4Bc8ajASxJoEzAJ6IARsggBuWhzEEEAFS44QwADwrkAaxCMAfPAC8VBXThRgTCGPgBtTjgC6Afl66DjeXQC+fvAgAB4EyDDsrEoIAPIEUMIgOjEANPDehmZ8jHqMyADuxtkqMfAAZBnqmjr6hkZBoeGRisrwAIoiMGJaAPoAaum9AEom5vGJIlpsMAKMOA3U-tQA9CvwAGIwyIjwUPDAAgBmRyBwjOwo6JjUAojNUWWUHV1i6RNJ8P7wR9u7AOR4QikCD-eTUBgsdgANygEBEvA+UxmcwW2X+RAE-1W6wAkowGDA4GBWLxOmcegMhqMIUw2PASGTXlpKP50qyxvAMVjqLzQJBYAhIfSXAAmXj8IQieDiKQyeTRNpqHAaYCi2o+Tk0KwgGx2BzOLiijxeOq+JbyJoRR5tJEgdWlZTpTKMbL8PKFYrmR0ISrK1UOs2LK0tRUIcnddVU+AjTl26asWbzRY4+AAYQixNJLwpLLZVH8-iMtKhDPFOcjefZRfRmP+QA)


### 💻 Code

```typescript
declare const tag: unique symbol;
type Tagged<Token> = {
  readonly [tag]?: Token;
};
export type Opaque<Type, Token = unknown> = Type & Tagged<Token>;
export type Query<_V, _R> = Opaque<string>;

const q: Query<{}, {}> = 'query {}'
```

The opaque type that I borrowed from:
- https://younho9.dev/how-to-iterate-object-more-safely (Korean)
- https://evertpot.com/opaque-ts-types/

### 🙁 Actual behavior

The type of `q` is annotated correctly, `Query<{}, {}>` while the declaration of `Query` is on the same file. However, when I moved it to another file, the `q` is inferred as `Query<_V, _R>`. It is not reproduced on v4.9.5.

### 🙂 Expected behavior

The type of `q` should be inferred as `Query<{}, {}>` wherever the declaration of `Query` is located.
Repository: material-ui
Issue: [Joy] Add `useMarginGap` to all components
Labels: waiting for 👍,package: joy-ui,customization: theme

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Summary 💡

The current implementation of all components are using `margin` to create appropriate spacing because flexbox gap support is at 92.92% whereas CSS grid gap is at 94.63%

Joy UI should adopt `gap` by default, and allow developers to switch to `margin` if they need to support older browsers.

This prop is the same concept as the `Stack` component's [`useFlexGap`](https://mui.com/material-ui/react-stack/#flexbox-gap) prop but with the other way around.

### Examples 🌈

This can be applied at the component level:

```js
<Card useMarginGap>…</Card>
```

or at the theme level (affect all instances):

```js
extendTheme({
  components: {
    JoyCard: {
      defaultProps: {
        useMarginGap: true,
      }
    }
  }
})
```

### Motivation 🔦

Being able to use flexbox `gap` is much better than margin hacks, e.g. multi lines.

Some type of application such as internal tool or [electron app](https://www.electronjs.org/) where old browser is not the problem are common nowadays.
Repository: storybook
Issue: [Feature Request]: Test runner for multiple viewports
Labels: feature request,test-runner

### Is your feature request related to a problem? Please describe

When writing interaction tests that behave differently based on the viewport (e.g based on `queryByRole` finding a "mobile menu button" for example), the test runner will only execute the "desktop" branches, and coverage for the mobile parts won't be collected.

### Describe the solution you'd like

The testrunner can run stories in multiple viewports and merges test coverage to give a clear indication of what percentage of the UI is covered by chromatic regression tests.

### Describe alternatives you've considered

Create dedicated stories with a fixed viewport, but that is counter-intuitive with chromatic already snapshotting the same story in multiple viewports.

### Are you able to assist to bring the feature to reality?

yes, I can

### Additional context

_No response_
Repository: stable-diffusion-webui
Issue: [Feature Request]: Integration request for GLIGEN
Labels: enhancement,extension-request

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

To be able to control the position of generated objects

### Proposed workflow

1. Go to https://huggingface.co/gligen/diffusers-inpainting-text-box
2. integrate GLIGEN into the extension


### Additional information

_No response_
Repository: material-ui
Issue: [joy-ui] Add animation/transition support
Labels: new feature,waiting for 👍,priority: important,package: joy-ui,design: joy,customization: css

### Duplicates

- [X] I have searched the existing issues

### Latest version

- [X] I have tested the latest version

### Summary 💡

Currently, Joy UI components do not have built-in animation or transition. Joy UI should provide an API or a guide to integrate with existing popular libraries:

- https://www.framer.com/motion/
- https://www.react-spring.dev/
- [react-transition-group](https://reactcommunity.org/react-transition-group/)

### Examples 🌈

_No response_

### Motivation 🔦

Animation and transition is an important part in building modern web application.
Repository: PowerToys
Issue: FancyZones: switch between layouts when zones are enabled
Labels: FancyZones-Layouts,Needs-Triage

### Description of the new feature / enhancement

If I move a window and the zones are already active, I want to switch to another layout with the mouse wheel during this process.

To reduce the number of layouts you can switch with the mouse wheel, you should be able to group layouts that belongs together.
For example 2 Groups: 
- Homeoffice
- Normal office

In my case, each group would contain two layouts.

### Scenario when this would be used?

Most of the day I need a layout with two zones. Sometimes I need 3 zones, where one zone is identical to my default layout. Sometimes I need 3 zones, where one zone is identical to my default layout. I want to quickly add or remove the third zone with the mouse wheel. Since I have different layouts for home office and office, it feels too complicated with shortcuts. 

### Supporting information

_No response_
Repository: pytorch
Issue: torch.randn signature is missing generator
Labels: module: docs,triaged,enhancement,module: random,module: python frontend

### 📚 The doc issue

[torch.randn](https://pytorch.org/docs/stable/generated/torch.randn.html) lacks `generator` argument in the signature `torch.randn(*size, *, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False, pin_memory=False)`.

### Suggest a potential alternative/fix

Add `generator`, like in [torch.rand](https://pytorch.org/docs/stable/generated/torch.rand.html#torch.rand): 
`torch.randn(*size, *, generator=None, out=None, dtype=None, layout=torch.strided, device=None, requires_grad=False, pin_memory=False)`

cc @svekars @carljparker @pbelevich @albanD
Repository: PowerToys
Issue: [Registry Preview] Support tabs in the UI to open multiple files 
Labels: Idea-Enhancement,Product-Registry Preview

### Description of the new feature / enhancement

Having multiple tabs with different files at the same time can be helpful. Can we add a tab feature.

### Scenario when this would be used?

Working with multiple files.

### Supporting information

_No response_
Repository: rust
Issue: `-Ztrait-solver=next`: deduplicate region constraints in query responses
Labels: A-trait-system,T-compiler,WG-trait-system-refactor,A-coinduction

```rust
pub struct Bar
where
    for<'a> &'a mut Self:;

fn main() {}
```
results in overflow in the new solver when checking `WF(Bar)` or `for<'a> WF(&'a mut Bar). The issue is as follows:

```rust
pub struct Bar
where
    for<'a> &'a mut Bar:;
```
- `for<'a> WF(&'a mut Bar)` (attempt 0)
	- `WF(&'a.1 mut Bar)`
		- `outlives(Bar, 'a.1)` OK `[Bar: 'a.1]`
		- `WF(Bar)`
			- `for<'a> WF(&'a mut Bar)` cycle OK `[]`
	- RESULT:  OK `[Bar: 'a.1]`
- `for<'a> WF(&'a mut Bar)` (attempt 1)
	- `WF(&'a.1 mut Bar)`
		- `outlives(Bar, 'a.1)` OK `[Bar: 'a.1]`
		- `WF(Bar)`
			- `for<'a> WF(&'a mut Bar)` cycle OK `[Bar: 'a.2]` (create new universe)
	- RESULT:  OK `[Bar: 'a.1, Bar: 'a.2]`
- `for<'a> WF(&'a mut Bar)` (attempt 2)
	- `WF(&'a.1 mut Bar)`
		- `outlives(Bar, 'a.1)` OK `[Bar: 'a.1]`
		- `WF(Bar)`
			- `for<'a> WF(&'a mut Bar)` cycle OK `[Bar: 'a.2, Bar: 'a.3]` (create new universe)
	- RESULT:  OK `[Bar: 'a.1, Bar: 'a.2, Bar: 'a.3]`

starting with `WF(BAR)`
- `WF(Bar)` iteration 0
	- `for<'a> WF(&'a mut Bar)`
		- `WF(&'a.1 mut Bar)`
			- `outlives(Bar, 'a.1)` OK `[Bar: 'a.1]`
			- `WF(Bar)` cycle OK `[]`
- `WF(Bar)` iteration 1
	- `for<'a> WF(&'a mut Bar)`
		- `WF(&'a.1 mut Bar)`
			- `outlives(Bar, 'a.1)` OK `[Bar: 'a.1]`
			- `WF(Bar)` cycle OK `[Bar: 'a.?]`

a similar issue is:
```rust
struct Foo
where
    Foo:,
    for<'a> &'a ():;
```
- `WF(Foo)` iteration 0
	- `WF(Foo)` cycle OK `[]`
	- `for<'a> WF(&'a ())` OK `[(): 'a.1]`  (new universe for unnameable placeholder)
	- result OK `[(): 'a.1]`
- `WF(Foo)` iteration 1 (in new infcx)
	- `WF(Foo)` cycle OK `[(): 'a.1]` (new universe for unnameable placeholder)
	- `for<'a> WF(&'a ())` OK `[(): 'a.2]`  (new universe for unnameable placeholder)
	- result OK `[(): 'a.1, (): 'a.2]` yikes (have to rerun again)

The long term plan to solve this is to eagerly deal with new placeholders in the solver, short term ~~we probably want to somehow deduplicate new placeholder constraints when creating the query response~~ we're going to ignore this because hopefully this pattern does not exist in user-code.

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"ndrewxie"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: stable-diffusion-webui
Issue: [Feature Request]: Can get the image filename&path in the custom script during img2img batch
Labels: enhancement

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What would your feature do ?

Get to known which image is under processing and handle more customized parameters according to the specified image file.

### Proposed workflow

1. In Script.run() function, get image name and read more contents from the disk by using the filename of the image

### Additional information

Currently I save the image filename in the state.job string
Repository: vscode
Issue: narrator and NVDA does not report process manager list item names in Visual Studio Code
Labels: bug,accessibility,windows,workbench-diagnostics,list-widget,confirmed

Type: <b>Bug</b>

### Steps to reproduce:
1. Open Visual Studio Code
2. Press Alt + H, P
3. Navigate to the list and press the up or down arrow

### Actual behavior:
NVDA only reports "list item"
### Expected behavior:
NVDA should report the names of list items.
For details, please see: https://github.com/nvaccess/nvda/issues/14721

VS Code version: Code 1.76.2 (ee2b180d582a7f601fa6ecfdad8d9fd269ab1884, 2023-03-14T17:55:54.936Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Sandboxed: No

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i5-8350U CPU @ 1.70GHz (8 x 1896)|
|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: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: disabled_off|
|Load (avg)|undefined|
|Memory (System)|15.88GB (8.71GB free)|
|Process Argv|--crash-reporter-id 08ab617a-b493-4182-980e-7383997e95a3|
|Screen Reader|yes|
|VM|0%|
</details><details>
<summary>A/B Experiments</summary>

```
vsliv368cf:30146710
vsreu685:30147344
python383:30185418
vspor879:30202332
vspor708:30202333
vspor363:30204092
vslsvsres303:30308271
vserr242:30382549
pythontb:30283811
vsjup518:30340749
pythonptprofiler:30281270
vshan820:30294714
vstes263:30335439
pythondataviewer:30285071
vscod805:30301674
binariesv615:30325510
bridge0708:30335490
bridge0723:30353136
cmake_vspar411:30581797
vsaa593cf:30376535
pythonvs932:30410667
cppdebug:30492333
vscaat:30438848
vsclangdf:30486550
c4g48928:30535728
dsvsc012:30540252
pynewext54:30695312
azure-dev_surveyone:30548225
nodejswelcome1:30587005
3biah626:30602489
pyind779:30671433
f6dab269:30613381
pythonsymbol12:30671437
2i9eh265:30646982
pythonb192:30669360
functionswalk:30687959
pythonms35cf:30686773

```

</details>

<!-- generated by issue reporter -->
Repository: deno
Issue: Embedder's guide to snapshotting
Labels: docs,suggestion,custom runtime

_Continuing the discussion from https://github.com/denoland/deno/pull/18271#discussion_r1150218083._

It would be great to have a guide for embedders showing how to set up their build to create a snapshot of all JS files bundled in their custom runtime to get faster startup times.

I can probably figure this out by reading the source code of Deno core & cli, but it would be much nicer if there were a guide. Having said that, both the guide and snapshotting are pretty much "nice to have" for us right now.

Another possible solution is to add an example to `deno_core` to show this in actions.

Quoting from https://github.com/denoland/deno/pull/18271#discussion_r1150259267:
> there's no official guide - but long story short - you need to define `extension!` in your `build.rs` script when creating a snapshot and include all the files you want. Looking at `runtime/build.rs` and `cli/build.rs` (the latter creates a snapshot from existing snapshot) is the fastest way to see it in action. If you could open an issue about it we can look into adding some examples to `deno_core`.
Repository: svelte
Issue: Delay transition until after onMount
Labels: transition/animation

### Describe the problem

When using the slide transition Svelte calculates the end height based on the computed styles when onMount is fired (from what I gather). I am initializing another library within my onMount (TipTap) which further increases the height of my component. However the height used by slide transition doesn't take this into consideration since TipTap is initialized under onMount which results in an incorrect end transition height. 

Here is a replication of the issue:
https://svelte.dev/repl/d193adecf8d44337a2ebd05b59238296?version=3.57.0

### Describe the proposed solution

A way to use transitions when initializing third-party libraries under onMount. Not sure how this would work. Maybe a delay in height calculation?

### Alternatives considered

Writing my own slide transition function but I couldn't figure out a way to delay the height calculation

### Importance

would make my life easier
Repository: vscode
Issue: Reserved keybinding prefixes
Labels: feature-request,keybindings

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->

One thing I found very useful about Emacs is that there's a clearly defined convention for parts of the keybinding space.

In particular, "Ctrl+C letter" is reserved for user keybindings. Core emacs and emacs extensions will never use that, so I have a keybinding space that I can use, and I can always sure it will never conflict with any extension. (And there's also a convention for emacs extensions that will not collide with core emacs bindings.)

It's probably going to be tricky to define a convention like that now for vscode, especially with wide use of variant keymaps. But I think it would be immensely useful, and worth trying to define and promote.
Repository: flutter
Issue: [Web] Link on NavigationRail
Labels: c: new feature,framework,f: material design,c: proposal,team-design,triaged-design

I'm developing an application with Flutter Web and I use NavigationRail to design the side menu. I would like users to be able to open some of these menus in a new tab or window using the right mouse button (just like you can on a conventional website).

In other parts of the system I can accomplish this using the url_launcher's Link widget. However, in NavigationRail I didn't find a way to do that.

I believe it would be interesting to incorporate this function into NavigationRail, as it is very useful for applications with Flutter Web.
Repository: tauri
Issue: [feat] get the size of the taskbar
Labels: type: feature request

### Describe the problem

I would like to get the size and location of the taskbar.
I'd like to see cross-platform support (Windows, Mac, Linux).
Using this, we would like to create a function that will pull the window to the edge when it comes to the edge of the screen.

### Describe the solution you'd like

I think adding taskbar position and size information to the Monitor class would be a good idea, but there may be a better way.

### Alternatives considered

I asked a question in the discussion and the following method seems to solve the problem in Windows.
https://github.com/tauri-apps/tauri/discussions/1336#discussioncomment-5474834

### Additional context

_No response_
Repository: flutter
Issue: VisualDensity.adaptivePlatformDensity uses defaultTargetPlatform instead of ThemeData.platform
Labels: framework,f: material design,has reproducible steps,found in release: 3.7,found in release: 3.9,team-design,triaged-design

I'm working on a design system for a Flutter app. This design system supports Android and iOS only. Our component-housing of choice is Widgetbook. Widgetbook, along with many other ways of sharing design systems, is web based. Because of this, Platform reports itself as web. Alternatively, building Widgetbook as a desktop app reports the platform as macOS (or windows/linux). I'd like to see my widgets as if they are on the Android/iOS platform, regardless of true platform. This for some widgets is accomplished by using `Theme.of(context).platform` as specified in the documentation for `defaultTargetPlatform` [here](https://github.com/flutter/flutter/blob/master/packages/flutter/lib/src/foundation/platform.dart).

"Widgets from the material library should use [Theme.of] to determine the current platform for styling purposes, rather than using [defaultTargetPlatform]"

However, `VisualDensity.adaptivePlatformDensity` which is the default setting for Material button densities uses a switch case on `defaultTargetPlatform` instead of the ambient `ThemeData`s `platform`. This means that without explicitly setting the `visualDensity` to `comfortable` in the individual button's styles or the `elevatedButtonTheme` (or outlined/text/etc) in `ThemeData`, there is no way to allow buttons to continue being platform adaptive AND force them to a specific platform in certain scenarios (like my Widgetbook).

The Material buttons, and other places that use `VisualDensity` should retrieve the target platform from `ThemeData` as the above comment suggests.

## Steps to Reproduce

1. Run a standard `flutter create` app on web or desktop with the following contents of the Scaffold body:
```
  final theme = Theme.of(context);
  return Row(
    children: [
      ElevatedButton(
        onPressed: () {},
        child: const Text('Button'),
      ),
      Theme(
        data: theme.copyWith(platform: TargetPlatform.android),
        child: ElevatedButton(
          onPressed: () {},
          child: const Text('Button'),
        ),
      ),
    ],
  );
```

**Expected results:**
<img width="166" alt="image" src="https://user-images.githubusercontent.com/3476942/228858091-d18812d1-d418-4995-8526-17caaed24095.png">
The first button due to being on web/desktop platform would render with a `compact` density while the second renders with `comfortable` due to the ambient Theme supplying a new `TargetPlatform`

**Actual results:**
<img width="173" alt="image" src="https://user-images.githubusercontent.com/3476942/228858440-4585dadb-d7e3-4108-8ec2-90e55057f5cc.png">
Two buttons that look the same with a `compact` density despite an explicit `TargetPlatform.android` and the knowledge from the documentation that "Widgets from the material library should use [Theme.of] to determine the current platform for styling purposes, rather than using [defaultTargetPlatform]".
Repository: go
Issue: x/text/message/catalog: unclear how to implement Dictionary
Labels: NeedsInvestigation

The documentation for [`catalog.Dictionary`](https://pkg.go.dev/golang.org/x/text@v0.8.0/message/catalog#Dictionary) says

> returns a message compiled with catmsg.Compile

But catmsg is an internal package that I can't use.

According to <https://medium.com/@oborin/localization-in-go-with-enclosing-packages-6fe2efb85a15>, I should prefix my message with `"\x02"`, but there's no explanation why that is. As far as I can tell that corresponds to handler `catmsg.msgRaw`, and seems to work, but since it is undocumented I'm afraid that could stop working any day.

Let me take a step back and explain why I'm interested in this. My actual goal is to write unit tests for translated text that are independent of the actual translations, so they do not break if translations change. My understanding is that I can't mock `message.Printer` using an interface, as gotext relies on the exact type to extract the translation keys from the source code, so I have decided to instead use a custom Catalog that returns keys unchanged.

This appears to work, but I'd like a guarantee that it will continue to do so.

```go
package main

import (
	"golang.org/x/text/language"
	"golang.org/x/text/message"
	"golang.org/x/text/message/catalog"
)

type debugDictionary struct{}

var _ catalog.Dictionary = debugDictionary{}

func (debugDictionary) Lookup(key string) (data string, ok bool) {
	// this magic \x02 makes me uneasy
	return fmt.Sprintf("\x02<%s>", key), true
}

func ExampleLocalization() {
	cat, err := catalog.NewFromMap(map[string]catalog.Dictionary{
		"en": debugDictionary{},
	})
	if err != nil {
		panic(err)
	}
	p := message.NewPrinter(language.English, message.Catalog(cat))
	p.Printf("foo")
	fmt.Println()
	p.Printf("unknownUser %s", "test")
	// Output:
	// <foo>
	// <unknownUser test>
}
```
Repository: flutter
Issue: [web] Add support for --local-web-sdk in benchmarks
Labels: platform-web,P2,p: web_benchmarks,team-web,triaged-web

We need this in order to run benchmarks against a `wasm_release` build of the web engine.
Repository: PowerToys
Issue: Allow alternative zone or disable FancyZones when laptop is not conected to other monitors
Labels: Needs-Triage

### Description of the new feature / enhancement

I use my laptop generally conected to a big monitor, and I use FancyZones, everything is fine.

BUT, when I'm on the road only with the laptop I wish I could pick a diferent zone layout, or at least the standard Windows zone management

### Scenario when this would be used?

I'm less productive when I am on the road 

### Supporting information

_No response_