sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Macro expand too slowly,there some way to cache Macro like cache function.
Labels: I-compiletime,T-compiler,S-needs-repro

I use diesel crate to develope some ERP function,found macro "Table!" expand very slowly every time.  If it can store the expanded result in cache like "function cache" after the first time,  as long as the table definition is not modifie, it will improve the expanding speed a lot.

like:
#[cached]
fn fib(n: u64) -> u64 {
    if n == 0 || n == 1 { return n }
    fib(n-1) + fib(n-2)
}

as:
#[cached] (first time to expand and store result)
macro_rules! table {
    ($($tokens:tt)*) => {
        $crate::__diesel_parse_table! {
            tokens = [$($tokens)*],
            imports = [],
            meta = [],
            sql_name = unknown,
            name = unknown,
            schema = public,
            primary_key = id,
        }
    }
}
Repository: neovim
Issue: Lua: vim.opt table syntax fails for "breakindentopt"
Labels: bug,lua,options

### Neovim version (nvim -v)

0.8.0-dev+15-g245858460

### Vim (not Nvim) behaves the same?

n/a

### Operating system/version

Linux

### Terminal name/version

st

### $TERM environment variable

st-256color

### Installation

repo

### How to reproduce the issue

see below

### Expected behavior

The 'breakindentopt' option should have mapping semantics.

--When-
vim.opt.breakindentopt = {sbr = true, shift = 3}
--Then-
vim.opt.breakindentopt:get() 
--should return the table with mappings, but returns {}



### Actual behavior

vim.cmd [[set breakindentopt=sbr,shift:3]]
vim.opt.breakindentopt:get() == {"sbr", "shift:3"}
Repository: vscode
Issue: editor.actions.findWithArgs behaves inconsistently when searchString is empty
Labels: bug,editor-find


Issue Type: <b>Bug</b>

To reproduce, set up a key binding like so:
```
  {
    "key": "cmd+f",
    "command": "editor.actions.findWithArgs",
    "args": {
      "isRegex": true,
      "searchString": ""
    }
  }
```

Then hit the keyboard shortcut repeatedly. The search bar will alternate between the empty string and the currently selected text in the editor.

---

For context, VSCode turns off Regex for new projects; I have been trying to find a way to always keep it on. It seems that `editor.actions.findWithArgs` is the solution, except that unlike the usual search behaviour, it doesn't populate the search bar with the currently selected text.

The bug in question lets me get around this by hitting the keyboard shortcut twice, but it would be nicer to be able to use something like this:

```
  {
    "key": "cmd+f",
    "command": "editor.actions.findWithArgs",
    "args": {
      "isRegex": true,
      "searchString": "$TM_SELECTED_TEXT"
    }
  }
```

This doesn't work because it populates the search bar with the literal string `$TM_SELECTED_TEXT`. Can anyone suggest another solution?

VS Code version: Code 1.67.2 (c3511e6c69bb39013c4a4b7b9566ec1ca73fc4d5, 2022-05-17T18:20:57.384Z)
OS version: Darwin x64 21.4.0
Restricted Mode: No

<!-- generated by issue reporter -->
Repository: pytorch
Issue: Strange tracing result with torchscript
Labels: oncall: jit

### 🐛 Describe the bug

I have a model, which weights are loaded one by one from standalone bin files, so I using nn.Parameters to load then.

But the trace to torchscript, it gives me weired result:

