sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: pytorch
Issue: [TorchScript] Failure if you script a wrapper module and then an interface-implementing submodule.
Labels: oncall: jit

### 🐛 Describe the bug

Repro is below:
* We have a wrapper module that calls an implementation submodule, and the implementation submodule is marked as an interface
* First we torchscript the wrapper module
* Then we torchscript the submodule.

Since the first torchscript-ing of the wrapper module saw the submodule as an interface type, it ignores the methods that are not part of the interface. Then we cache the type. Finally, when we torchscript the submodule on its own, we see the other methods and fail because the jit_type associated with this class doesn't have those methods.

```python
import torch

@torch.jit.interface
class MyInterface(torch.nn.Module):
    def forward(self, x: torch.Tensor) -> torch.Tensor:
        pass


class MyImplementation(torch.nn.Module):
    def forward(self, x: torch.Tensor) -> torch.Tensor:
        return x * x

    @torch.jit.export
    def add_two(self, x: torch.Tensor) -> torch.Tensor:
        return x + 2


class MyWrapper(torch.nn.Module):
    impl: MyInterface

    def __init__(self):
        super().__init__()
        self.impl = MyImplementation()

    def forward(self, x: torch.Tensor) -> torch.Tensor:
        return self.impl(x)


mod = MyWrapper()
mod_s = torch.jit.script(mod)
mod.impl = torch.jit.script(mod.impl)
```

error
```
  File "/data/users/dberard/scripts/interface_extra.py", line 31, in <module>
    mod.impl = torch.jit.script(mod.impl)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/users/dberard/pytorch/torch/jit/_script.py", line 1429, in script
    ret = _script_impl(
          ^^^^^^^^^^^^^
  File "/data/users/dberard/pytorch/torch/jit/_script.py", line 1147, in _script_impl
    return torch.jit._recursive.create_script_module(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/users/dberard/pytorch/torch/jit/_recursive.py", line 557, in create_script_module
    return create_script_module_impl(nn_module, concrete_type, stubs_fn)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/users/dberard/pytorch/torch/jit/_recursive.py", line 679, in create_script_module_impl
    script_method = cpp_module._get_method(name)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Method 'add_two' is not defined.
```

### Versions

main branch, CPU build

cc @EikanWang @jgong5 @wenzhe-nrv @sanchitintel
Repository: ant-design
Issue: Tag suggestion renderer in Select component with mode="tags"
Labels: help wanted,Inactive

### What problem does this feature solve?

It can be difficult for the user to understand that the suggested value in the dropdown that will turn in to a tag when selected is not a pre-populated value but rather is based on what they typed. While developers have the ability to customize Options, we could use the ability to customize that one Option specifically to help distinguish it.

### What does the proposed API look like?

 I would like to propose a new prop on the Select component `tagOptionRender` which would essentially be the same as `optionRender` (same interface) but specifically for that new tag option.

For example, this would allow the developer to be able to convert something like "new tag" into "Create new tag..." using:
```tagOptionRender={(value: string)=>`Create ${value}...`}```

<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Repository: deno
Issue: LSP - Better mapping between specifier and a package.json dep
Labels: bug,lsp

See https://github.com/denoland/deno/pull/26439#discussion_r1838882482_

Instead of doing what it does, it would be better to actually inspect the package.json to figure out all the possible exports of a package.
Repository: go
Issue: syscall: TestSyscallAllocations/Syscall failures
Labels: NeedsInvestigation,compiler/runtime

```
#!watchflakes
default <- pkg == "syscall" && test == "TestSyscallAllocations/Syscall"
```

Issue created automatically to collect these failures.

