sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: runtime: TestGdbPython* failures
Labels: NeedsInvestigation,compiler/runtime

```
#!watchflakes
post <- pkg == "runtime" && test ~ `TestGdbPython`
```

Issue created automatically to collect these failures.

Example ([log](https://build.golang.org/log/4a8cd38b793e1cbb812c94646710fff9982d15cf)):

    panic: test timed out after 10m0s
    running tests:
    	TestGdbPythonCgo (9m38s)
    
    syscall.Syscall6(0x0?, 0x14ea04?, 0xc?, 0x2?, 0x1?, 0xc0001a4580?, 0xc00009e3d0?)
    	/workdir/go/src/syscall/syscall_linux.go:91 +0x28 fp=0xc0000df6b8 sp=0xc0000df620 pc=0xa10b8
    os.(*Process).blockUntilWaitable(0xc0013605d0)
    	/workdir/go/src/os/wait_waitid.go:32 +0x8c fp=0xc0000df7a0 sp=0xc0000df6b8 pc=0xc7f1c
    os.(*Process).wait(0xc0013605d0)
    	/workdir/go/src/os/exec_unix.go:22 +0x3c fp=0xc0000df820 sp=0xc0000df7a0 pc=0xc223c
    os.(*Process).Wait(...)
    	/workdir/go/src/os/exec.go:132
    os/exec.(*Cmd).Wait(0xc0001a4580)
    	/workdir/go/src/os/exec/exec.go:890 +0x54 fp=0xc0000df8b8 sp=0xc0000df820 pc=0x14f284
    os/exec.(*Cmd).Run(0x58?)
    	/workdir/go/src/os/exec/exec.go:590 +0x50 fp=0xc0000df8e8 sp=0xc0000df8b8 pc=0x14e080
    os/exec.(*Cmd).CombinedOutput(0xc0001a4580)
    	/workdir/go/src/os/exec/exec.go:1005 +0xb8 fp=0xc0000df940 sp=0xc0000df8e8 pc=0x14fb98
    runtime_test.testGdbPython(0xc0002cb520, 0x1)
    	/workdir/go/src/runtime/runtime-gdb_test.go:272 +0x1d84 fp=0xc0000dfef0 sp=0xc0000df940 pc=0x33db94
    runtime_test.TestGdbPythonCgo(0x4a96f8?)
    	/workdir/go/src/runtime/runtime-gdb_test.go:167 +0x68 fp=0xc0000dff30 sp=0xc0000dfef0 pc=0x33bdf8
    testing.tRunner(0xc0002cb520, 0x4473e8)


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: pytorch
Issue: Support managed memory backed dlpack with  torch.from_dlpack
Labels: feature,triaged,module: dlpack

### 🚀 The feature, motivation and pitch

Pytorch should support using managed memory based dlpack capsules.  

### Set Pools
```python3
import rmm
from rmm.allocators.torch import  rmm_torch_allocator
from rmm.allocators.cupy import  rmm_cupy_allocator
import torch
import cupy as cp

rmm.reinitialize(managed_memory= True)
cp.cuda.set_allocator(rmm_cupy_allocator)
torch.cuda.memory.change_current_allocator(rmm_torch_allocator)
```


```python3
dlpack_cap = cp.ones(shape=100).toDlpack()
t2 = torch.from_dlpack(dlpack_cap)
```
```python3
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
Cell In[2], line 2
      1 dlpack_cap = cp.ones(shape=100).toDlpack()
----> 2 t2 = torch.from_dlpack(dlpack_cap)

File /datasets/vjawa/miniconda3/envs/cugraph_dev_feb_27/lib/python3.10/site-packages/torch/utils/dlpack.py:120, in from_dlpack(ext_tensor)
    117 else:
    118     # Old versions just call the converter
    119     dlpack = ext_tensor
--> 120 return _from_dlpack(dlpack)

RuntimeError: Unsupported device_type: 13

```


### Alternatives

A user can use cuda array interface to work around it for now. 

```python3
ar = cp.ones(shape=100)
t2 = torch.as_tensor(ar, device='cuda')
```

### Additional context

CC: @leofang , @jakirkham
Repository: flutter
Issue: Stop building/uploading unsound web dills
Labels: tool,P2,team-tool,triaged-tool

After https://github.com/flutter/flutter/pull/120936, the Flutter CLI tool is no longer using any unsound platform dills. We no longer need to compile them or include them in the Flutter Web SDK.
Repository: pytorch
Issue: views created in __torch_dispatch__ share storage but not version_counter
Labels: module: autograd,module: molly-guard,triaged,needs design,module: __torch_dispatch__

Usually the ADInplaceOrView kernel is responsible for handling this, but since we're operating under autograd, the version counter information is not correctly propagated.

```python
saved_b = None

class SaveATensorMode(TorchDispatchMode):
    def __torch_dispatch__(self, func, types, args=(), kwargs=None):
        global saved_b
        kwargs = {} if kwargs is None else kwargs
        out = func(*args, **kwargs)
        if func == torch.ops.aten.sin.default:
          saved_b = out.view_as(out)
        return out

a = torch.tensor(1.)
with SaveATensorMode():
    b = torch.sin(a)

assert b.data_ptr() == saved_b.data_ptr()

old_b_version = b._version
old_saved_b_version = saved_b._version
b.mul_(2)

print(b._version > old_b_version)  # True
print(saved_b._version > old_saved_b_version)  # False

old_b_version = b._version
old_saved_b_version = saved_b._version
saved_b.mul_(2)

print(b._version > old_b_version)  # False
print(saved_b._version > old_saved_b_version)  # True

```

Previously this was probably intentional for inference mode, but it may be useful to support version counter propagation for `__torch_dispatch__` use cases to prevent common silently correctness issues.

If this were a Tensor subclass, we could probably enable_reentrant_dispatch, but that may not work for modes (can we fix this?).

cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved @Lezcano @Varal7 @Chillee @samdow
Repository: storybook
Issue: [Feature Request]: CSF3 Autofixer shouldn't hoist arg uses above declarations
Labels: bug,help wanted,codemods,sev:S3

### Is your feature request related to a problem? Please describe

When migrating a story defined like:

```js
export const MyStory = (props) => <MyComponent {...props} />
const defaultArgs = { foo: 'bar'}
MyStory.args = defaultArgs
```

using the args is hoisted above the constant definition:

```js
export const MyStory = {
  render: (props) => <MyComponent {...props} />,
  args: defaultArgs,
}
const defaultArgs = { foo: 'bar'}
```

### Describe the solution you'd like

Ideally the codemod would move the constant declaration above where it was used:

```js
const defaultArgs = { foo: 'bar'}
export const MyStory = {
  render: (props) => <MyComponent {...props} />,
  args: defaultArgs,
}
```

### Describe alternatives you've considered

I looked, but there's not an autofixer for this in eslint or ts. I can check to see if theres an existing codemod that can help with this.

### Are you able to assist to bring the feature to reality?

yes, I can

### Additional context

_No response_
Repository: go
Issue: runtime/coverage: `slice bounds out of range` in `(*emitState).VisitFuncs`
Labels: NeedsInvestigation,compiler/runtime

```
#!watchflakes
post <- log ~ `panic: runtime error: slice bounds out of range` && log ~ `\s*runtime/coverage\.\(\*emitState\)\.VisitFuncs`
```

(Pulled out from https://github.com/golang/go/issues/55311#issuecomment-1460641424.)

<details><summary>2023-02-27 19:43 linux-arm64-longtest go@002bc94e cmd/go.TestScript (<a href="https://build.golang.org/log/a0df368bcbccf443009d16c36bd49718bbda3fce">log</a>)</summary>

    vcs-test.golang.org rerouted to http://127.0.0.1:40571
    https://vcs-test.golang.org rerouted to https://127.0.0.1:44117
    go test proxy running at GOPROXY=http://127.0.0.1:39707/mod
    2023/02/27 20:09:52 http: TLS handshake error from 127.0.0.1:39140: read tcp 127.0.0.1:44117->127.0.0.1:39140: read: connection reset by peer
    2023/02/27 20:09:52 http: TLS handshake error from 127.0.0.1:39110: EOF
    2023/02/27 20:09:52 http: TLS handshake error from 127.0.0.1:39170: EOF
    2023/02/27 20:09:55 http: TLS handshake error from 127.0.0.1:51238: EOF
    --- FAIL: TestScript (0.07s)
        --- FAIL: TestScript/cover_pkgall_imports (5.98s)
            script_test.go:134: 2023-02-27T20:10:24Z
    ...
                panic: runtime error: slice bounds out of range [:4294970564] with capacity 28534
    
                goroutine 1 [running]:
                panic({0x1ca960?, 0x40000160f0?})
                	/tmp/workdir/go/src/runtime/panic.go:1015 +0x5cc fp=0x40000cb330 sp=0x40000cb280 pc=0x7206c
                runtime.goPanicSliceAcap(0x100000cc4, 0x6f76)
                	/tmp/workdir/go/src/runtime/panic.go:139 +0xa8 fp=0x40000cb370 sp=0x40000cb330 pc=0x6f118
                runtime/coverage.(*emitState).VisitFuncs(0x40000aa140, 0x4000028770)
                	/tmp/workdir/go/src/runtime/coverage/emit.go:541 +0x698 fp=0x40000cb4b0 sp=0x40000cb370 pc=0x162c98
                internal/coverage/encodecounter.(*CoverageDataWriter).writeCounters(0x40000789c0, {0x20e438, 0x40000aa140})
    ...
                testing.(*M).Run.func4()
                	/tmp/workdir/go/src/testing/testing.go:1901 +0x28 fp=0x40000cbc90 sp=0x40000cbc70 pc=0x17da78
                testing.(*M).Run(0x40000aa0a0)
                	/tmp/workdir/go/src/testing/testing.go:1948 +0xe70 fp=0x40000cbee0 sp=0x40000cbc90 pc=0x17d770
                main.main()
                	_testmain.go:78 +0x1f0 fp=0x40000cbf70 sp=0x40000cbee0 pc=0x19b620
                runtime.main()
                	/tmp/workdir/go/src/runtime/proc.go:250 +0x398 fp=0x40000cbfd0 sp=0x40000cbf70 pc=0x76628
                runtime.goexit()
                	/tmp/workdir/go/src/runtime/asm_arm64.s:1172 +0x4 fp=0x40000cbfd0 sp=0x40000cbfd0 pc=0xcd644
</details>

I feel like this might already have a fix CL, but I can't seem to find it..?

(attn @thanm)
Repository: flutter
Issue: [Impeller] Consider removing Paint.isAntiAlias from the API.
Labels: engine,P3,e: impeller,team-engine,triaged-engine

Stub for the point of discussion on whether Impeller should support this at all. The distinction between surface and geometric aliasing for the "pixel art" use-cases is being reasoned about in https://github.com/flutter/flutter/issues/122219.
Repository: stable-diffusion-webui
Issue: [Feature Request]: Add a buttons to adjust the total res by 1 click up or 1 click down |image attach|
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 ?

![image](https://user-images.githubusercontent.com/56544202/223835030-eb2914d6-340a-433c-b97a-49a2eefd1e79.png)

With the help of these buttons it will be much more convenient to control fixed resolutions. Sometimes you want the same aspect ratio just one step more.

So what do you think? :)

### Proposed workflow

.

### Additional information

_No response_
Repository: pytorch
Issue: pytreeify decorators
Labels: feature,triaged,module: pytree,module: functorch

Hello Functorch!

I am working on rewriting the PennyLane pytorch interface (quantum software) and I think your project can be really useful!

Currently I am trying to bypass the limitation of `autograd.Function` that only supports returning Tensor or a tuple of Tensor as return type. I have read that you want to be able to support `autograd.Function` https://github.com/pytorch/functorch/issues/1031 in Functorch. Do you think it will be possible to define functions  (`autograd.Function`) that return arbitrarily nested tuple structure? Like in Jax I would like to define `custom_vjp` (vjp needs to match Pytree structure of the function parameters) or `custom_jvp` (jvp needs to match Pytree structure of the function return).

To summarize: when you add support for custom gradient (with autograd.Function) can you also remove the structure limitation of the function return type `autograd.Function`? Or alternatively if you don't add this support but build your own custom_vjp, custom_jvp can try to avoid any limitation for the return type of functions?

Example with `autograd.function`:
```
import functorch

class ExecuteTapesNew(torch.autograd.Function):
    @staticmethod
    def forward(ctx, param_0, param_1, param_2, param_3):
        #Support Pytree structure
        return tuple([tuple([param_0, param_1]), tuple([param_2, param_3])])

    @staticmethod
    def backward(ctx, *dys):
        jac = compute_jac(params)
        vjp = dys * jacobian
        # VJP match the structure of the parameters
        return tuple(vjp)

def execute(param_0, param_1, param_2, param_3):
    return ExecuteTapesNew.apply(param_0, param_1, param_2, param_3)

jac = functorch.jacrev(execute, argnums=(0,1,2,3))(param_0, param_1, param_2, param_3)
```
Example Jax like:
```
@jax.custom_vjp
def f(param_0, param_1, param_2, param_3):
  return tuple([tuple([param_0, param_1]), tuple([param_2, param_3])])

def f_fwd(param_0, param_1, param_2, param_3):
  return f(param_0, param_1, param_2, param_3), ()

def f_bwd(res, g):
  return (param_0*g, param_1*g, param_2*g, param_3*g)

f.defvjp(f_fwd, f_bwd)
```

cc @zou3519 @soumith @Chillee @samdow @kshitij12345 @janeyx99
Repository: TypeScript
Issue: Unable to retain JSDocs for higher order function
Labels: Suggestion,Needs Proposal,Domain: JSDoc

# Bug Report

When it comes to higher order function, the JSDocs for the resulting function are not persisted after transpile. `declarationMap` does not help in this regards either.

### 🔎 Search Terms

jsdocs, comments, higher order function, declarationmap

### 🕗 Version & Regression Information

4.9.4, but this should happen to all older versions.

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

Please keep and fill in the line that best applies:
-->
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________

### ⏯ Playground Link

No playground link, as this requires transpilation.

### 💻 Code

```ts
/**
 * this comment retains
 **/
export function higher() {

  /**
   * this comment does not
   **/
  return function() {}
}
```

When using this code locally, the returning function does get the comment:

```ts
const foo = higher()

foo() // comment shows here
```

But once it is transpiled and published, the consumer of the package will not get the comment,
even if the package include the source, and using `declarationMap`


### 🙁 Actual behavior

No JSDocs comment.

### 🙂 Expected behavior

JSDocs comment should retain to aids consumer of the package.
Repository: PowerToys
Issue: Possible Feature: a light view file in hex view (or in a super light hex editor)
Labels: Idea-New PowerToy,Needs-Triage

### Description of the new feature / enhancement

As a developer, I frequently find the need to view a file in hex.  For hardcore hex editing, I use something like HxD, but it might be a useful utility to right click on a file and be able to quickly view it in hex.  (An additional side feature would be for there to be a link in the view to "open in Hex Editor" where I supply my chosen hex editor to do so.)  Maybe it could also include an option to export portions of the hex to a text file (or the clip board) so that someone could send the content to some else who was trying to remotely help them debug a problem.)

### Scenario when this would be used?

I was recently trying to remotely help a user who is dealing with some "corrupt" recovered media files.  We don't even know what the file contents are (there were multiple files recovered of multiple media types.)  A simple hex viewer would be very helpful to this non-developer user (non power user even) to get me info to help them.  (I didn't figure I could take them through the process of installing HxD and then how to use it successfully via a remote session.)

Also, as a developer, I frequently find the need to "peek" into a binary file to check something, and a full blown hex editor is a bit over kill for just a "view".

### Supporting information

_No response_
Repository: PowerToys
Issue: Fancy Zones: work *with* Snap
Labels: Idea-Enhancement,FancyZones-Hotkeys,Product-FancyZones,Needs-Triage

### Description of the new feature / enhancement

Introduce a set of shortcuts (e.g. Win + Shift + arrow) to control behavior of Fancy Zones from the keyboard while also allowing for traditional quarters-halves-full window management of Snap.

### Scenario when this would be used?

When I don't want to have too many fancy zones set up to avoid a mess when dragging window with a mouse, yet still want to use all possible options for window management. E.g. I have a screen set up in thirds and horizontal halves while regularly using a full screen view. Sometimes I also want to place a window in a quarter view. That makes it 5 different fancy zones (thirds, h. halves, v. halves, full screen, quarters) per point of a screen, making it incredibly messy to navigate.

### Supporting information

_No response_
Repository: next.js
Issue: Build function returning error
Labels: bug

### Verify canary release

- [X] I verified that the issue exists in the latest Next.js canary release

### Provide environment information

```bash
To
```


### Which area(s) of Next.js are affected? (leave empty if unsure)

CLI (create-next-app)

### Link to the code that reproduces this issue

Gggggg

### To Reproduce

Yarn build

### Describe the Bug

Yarn build, failing with error:`Missing parameter name at 6`

### Expected Behavior

Build should be successful 

### Which browser are you using? (if relevant)

Android Chrome

### How are you deploying your application? (if relevant)

next start
Repository: rust
Issue: `unsafe_code` lint fires for `unsafe fn` with safe body
Labels: A-diagnostics,T-lang,T-compiler

```rust
#![forbid(unsafe_op_in_unsafe_fn)]
#![forbid(unsafe_code)]

trait Foo {
    unsafe fn dangerous();
}

struct SafeImpl;

impl Foo for SafeImpl {
    unsafe fn dangerous() {
        println!("this is safe!");
    }
}
```

https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=3f3fbdb3494c6770487823f284c303f9

With `forbid(unsafe_op_in_unsafe_fn)`, an `unsafe fn`'s body in principle no longer has an implicit `unsafe` block. So, `unsafe_code` should not trigger on an `unsafe fn` alone: there is not necessarily any unsafe code inside!

This has practical effect. Consider one crate defining interfaces with unsafe methods (e.g. representing an OS API). Another crate wants to create mock implementations of these interfaces that are 100% safe. While any crate consuming these mocks will necessarily contain `unsafe {...}` blocks, it is nice for the test support crate to declare it itself has only safe code.

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

<!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":"Ezrashaw"}$$TRIAGEBOT_ASSIGN_DATA_END -->

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: stable-diffusion-webui
Issue: [Feature Request]: Syntax change to include Step Range in Prompt Editing
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 ?

Allow for Prompt Editing to be used from X to Y steps more intuitively.

example: a cat [with fluffy fur:10:15] wearing a hat

This would ask for the model to make the cat wearing a hat up until step 10 after which the model is asked to make a cat with fluffy fur wearing a hat up until step 15, after step 15 the model is once again asked to just make a cat wearing a hat. The result would be that with fluffy fur wouldnt be sampled as much as the other parts of the prompt and in return the fluffy fur would not be as intense.

Currently the only way you seem to be able to do merely mimic this is by using [with fluffy fur:15] as a negative prompt which would kick in after step 15 and remove the prompt but now the end result would be affected by the fact that there's now two prompts trying to neutralize eachother - which is not the same as not existing in the first place - and also by the order in which you've negatively prompted. It is a good alternative until this is implemented and it provides more customizability but the results won't be the same as what I've proposed above.

### Proposed workflow

The base syntax would be changed from [from:to:when] to [fromword:toword:fromstep:tostep]

### Additional information

_No response_
Repository: angular
Issue: Support full structural subtyping/"duck typing" for typed forms
Labels: area: forms

### Which @angular/* package(s) are relevant/related to the feature request?

forms

### Description

In TS you can take advantage of duck typing to assign objects that contain the full shape of another, for example:

```ts
value: { foo: string, bar: string };
subset: { foo: string };

subset = value;
```

This works through most generic types and classes as well (eg. a `Promise<typeof value>` can be used in place of a `Promise<typeof subset>`).

However, this doesn't work (most of the time) when assigning across `FormGroup`s. This would be a useful feature for shareable/generic form components - they could take a `FormGroup` of a certain type, where some (or all) fields might be optional, but where the passing component can specify some of them.

Some examples are in this stackblitz: https://stackblitz.com/edit/angular-jgpu5s?file=src/main.ts

The error (specifically in the second example) suggests the type is forcing the assignability check in both directions regardless of which side is actually being assigned, while the two types are at least somewhat compatible (can be compared).

The only alternative at the moment is to use the least restrictive type for everything, which can add unneeded fields to the usages, and/or add unneeded and cumbersome optionality/nullability.

Wasn't sure whether to put this as a feature request or bug, since there might actually be a functional difference/design decision that I'm not understanding. Possibly (?) related to https://github.com/angular/angular/issues/47091 but that seemed a bit more specific and had some inheritence/extension complexity.

### Proposed solution

Support this:

```ts
formGroup: FormGroup<{ foo: FormControl<string>; bar: FormControl<string> };
formGroupSubset: FormGroup<{ foo: FormControl<string> }>;

formGroupSubset = formGroup;
```

or at least this:

```ts
formGroup: FormGroup<{ foo: FormControl<string>; bar: FormControl<string> };
optionalFormGroup: FormGroup<{ foo?: FormControl<string>, bar?: FormControl<string> }>;

optionalFormGroup = formGroup;
```


### Alternatives considered

N/A?
Repository: storybook
Issue: [Bug]: NextJS automigration misses static paths 
Labels: bug,help wanted,has workaround,automigrations,sev:S3

### Describe the bug

Feedback from @thafryer on upgrading Chromatic's storybook:

> When I switched to the NextJS framework, [importing assets into stories](https://storybook.js.org/docs/7.0/react/configure/images-and-assets#import-assets-into-stories)
 stopped working. This was working when I was using `react-webpack5` as the framework. i switched to[ pointing a string path to the static directory](https://storybook.js.org/docs/7.0/react/configure/images-and-assets#serving-static-files-via-storybook-configuration), which worked.

### To Reproduce

_No response_

### System

_No response_

### Additional context

_No response_
Repository: pytorch
Issue: [BE] Avoid .data usage in FSDP buffer casting
Labels: oncall: distributed,better-engineering,module: fsdp

### 🐛 Describe the bug

FSDP casts buffers for mixed precision, but uses `buf.data` to assign to, we should avoid the .data usage by de-registering the old buffer and re-registering the low precision buffer.

### Versions

main

cc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu
Repository: flutter
Issue: Add `sendPortPlatformMessage` to `TestPlatformDispatcher`
Labels: a: tests,framework,P2,team-framework,triaged-framework

This method was removed from #122233 because the method signature required a reference to `dart:isolate`, which broke some Google tests.

To ensure the test implementation and real implementation are in sync, this method should be re-added and the issues with Google tests resolved.