![image](https://user-images.githubusercontent.com/21303438/172114996-45119083-4997-467f-b394-be3bbfc00f37.png)

this is not expected, since these are not inputs, in onnx, it works normal:

![image](https://user-images.githubusercontent.com/21303438/172115187-ee2382a3-be5b-4b9d-8590-67dd544b7e14.png)


how should make torchscript traced model more user friendly?

### Versions

1.11
Repository: neovim
Issue: Wait indefinitely if timing out will only trigger a `<Nop>` mapping
Labels: enhancement,needs:discussion,mappings

### Neovim version (nvim -v)

0.7.0

### Vim (not Nvim) behaves the same?

8.2.5046

### Operating system/version

Archlinux

### Terminal name/version

konsole 22.04.1

### $TERM environment variable

xterm-256color

### Installation

system package manager

### How to reproduce the issue

1. `nvim --clean`
2. Enable timeout: `:set timeout` & `:set timeoutlen 100`
3. Disable `<Space>` with `<Nop>`, since it's a builtin and cannot be unmapped: `:nnoremap <Space> <Nop>`
4. Map any key sequence that starts with `<Space>`: `:nnoremap <Space>e <Cmd>echom "hello"<CR>`
5. Press `<Space>`

### Expected behavior

Timeout doesn't trigger for key mappings that are set to `<Nop>`. This includes not only builtin commands (hardcoded in `normal.c`) like `<Space>`, but for general keys as well. The only difference is that I can just `unmap` any other key mappings, but this is not the case for builtins. I'm not well acquainted with C, but it looks like this behaviour is not suppose to be happening.

https://github.com/neovim/neovim/blob/96c494dec345f9a3dd2676048292267552e3f5f8/src/nvim/getchar.c#L2586-L2591

### Actual behavior

Key mapping that is set to `<Nop>` does not trigger a timeout.
Repository: godot
Issue: Custom resource methods are unavailable in a property setter with that resource's type
Labels: bug,topic:core,topic:gdscript

### Godot version

v4.0.alpha9.official [fc18891db]

### System information

Windows 10, 64bit

### Issue description

`ResBase.gd`:
![捕获](https://user-images.githubusercontent.com/35988767/172122608-b912a382-6801-41fd-bb6b-727130df81f3.PNG)

`ResX.gd`:
![捕获](https://user-images.githubusercontent.com/35988767/172122702-dd6f7c2a-7e3b-4d71-bff4-b2981a669111.PNG)

when export custom resource, it report error:
![捕获](https://user-images.githubusercontent.com/35988767/172122921-bae182e3-ba23-4228-9a20-5ab9f76413a6.PNG)

when I set res to a ResX instance, It report error:
![捕获](https://user-images.githubusercontent.com/35988767/172123630-eb6d50e5-87bf-4dcd-a9c4-4daff2d5326a.PNG)
![捕获](https://user-images.githubusercontent.com/35988767/172123792-a3b49d14-0c9a-4294-96f0-c8dac0ea3205.PNG)



### Steps to reproduce

please run the reproduction project

### Minimal reproduction project

[ResourceTest.zip](https://github.com/godotengine/godot/files/8842930/ResourceTest.zip)
Repository: vscode
Issue: [html] `html.autoCreateQuotes` is not instant
Labels: feature-request,html

<!-- ⚠️⚠️ 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

<!-- 🪓 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.67.2
- OS Version: Windows_NT x64 10.0.22000

Steps to Reproduce:

1. Open a HTML document
2. Inside of a tag where the attributes are located, type id=test quickly

I would expect `id="test"` to be typed but if it is typed too quickly then only `id=test` is typed.

It's quite frustrating to pause after every equals sign as most auto insertions such as quotes and parentheses are always inserted at any typing speed.
Repository: godot
Issue: Cursor stay "busy" after startup on Linux
Labels: bug,platform:linuxbsd,topic:core

### Godot version

3.x (ef8401edf5327a41dcb9aa3bb66a27b5d0e78c3c) 4.0 (52952edafcbbc42185db8e5371119c1df9afca83)

### System information

Arch Linux, GLES 3, Mesa Intel(R) UHD Graphics (CML GT2)

### Issue description

Godot on Linux sets the mouse cursor shape to Busy (arrow with hourglass) on startup. This is not done on other platforms.

3.x `OS_X11::initialize()`:
https://github.com/godotengine/godot/blob/ef8401edf5327a41dcb9aa3bb66a27b5d0e78c3c/platform/x11/os_x11.cpp#L587

4.0 `DisplayServerX11::DisplayServerX11()`:
https://github.com/godotengine/godot/blob/52952edafcbbc42185db8e5371119c1df9afca83/platform/linuxbsd/display_server_x11.cpp#L4918

The cursor shape is not updated to a regular arrow shape when initialization is done. So the cursor will stay "Busy" as long as the user don't move the mouse. But some users like me prefer to leave the mouse alone until the cursor becomes normal :rofl: 

### Steps to reproduce

Start any project (or open it with the editor) on Linux. Leave your cursor inside the newly opened window and don't move it.

### Minimal reproduction project

_No response_
Repository: godot
Issue: Point light shadow bias is not adjusted to take the selected shadow quadrant into account, leading to acne
Labels: bug,topic:rendering,confirmed,topic:3d


[light_bug.zip](https://github.com/godotengine/godot/files/8843477/light_bug.zip)
### Godot version

Godot 4 Alpha 9

### System information

Windows 10, NVIDIA GeForce 1060 GTX 3GB, Vulkan

### Issue description

Hello!
I'm working on a project with many OmniLights in the map scenes. This causes them to turn off, flicker, and look weird.
Also had this problem in Godot 3.x and thought moving to Godot 4 would fix the issiu but it is still there.
The problem can also appear in the Godot editor preview windows.
![testn](https://user-images.githubusercontent.com/14269417/172136050-9cc9bf6a-e473-46e5-ba97-55ad41931d52.PNG)
You can see the weird light on the right. It should look like the light on the left.



### Steps to reproduce

Walk around in the scene for a while, look towards lamps and away. Lights should start to behave weirdly.
I placed a red cube at a spot where it usually doesn't take long

### Minimal reproduction project

[light_bug.zip](https://github.com/godotengine/godot/files/8843477/light_bug.zip)
Repository: angular
Issue: Content projection for templates
Labels: feature,area: core,core: content projection,feature: under consideration

### Which @angular/* package(s) are relevant/related to the feature request?

core

### Description

[Content projection](https://angular.io/guide/content-projection) is an amazing feature, but it [has no elegant support](https://stackoverflow.com/questions/51948301/using-ng-content-in-ng-template/) for `ng-template`.

Such feature exists in many other template engines ( [Twig](https://twig.symfony.com/doc/3.x/tags/macro.html), [Jinja2](https://docs-python.ru/packages/modul-jinja2-python/takoe-makrosy-shablonov-jinja2/), [Nunjucks](https://mozilla.github.io/nunjucks/templating.html#macro) etc.) and very handy, as makes templates bit less verbose and allow to follow the [DRY](https://en.wikipedia.org/wiki/Don%27t_repeat_yourself) principle which increase overall productivity.

Technically, such feature brings capability to operate with templates like with a [higher order functions](https://en.wikipedia.org/wiki/Higher-order_function), and allow to reuse and compose them pretty simple.

### Proposed solution

### Option 1: `<ng-template-content/>` component
```html
<ng-template #tpl>
  <ng-template-content select="[greetings]"></ng-template-content> World !
</ng-template>

<ng-container *ngTemplateOutlet="tpl">
  <span greetings>Hello</span>
</ng-container>
```

### Option 2: `*ngTemplateOutletContent` directive
```html
<ng-template #tpl>
  <span *ngTemplateOutletContent></span> World !
</ng-template>

<ng-container *ngTemplateOutlet="tpl">
  Hello
</ng-container>
```

### Option 3: Both component and direcive

Option 2 prevent appearing of component related nodes in DOM and makes it more clean, but Option 1 semantics looks great. So would be nice to have both on developer choice.

### Proof of concept

Proof of concept on [StackBlitz](https://stackblitz.com/edit/ng-template-content?file=src%2Fmain.ts) for Angular 14.

Proposed solution is based on top of [access to private fields](https://stackblitz.com/edit/ng-template-content?file=src%2Fng-macro%2Fng-macro.directive.ts) (see `getMacroTemplateContext` function), so **required implementation on core level**.

### Alternatives considered

Technically [feature](https://stackoverflow.com/a/56958107/1543705) already supported by core.

But on practice:
- Implementation is not obvious and straightforward;
- Html markup too verbose and destroy sematic;

This makes feature usage too complicated or even not possible.

For sure, components itself do the stuff excellent. But for complex components create additional components just to decrease local markup complexity - it's just brings an additional complexity to the whole application.
Repository: neovim
Issue: Events are blocked after empty-string mapping is triggered on timeout
Labels: bug,input,event-loop,mappings

### Neovim version (nvim -v)

v0.8.0-dev+377-gae02c02f1

### Vim (not Nvim) behaves the same?

No

### Operating system/version

Arch Linux

### Terminal name/version

kitty 0.25.1

### $TERM environment variable

xterm-kitty

### Installation

build from repo

### How to reproduce the issue

1. Run `nvim --clean`
2. Source the following file:
```vim
imap <expr> <F2> [timer_start(0, { _ -> execute("throw 'x'", "") }), ''][-1]
inoremap <F2>a foo
```
3. Type `i<F2>`

### Expected behavior

An error is thrown after the `<F2>a` mapping times out and the `<F2>` mapping is triggered.

### Actual behavior

No error is thrown until the next key after the `<F2>` is pressed.
Repository: youtube-dl
Issue: Unsupported URLs (doodstream, mixdrop)
Labels: site-support-request

213 / 5.000

hi, you can add the following url to download video files in mp4:
https://mixdrop.co (example: https://mixdrop.co/f/1vlrn34et6o8z3);
https://doodstream.com (example: https://dood.la/e/p2c8cuzp4x9d).

Thanks in advance
Repository: neovim
Issue: plugins can detect `:nohlsearch` or `v:hlsearch`
Labels: enhancement,events

### Feature already in Vim?

No

### Feature description

I'm currently trying to implement a plugin that complements the search highlighting (https://github.com/lewis6991/satellite.nvim/issues/11). One thing that is needed is to detect when the user executes `:nohlsearch` (either interactively, via a mapping, a callback, or in some plugin code).

### Potential Solutions:

* ~New autocmd event `CmdExecute`: fired when any ex command is executed.~
   EDIT: Can't detect when `v:hlsearch` is set.
* ~New autocmd event `VariableSet`: fired when any Vimscript variable is modified (like `OptionSet`).~
  EDIT: Several reasons for not doing this, [see comment](https://github.com/neovim/neovim/issues/18879#issuecomment-1153810023)
* ~New autocmd event `HlSearch`: fired when `v:hlsearch` is changed.~
   EDIT: Suggestion generalized to a `Search` autocmd, [see comment](https://github.com/neovim/neovim/issues/18879#issuecomment-1153810023)
* ~Allow `dictwatcheradd()` to work for `v:` (for non-readonly fields).~
  EDIT: Several reasons for not doing this, [see comment](https://github.com/neovim/neovim/issues/18879#issuecomment-1153810023)

### Alternative Solution

<details>
  <summary>Use a Libuv uv_timer_t to check v:hlsearch</summary>
  
```lua
local function watch_table(t, key, interval, callback)
  local last_value = t[key]
  vim.loop.new_timer():start(0, interval, function()
    if last_value ~= t[key] then
      last_value = t[key]
      vim.schedule(callback)
    end
  end)
end

-- Regularly check v:hlsearch
watch_table(vim.v, 'hlsearch', vim.o.updatetime, function()
  ...
end)
```

</details>

### Summary

~Adding `CmdExecute` seems like the best solution, but I would really appreciate any other ideas if anyone has any.~

EDIT: After some analysis, adding a first class `Search` autocmd now appears to be the best solution.
Repository: storybook
Issue: Add documentation for adding query parameters to the stories you write
Labels: feature request,needs triage

**Is your feature request related to a problem? Please describe**
This is a suggestion to add explanation in the docs on how to add query parameters to stories,
i had to dig deep to find some reference to this in other blogs.

**Describe the solution you'd like**
to add query parameter to all stories related to the same component you can add it in the default export like so
`
export default {
  title: '<your story title>',
  component: MyComponent,
  parameters: {
    query: { <key>: <value> }
  }
};
`

and for adding different query parameters for different stories for the same component
`
export const Default = MyComponent.bind({});
Default.args = {};
Default.parameters = {
  query: { <key>: <value> }
};
`
Repository: rust
Issue: specified formatting not applied if `format_args()` is passed to `println!()`
Labels: C-bug,T-libs,A-fmt

<!--
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
use std::fmt;

struct A {}

impl fmt::Debug for A {
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
        write!(f, "1234567890")
    }
}

pub fn main() {
    println!("{:<.5}", "1234567890");
    let a = A {};
    println!("{:<.5}", format_args!("{:?}", a));
}

```
[playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=903a18ebbfabe8cf0255e786e5630ae7)

I expected to see this happen:
I would expect both lines `print`s to print the same output.

Instead, this happened: 
output is
````
12345
1234567890
````
and there is no warning that the second `println!` completely ignores the formatting directives `:<.5` that I passed.


### 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`:
```
rustc 1.63.0-nightly (a6b8c6954 2022-06-03)
binary: rustc
commit-hash: a6b8c6954829669a5c4fa320c3e6132edf04fcfc
commit-date: 2022-06-03
host: x86_64-unknown-linux-gnu
release: 1.63.0-nightly
LLVM version: 14.0.4
```
Repository: godot
Issue: 'export var' infers the wrong type of preload()
Labels: bug,topic:gdscript

### Godot version

 v3.5.rc3.official.af8a02dda

### System information

Linux

### Issue description

`export var example := preload("ExampleNode.tscn")` results in this error message:

```
 built-in:3 - Parse Error: The export hint's type (Object) doesn't match the variable's type (PackedScene).
 modules/gdscript/gdscript.cpp:597 - Method failed. Returning: ERR_PARSE_ERROR
```
I'm getting the same parser error on 3.5 rc2 and 3.4.4 stable. Haven't tested other versions.

### Steps to reproduce

```
extends Node

export var example := preload("ExampleNode.tscn") # parse error

export var example2 : PackedScene = preload("ExampleNode.tscn") # no error
var example3 := preload("ExampleNode.tscn") # no error
```

### Minimal reproduction project

[MRP_export_PackedScene.zip](https://github.com/godotengine/godot/files/8844783/MRP_export_PackedScene.zip)
(same code as in the steps to reproduce)
Repository: pytorch
Issue: Add type() support for mps backend
Labels: module: error checking,triaged,actionable,module: mps

As reported in https://discuss.pytorch.org/t/m1-macos-12-3-torchvision-ops-nms-error/152887/3?u=alband

Calling `Tensor.type()` on an mps Tensor returns `torch.mps.FloatTensor` which the parser code does not handle (as it is special cased for cpu/cuda.
We could update the parsing logic to handle mps at https://github.com/pytorch/pytorch/blob/129d9dbb1581ead52061f140cba200662373574c/torch/csrc/utils/tensor_types.cpp#L48

But isn't type() deprecated? Do we want to add more to it? cc @kulinseth @malfet @DenisVieriu97 @jhavukainen @albanD @ezyang
Repository: go
Issue: runtime: "morestack on g0" in debugcall on android-amd64
Labels: OS-Android,NeedsInvestigation,compiler/runtime

Seen once on gomote with all.bash:

```
fatal: morestack on g0
trap in unknown function runtime.abort
SIGTRAP: trace trap
PC=0x7e7838bba342 m=11 sigcode=128

goroutine 0 [idle]:
runtime.abort()
        /workdir/go/src/runtime/asm_amd64.s:1059 +0x2 fp=0x7e780fafd410 sp=0x7e780fafd408 pc=0x7e7838bba342
runtime.morestack()
        /workdir/go/src/runtime/asm_amd64.s:538 +0x22 fp=0x7e780fafd418 sp=0x7e780fafd410 pc=0x7e7838bb8322

goroutine 23000 [running, locked to thread]:
runtime.systemstack_switch()
        /workdir/go/src/runtime/asm_amd64.s:459 fp=0xc0024ba620 sp=0xc0024ba618 pc=0x7e7838bb8260
runtime.debugCallCheck(0x7e7838e0bce5)
        /workdir/go/src/runtime/debugcall.go:42 +0x85 fp=0xc0024ba660 sp=0xc0024ba620 pc=0x7e7838b4c765
runtime.debugCallCheck(0x7e7838e0bce5)
        <autogenerated>:1 +0x27 fp=0xc0024ba678 sp=0xc0024ba660 pc=0x7e7838bbca07
runtime.debugCallV2()
        /workdir/go/src/runtime/asm_amd64.s:1833 +0x89 fp=0xc0024ba720 sp=0xc0024ba678 pc=0x7e7838bba789
runtime_test.debugCallWorker2(0xc000c3bb00?, 0xc0000343d8?)
        /workdir/go/src/runtime/debug_test.go:94 +0x5 fp=0xc0024ba728 sp=0xc0024ba720 pc=0x7e7838e0bce5
runtime_test.debugCallWorker(0xc000ef84e0?, 0x3e7?, 0xc000034380?)
        /workdir/go/src/runtime/debug_test.go:79 +0x8b fp=0xc0024ba7b8 sp=0xc0024ba728 pc=0x7e7838e0bc0b
runtime_test.startDebugCallWorker.func2()
        /workdir/go/src/runtime/debug_test.go:59 +0x2e fp=0xc0024ba7e0 sp=0xc0024ba7b8 pc=0x7e7838e0bb4e
runtime.goexit()
        /workdir/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0024ba7e8 sp=0xc0024ba7e0 pc=0x7e7838bba501
created by runtime_test.startDebugCallWorker
        /workdir/go/src/runtime/debug_test.go:59 +0xee
```

This looks like morestack right on entry to [this closure](https://cs.opensource.google/go/go/+/master:src/runtime/debugcall.go;l=42;drc=9717e8f80f973e747a6c6e4a938c7f2a091a9b50), which is odd because we should have plenty of stack.

cc @golang/runtime @mknyszek
Repository: godot
Issue: 3.4.4.mono Crash when importing mp3 or ogg resources
Labels: bug,needs testing,topic:audio,topic:import,crash

### Godot version

3.4.4 stable mono c#

### System information

windows 10, gles3, gtx 1050ti

### Issue description

Crash when importing mp3 or ogg resources.

### Steps to reproduce

none.

### Minimal reproduction project

none.
Repository: pytorch
Issue: Can we have Additive Attention?
Labels: triaged

### 🚀 The feature, motivation and pitch

Like MultiheadAttention which was proposed in **`Transformer`** paper similarly, can we have Additive attention
 proposed in `**Neural Machine Translation by Jointly Learning to Align and Translate**`.

### Alternatives

`nn.MultiheadAttention`

### Additional context

_No response_

cc @jbschlosser @bhosmer @cpuhrsch
Repository: PowerToys
Issue: Retain Maximize Window with Windows + Up for FancyZones
Labels: Idea-Enhancement,Product-FancyZones,Needs-Triage

### Description of the new feature / enhancement

Maximize windows when using Windows + Up when there is no zone above current zone. This is part of the regular Windows Snap feature, but not available to FancyZones when overriding Windows Snap.

### Scenario when this would be used?

This is useful when wanting to focus one one screen temporarily and then snapping the window back to where it was before.

### Supporting information

_No response_