Example ([log](https://ci.chromium.org/b/8731441288535464225)):

    === RUN   TestSyscallAllocations/Syscall
        syscall_windows_test.go:256: allocs = 5, want 0
    --- FAIL: TestSyscallAllocations/Syscall (0.00s)


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: deno
Issue: Refactor lsp to separate service structs from data/state
Labels: refactor,lsp

See https://github.com/denoland/deno/pull/26439#discussion_r1838840927_
Repository: go
Issue: build: build failure on gotip-linux-arm64_c4ah72-perf_vs_release
Labels: NeedsInvestigation

```
#!watchflakes
default <- builder == "gotip-linux-arm64_c4ah72-perf_vs_release" && repo == "go" && mode == "build"
```

Issue created automatically to collect these failures.

Example ([log](https://ci.chromium.org/b/8731450899444144881)):

    go: downloading github.com/BurntSushi/toml v1.0.0
    go: downloading github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51
    2024/11/12 18:37:23 Load average: 11.99 3.39 1.16 1/1005 42251
    2024/11/12 18:37:23 Waiting for load average to drop below 0.20...
    2024/11/12 18:37:53 Load average: 7.26 3.06 1.12 1/1006 42251
    2024/11/12 18:37:53 Waiting for load average to drop below 0.20...
    2024/11/12 18:38:23 Load average: 4.40 2.77 1.09 1/1006 42251
    2024/11/12 18:38:23 Waiting for load average to drop below 0.20...
    2024/11/12 18:38:53 Load average: 2.67 2.50 1.05 2/1006 42251
    2024/11/12 18:38:53 Waiting for load average to drop below 0.20...
    ...
    [sweet] Running benchmark tile38 for experiment: run 8
    [sweet] Running benchmark tile38 for baseline: run 8
    [sweet] Running benchmark tile38 for experiment: run 9
    [sweet] Running benchmark tile38 for baseline: run 9
    [sweet] Running benchmark tile38 for experiment: run 10
    [sweet] Running benchmark tile38 for baseline: run 10
    [sweet] error: failed to execute benchmarks: cockroachdb
    2024/11/12 20:56:32 Error running sweet: error running sweet run: exit status 1
    2024/11/12 20:56:32 FAIL
    exit status 1


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: go
Issue: internal/trace: TestTraceStressStartStop/AllocFree failures
Labels: NeedsInvestigation,compiler/runtime

```
#!watchflakes
default <- pkg == "internal/trace" && test == "TestTraceStressStartStop/AllocFree"
```

Issue created automatically to collect these failures.

Example ([log](https://ci.chromium.org/b/8731426847419479825)):

    === RUN   TestTraceStressStartStop/AllocFree
        exec.go:213: test timed out while running command: /home/swarming/.swarming/w/ir/x/w/goroot/bin/go run -race testdata/testprog/stress-start-stop.go
        trace_test.go:610: signal: killed
    --- FAIL: TestTraceStressStartStop/AllocFree (1511.99s)


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: pytorch
Issue: Using @torch.compile, there are slight differences in output when run on different GPUs on the same machine.
Labels: triaged,module: determinism,oncall: pt2

Here's my code, 
And my torch version is,  torch   2.2.1+cu121
The same code, when used with torch.compile, produces different outputs on 8 GPUs of the same machine, with the maximum error being **4.7684e-07**. However, when the @torch.compile optimization is not used, the outputs from all eight cards are identical.

@torch.compile
def rmsnorm(hidden_states, weight, eps, dtype):
    #import pdb;pdb.set_trace()
    variance = hidden_states.to(torch.float32).pow(2).mean(-1, keepdim=True)
    # variance = hidden_states.pow(2).mean(-1, keepdim=True)
    hidden_states = hidden_states * torch.rsqrt(variance + eps)
    hidden_states = hidden_states.to(dtype)
    hidden_states = hidden_states * weight
    return hidden_states

cc @mruberry @kurtamohler @ezyang @chauhang @penguinwu
Repository: godot
Issue: Can not change color of path through the editor settings
Labels: bug,topic:editor,needs testing,regression,topic:3d

### Tested versions

Issue occurs in 4.3 and seems to work in 4.2 

### System information

Godot v4.3.stable.mono - macOS 14.4.1 - Vulkan (Forward+) - integrated Apple M1 Pro - Apple M1 Pro (10 Threads)

### Issue description

The editor setting has a path color under 3d gizmo's but it seems to be broken. 
The path/curve is near invisible on bright maps and it would be helpful to change the color.

### Steps to reproduce

Place curve and go to editor settings editors > 3d gizomos > Path > change color > restart

### Minimal reproduction project (MRP)

 N/A
Repository: TypeScript
Issue: Auto-imports from code actions and completions don't match order that "Organize imports" outputs
Labels: Bug

### 🔎 Search Terms

"auto-import", "order", "import", "organize imports"

### 🕗 Version & Regression Information

- This is the behavior in every version I tried.

### ⏯ Playground Link

_No response_

### 💻 Code

In a simple npm package with just TypeScript 5.6.3 installed, create a TypeScript file with the following content:

```ts
import { foo } from "@foo";
import { bar } from "@bar";
import { a } from "workspace-a";
import { b } from "workspace-b";

console.log(foo + bar + a + b)
```

Now at the end of the file type `is` and select the completion `isAccessor` that brings the import from TypeScript.


### 🙁 Actual behavior

The import from the completion is added below `import { b } from "workspace-b";`, but notice how the import gets moved to the middle if one runs the "Organize imports" command in VS Code.

### 🙂 Expected behavior

For completions and code actions that add an import to use the same ordering logic that the "Organize imports" command uses. After all this seems to be advertised by https://github.com/microsoft/TypeScript/pull/52115 ("These rules will also apply to auto-imports and import fixes, which will use the user's collation preferences to determine if a list of import or export specifiers is already sorted before selecting an insertion point").

### Additional information about the issue

_No response_
Repository: rust
Issue: Tracking Issue for Generic Constant Arguments MVP
Labels: T-lang,T-compiler,C-tracking-issue,A-const-generics,PG-const-generics,T-types,F-min_generic_const_args

<!--
NOTE: For library features, please use the "Library Tracking Issue" template instead.

Thank you for creating a tracking issue! 📜 Tracking issues are for tracking a
feature from implementation to stabilisation. Make sure to include the relevant
RFC for the feature if it has one. Otherwise provide a short summary of the
feature and link any relevant PRs or issues, and remove any sections that are
not relevant to the feature.

Remember to add team labels to the tracking issue.
For a language team feature, this would e.g., be `T-lang`.
Such a feature should also be labeled with e.g., `F-my_feature`.
This label is used to associate issues (e.g., bugs and design questions) to the feature.
-->

This is a tracking issue for the prototype described in rust-lang/rust-project-goals#100.
The feature gate for the issue is `#![feature(min_generic_const_args)]`.

### About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however *not* meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Discussion comments will get marked as off-topic or deleted.
Repeated discussions on the tracking issue may lead to the tracking issue getting locked.

### Steps
<!--
Include each step required to complete the feature. Typically this is a PR
implementing a feature, followed by a PR that stabilises the feature. However
for larger features an implementation could be broken up into multiple PRs.
-->

- [x] Add `ConstArgKind::Path` (https://github.com/rust-lang/rust/pull/125915)
- [x] Use `ConstArgKind::Path` for all single-segment paths (https://github.com/rust-lang/rust/pull/131081)
- [ ] Use `ConstArgKind::Path` for all paths
- [ ] Implement support for
  - [ ] #132985 (#134873)
  - [ ] #132986
- [ ] Adjust documentation ([see instructions on rustc-dev-guide][doc-guide])
- [ ] Stabilization PR ([see instructions on rustc-dev-guide][stabilization-guide])

[stabilization-guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#stabilization-pr
[doc-guide]: https://rustc-dev-guide.rust-lang.org/stabilization_guide.html#documentation-prs
[nightly-style-procedure]: https://github.com/rust-lang/style-team/blob/main/nightly-style-procedure.md 
[Style Guide]: https://github.com/rust-lang/rust/tree/master/src/doc/style-guide

### Unresolved Questions
<!--
Include any open questions that need to be answered before the feature can be
stabilised.
-->

TODO

### Implementation history

- #125915
- #129137
- #131081 
- #134873
Repository: godot
Issue: [4.4 dev 4] RenderingServer.InstanceCreate() with large instance count triggers seg fault
Labels: bug,topic:rendering,crash,regression

### Tested versions

- works very well in 4.4 dev 3
- breaks in 4.4 dev 4

### System information

Windows 10 and 11 - Godot 4.4 dev 4 - Ryzen 5800x3d + GTX 3080ti & Ryzen 7435HS + GTX 4060

### Issue description

Calls made for RenderingServer.InstanceCreate started failing in 4.4 dev4 with the following exception message:
Exception thrown at 0x00007FF6C409E72A in Godot_v4.4-dev4_mono_win64.exe: 0xC0000005: Access violation writing location 0x00000000000001A0.

![image](https://github.com/user-attachments/assets/a20e0070-6725-45bb-9a68-4a03663ea7c8)

Call stack looks like this.

### Steps to reproduce

Try to build and launch the project attached below
It will launch quickly in 4.4 dev 3
It will crash in 4.4 dev 4

The instance count is essential for achieving the gameplay, effect & scale of my game.
And it actually works quite well in 4.4 dev3, (the none minimal repro project) used to run at 150fps fully animated on my 3080ti/5800x3d build.

### Minimal reproduction project (MRP)

[renderingservertest.zip](https://github.com/user-attachments/files/17726968/renderingservertest.zip)
Repository: rust
Issue: Support `ConstArgKind::Path`s for const struct/variant constructors
Labels: C-enhancement,T-compiler,F-min_generic_const_args

Requires encoding const ctors in MIR metadata (not currently done for some reason). May affect perf. cc #131081.
Repository: electron
Issue: [Upgrades Follow Up]: re-enable thin LTO on Mac release builds
Labels: component/node-integration,upgrade-follow-up

When trying to reland Node 22 in https://github.com/electron/electron/pull/44597, we discovered that thin LTO was the root cause of several symbols being stripped from the release build only on MacOS. This does not seem to be an existing problem in either Chromium or upstream Node.

While we debug this, we do want to land Node 22 in main, and root out any bugs well before an alpha/beta branch point. This issue is to reland thin LTO on Mac before Electron 35's stable release.
Repository: rust
Issue: Support `ConstArgKind::Path` for uses of `static` paths
Labels: C-enhancement,T-compiler,F-min_generic_const_args

Requires allowing constarg -> valtree lowering outside of ctfe. cc #131081
Repository: vscode
Issue: Failed to run Cucumber tests from launch configuration when break point is set in code
Labels: info-needed

<!-- ⚠️⚠️ Do Not Delete This! bug_report_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- 🕮 Read our guide about submitting issues: https://github.com/microsoft/vscode/wiki/Submitting-Bugs-and-Suggestions -->
<!-- 🔎 Search existing issues to avoid creating duplicates. -->
<!-- 🧪 Test using the latest Insiders build to see if your issue has already been fixed: https://code.visualstudio.com/insiders/ -->
<!-- 💡 Instead of creating your report here, use 'Report Issue' from the 'Help' menu in VS Code to pre-fill useful information. -->
<!-- 🔧 Launch with `code --disable-extensions` to check. -->
Does this issue occur when all extensions are disabled?: Yes/No

<!-- 🪓 If you answered No above, use 'Help: Start Extension Bisect' from Command Palette to try to identify the cause. -->
<!-- 📣 Issues caused by an extension need to be reported directly to the extension publisher. The 'Help > Report Issue' dialog can assist with this. -->
- VS Code Version: 1.95 and Insider version, works ok on 1.94
- OS Version: Windows 11 + WSL Ubuntu 22.04 + docker + devcontainer based on mcr.microsoft.com/devcontainers/typescript-node:1-18-bullseye

Steps to Reproduce:

1.  Open Project with Cucumber tests
2.  Set breakpoint in one of the steps
3.  Run debug launch configuration for the tests

Result:
![Image](https://github.com/user-attachments/assets/677d0388-7c3b-407a-b261-4e3eadc6c119)

Notes:
- Works fine on version 1.94
- Still not working on insider version
- I'm using WDIO + Cucumber + Appium test stack
- Tests are run fine if breakpoint is not set
Repository: rust
Issue: Should the ConstArgHasType bound above be included in PrarmEnv (query from param_env_reveal_all_normalized)?
Labels: T-compiler,C-discussion,T-types

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I tried this code:

```rust
fn parse_test<const LEN: usize>(path: [&'static str; LEN]) {
    let target = ["doc"];
    if target.iter().eq(&path) {
        println!("get target str");
    }
}

fn main() {
    parse_test(["doc"]);
}
```
I am implementing an algorithm for function call detection，I identify function calls by iterating over the terminator in the MIR of the function body，recursively detect the functions called by each function

When I get an instance, I use this logic to detect the function it calls (callee)

```rust
fn callees_of<'tcx>(bcx: BtyCtxt<'_, 'tcx>, instance: ty::Instance<'tcx>) -> &'tcx Callees<'tcx> {
    let param_env = bcx.tcx.param_env_reveal_all_normalized(instance.def_id());
    let mir_body = bcx.instance_mir_expect(instance.def);
    let callees = Callees::from_raw_mut(
        bcx.tcx
            .arena
            .dropless
            .alloc_from_iter(mir_body.basic_blocks.indices().map(|_| Default::default())),
    );
... detect logic ...
}
```


I expected to see this happen: *Can correctly obtain the normalize instance*

Instead, this happened: *In the above example, the bounds of paramenv contains a Binder { value: ConstArgHasType(LEN/#0, usize), bound_vars: [] } When I try to normalize this instance (I think only after normalization can I determine what function it calls)  rustc_trait_selection::traits::select::SelectionContext>::evaluate_predicate_recursively -> <rustc_middle::ty::sty::ParamConst>::find_ty_from_env Function not included in paramenvConstArgHasTypeThis type is panic*

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
nightly-2024-10-09
```

<!--
Include a backtrace in the code block by setting `RUST_BACKTRACE=1` in your
environment. E.g. `RUST_BACKTRACE=1 cargo build`.
-->
<details><summary>Backtrace</summary>
<p>

```
<backtrace>
```

</p>
</details>

I want to know if my usage of getting ParamEnv is wrong, or I should merge ParamEnv and add Cosnt bound to ParamEnv (if so, I hope you can tell me how to merge ParamEnv)
Repository: pytorch
Issue: Enable autograd for padded dense forward / backward operators.
Labels: module: autograd,triaged,module: nestedtensor,actionable

### 🚀 The feature, motivation and pitch

Hi, I noticed that we already have https://github.com/pytorch/pytorch/pull/125946, which ported fbgemm related jagged tensor operator. Do we have a plan to register its autograd function, like https://github.com/pytorch/FBGEMM/blob/5c980c82d82069702ef5176678c5be6157b5f8b6/fbgemm_gpu/src/jagged_tensor_ops/jagged_tensor_ops_autograd.cpp#L31, so user could invoke it in model script.
@jbschlosser

### Alternatives

_No response_

### Additional context

_No response_

cc @ezyang @albanD @gqchen @pearu @nikitaved @soulitzer @Varal7 @xmfan @cpuhrsch @jbschlosser @bhosmer @drisspg @davidberard98 @YuqingJ
Repository: tauri
Issue: [feat] [macOS] App focus gain/loss handlers
Labels: type: feature request,platform: macOS

### Describe the problem

I am building a shortcut system for my desktop app, for triggering actions using hotkeys that aren't in any menu. From what I understand, there are two ways to go about this currently:

1. Register keydown js listeners in the webview
1. Register global key listeners on the Rust side using something like [rdev](https://crates.io/crates/rdev).

Both solutions expose a problem on macOS: An application can have focus without having any windows open. For example: without any windows open, I would still like to be able to listen for Command + N, to open a new window.

1. For JS, I'm registering key listeners directly on the window, but there's no way of listening to non-window key pressed afaik.
1. For Rust, I can register global OS shortcuts (using rdev), but I would need to unregister these if the app loses focus. On macOS, this is not the same as checking if any window has focus.

In lieu of an actual key event handler solution on the Rust side (one that uses the app event loop itself), I'm inclined to go for solution 2, but I would need to know if my _app_ has focus or not.

### Describe the solution you'd like

Ideally, we could install an app focus loss/gain handler on the App builder, something along these lines:

```rust
tauri::Builder::default()
    .on_app_focus_gain(|app|{ }))
    .on_app_focus_loss(|app|{ }))
    .run()
```

These lambda's would directly map to [`NSApplicationDelegate::applicationDidBecomeActive()`](https://developer.apple.com/documentation/appkit/nsapplicationdelegate/1428577-applicationdidbecomeactive?language=objc) and its counterpart.

### Alternatives considered

In this particular case I can put Command + N in my main application menu, and it will get triggered, but that is a happy coincidence. This isn't always the case.

### Additional context

- I would like to point out these handlers are useful outside of the scope of a shortcut system. Maybe someone wants to shutdown a thread while the app is inactive, or something like that.
- Ideally I wouldn't even have to use `rdev` to listen for hotkeys and use a Tauri-native solution, but that's a different discussion.