sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: tauri
Issue: [bug] Cannot open relative file path specified on tha command-line
Labels: type: bug,status: needs triage

### Describe the bug

I have an application that needs to open up files present on the command-line, however the security restrictions seems to prevent that.

I get a `Forbidden path ./path/to/file` when I try to run fs.readTextFile()

### Reproduction

Setup a Tauri v2 app with in config:

```json
{
  ...
  "plugins": {
    "cli": {
      "description": "word processor for html files",
      "args": [
        {
          "name": "filename",
          "index": 1,
          "takesValue": true
        }
      ]
    },
    "fs": {
      "scope": [
        "*/**",
        "$HOME",
        "$HOME/*",
        "$HOME/**"
      ]
    },
  }
}
```

Then try to run the following javascript code:

```js
    getMatches().then(async (matches) => {
      console.log("CLI arg: %o", matches)
      if (matches.args.filename) {
        let path = matches.args.filename.value
        const html = await readTextFile(path)
        if (html != null) {
          setContent(html)
        }
      }
    })
```

### Expected behavior

You get a forbidden path error

### Full `tauri info` output

```text
[✔] Environment
    - OS: Fedora 40 X64
    ✔ webkit2gtk-4.1: 2.44.2
    ✔ rsvg2: 2.57.1
    ✔ rustc: 1.79.0 (129f3b996 2024-06-10)
    ✔ cargo: 1.79.0 (ffa9cf99a 2024-06-03)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-x86_64-unknown-linux-gnu (default)
    - node: 22.4.1
    - yarn: 1.22.22
    - npm: 10.8.1

[-] Packages
    - tauri [RUST]: 2.0.0-beta.24
    - tauri-build [RUST]: 2.0.0-beta.19
    - wry [RUST]: 0.41.0
    - tao [RUST]: 0.28.1
    - @tauri-apps/api [NPM]: 2.0.0-beta.15
    - @tauri-apps/cli [NPM]: 2.0.0-beta.22

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: React
    - bundler: Rollup
```


### Stack trace

_No response_

### Additional context

_No response_
Repository: go
Issue: cmd/compile: allow parameterized type aliases to omit redundant type parameters
Labels: Thinking,NeedsInvestigation,compiler/runtime

https://github.com/golang/go/issues/46477 is an accepted proposal to allow type parameters on aliases, although the implied change to the spec wording has not yet been fleshed out, so it's not clear whether the current issue is a compiler bug or a request to change the spec.

When instantiating a parameterized function, it is legal to omit one or more type parameters (a suffix of the parameter tuple) if they can be inferred from the argument types. For example, all three of these uses of Contains are instantiated the same way, even though only the first is fully explicit:

https://go.dev/play/p/o3WFjULJVqE
```go
	_ = slices.Contains[mySliceType, string](slice, "")
	_ = slices.Contains[mySliceType](slice, "")
	_ = slices.Contains(slice, "")
```

This inference needn't be based on the types of the arguments, but can also proceed from the explicit type arguments, as in this variant where the argument types alone are insufficient:

```go
func _(slice mySliceType) {
	_ = slices.Contains[mySliceType](nil, "") // inferred as [mySliceType, mystring]
}

type mystring string
type mySliceType []mystring
```

Parameterized type aliases should behave in an analogous way. That is, if the first type arguments to a parameterized type alias are sufficient to determine the instantiation, the others should not be required. However, that is not the current behavior of the compiler:

https://go.dev/play/p/BkWFFkHDKPW?v=gotip
```go
type SliceElementType[Slice ~[]Elem, Elem any] = Elem

var _ SliceElementType[myStringSlice] // error: not enough type arguments
```

I see two reasons for making the analogy. The first is symmetry. The second is that parameterized type aliases with this inference may be used to express "pure functions over types", including destructuring operators. For example, the `SliceElementType[T]` operator is the inverse of the `[]T` operator: the latter adds a slice type constructor, and the former strips it off. This is a useful form of expressiveness that allows you to denote the element type of an arbitrary slice type, which might not otherwise be expressible. One can imagine similar operators for denoting the elements of pointer, map, and chan types, the parameters and result types of functions, and (someday) the types of struct fields.
Repository: vscode
Issue: "Notebook Find Filters" button shows in search when no notebook is active
Labels: bug,search,notebook

Besides having a hard time to understand what it does, it imho should not show when no notebook is actively opened?

![Image](https://github.com/user-attachments/assets/a1ea9136-1298-4501-976c-00a94dbfca61)
Repository: ui
Issue: Don't use `dangerouslySetInnerHTML`
Labels: bug

### Describe the bug

At https://ui.shadcn.com/docs/components/chart#installation, in the `components/ui/chart.tsx` file in `ChartStyle` component there's no need to use `dangerouslySetInnerHTML`, it can simply be achieved with:

```jsx
    <style>
      {Object.entries(THEMES)
        .map(
          ([theme, prefix]) =>
            ` ${prefix} [data-chart=${id}] { ${colorConfig
              .map(([key, itemConfig]) => {
                const color =
                  itemConfig.theme?.[theme as keyof typeof itemConfig.theme] ||
                  itemConfig.color;
                return color ? `  --color-${key}: ${color};` : null;
              })
              .join("\n")} } `,
        )
        .join("\n")}
    </style>
```

My linting setup gives an error with `dangerouslySetInnerHTML`. Well I can change it, but doesn't seem necessary in this case. Here, using the `{}` syntax is just more appropriate and secure.

### Affected component/components

Chart

### How to reproduce

It's more a refactor suggestion.

### Codesandbox/StackBlitz link

_No response_

### Logs

_No response_

### System Info

```bash
Nothing's relevant.
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: node
Issue: warning  about icu-small  WHEN compile with gnu++23
Labels: build,icu

### Version

Node.js v22.4.1.

### Platform

```text
Linux dev 5.15.0-117-generic #127-Ubuntu SMP Fri Jul 5 20:13:28 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
```


### Subsystem

_No response_

### What steps will reproduce the bug?

I just change the `std=gnu++xxxx` IN `cc_flags` to `std=gnu++23`.  others same as default
then:
```console
$ ./configure
$ make -j12
------------
  ../deps/icu-small/source/common/unicode/char16ptr.h:222:53: warning: dangling pointer to an unnamed temporary may be used [-Wdangling-pointer=]
  222 | ConstChar16Ptr::ConstChar16Ptr(const char16_t *p) : p_(p) {}
```

### How often does it reproduce? Is there a required condition?

always.

### What is the expected behavior? Why is that the expected behavior?

no warning 

### What do you see instead?

```console
../deps/icu-small/source/common/unicode/char16ptr.h:222:53: warning: dangling pointer to an unnamed temporary may be used [-Wdangling-pointer=]
  222 | ConstChar16Ptr::ConstChar16Ptr(const char16_t *p) : p_(p) {}
```

### Additional information

_No response_
Repository: vscode
Issue: Dangerous probing for `List` in `editorCommandsContext`
Labels: debt,workbench-editors

This check here:

https://github.com/microsoft/vscode/blob/5b5e760015c063cd44e987e4f2e5316a8ff412e2/src/vs/workbench/browser/parts/editor/editorCommandsContext.ts#L64

Potentially leaves out `Tree` instances. As you can see, elsewhere we also check for other kinds of widgets:

https://github.com/microsoft/vscode/blob/5b5e760015c063cd44e987e4f2e5316a8ff412e2/src/vs/workbench/contrib/files/browser/files.ts#L73-L83

And besides, it might wrongfully assume the context is a list when the active editor focus is in a list widget as it is the case in notebooks (https://github.com/microsoft/vscode/issues/221582).
Repository: transformers
Issue: JudgeXL-LLM
Labels: New model

### Model description

Transformers XL variation called JudgeXL-LLM (for now). I am experimenting with different variations of this model but the goal is to make this model infused with a restaurant program i am developing. It is a text generation/question answering LLM that i would eventually like to teach logic and reasoning. I am still new to the AI/Machine learning world so I will be making adjustments as i experiment with this model. I would like the Original Model name to be JudgeXL-LLM but the model type to be judgellm because i am expecting to make plenty of variations and they may not include the xl part of the code.

### Open source status

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

### Provide useful links for the implementation

https://huggingface.co/Wonder-Griffin/XL-Judge-LLM... that is where i have the model loaded, the rest is all saved on my local device. I am the only one who ahs worked on the code, my name is Morgan Griffin, aka WongrifferousAI, Judgemrogan, Wonder-Griffin
Repository: transformers
Issue: JudgeXL-LLM
Labels: New model

### Model description

Transformers XL variation called JudgeXL-LLM (for now). I am experimenting with different variations of this model but the goal is to make this model infused with a restaurant program i am developing. It is a text generation/question answering LLM that i would eventually like to teach logic and reasoning. I am still new to the AI/Machine learning world so I will be making adjustments as i experiment with this model. I would like the Original Model name to be JudgeXL-LLM but the model type to be judgellm because i am expecting to make plenty of variations and they may not include the xl part of the code.

### Open source status

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

### Provide useful links for the implementation

https://huggingface.co/Wonder-Griffin/XL-Judge-LLM... that is where i have the model loaded, the rest is all saved on my local device. I am the only one who has worked on the code, my name is Morgan Griffin, aka WongrifferousAI, Judgemrogan, Wonder-Griffin
Repository: pytorch
Issue: backward of adaptive max pool (adaptive_max_pool2d_backward_cuda) doesn't have a deterministic implementation
Labels: module: autograd,triaged,module: determinism,actionable

UserWarning: adaptive_max_pool2d_backward_cuda does not have a deterministic implementation, but you set 'torch.use_deterministic_algorithms(True, warn_only=True)'. You can file an issue at https://github.com/pytorch/pytorch/issues to help us prioritize adding deterministic support for this operation. (Triggered internally at C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\aten\src\ATen\Context.cpp:75.)
  Variable._execution_engine.run_backward(  # Calls into the C++ engine to run the backward pass

cc @ezyang @albanD @gqchen @pearu @nikitaved @soulitzer @Varal7 @mruberry @kurtamohler
Repository: vscode
Issue: [188] potential listener LEAK detected, having 175 listeners already. MOST frequent listener (1):
Labels: error-telemetry

```javascript
Error
at c.create in src/vs/base/common/event.ts:902:15
at g.q [as onMarkerChanged] in src/vs/base/common/event.ts:1109:34
at u.c in src/vs/base/common/observableInternal/utils.ts:226:28
at u.addObserver in src/vs/base/common/observableInternal/base.ts:264:9
at p.readObservable in src/vs/base/common/observableInternal/autorun.ts:271:14
at u.read in src/vs/base/common/observableInternal/base.ts:196:18
at h.isPresentAtPosition in src/vs/workbench/contrib/accessibilitySignals/browser/editorTextPropertySignalsContribution.ts:207:9
at p._runFn in src/vs/workbench/contrib/accessibilitySignals/browser/editorTextPropertySignalsContribution.ts:147:42
at p.j in src/vs/base/common/observableInternal/autorun.ts:196:10
at new p in src/vs/base/common/observableInternal/autorun.ts:164:8
at L in src/vs/base/common/observableInternal/autorun.ts:17:9
at d.value in out/vs/workbench/workbench.desktop.main.js:1254:53994
at l.B in src/vs/base/common/event.ts:1211:13
at l.C in src/vs/base/common/event.ts:1222:9
at l.fire in src/vs/base/common/event.ts:1246:9
at d.value in src/vs/editor/browser/widget/codeEditor/codeEditorWidget.ts:1720:38
at l.B in src/vs/base/common/event.ts:1211:13
at l.fire in src/vs/base/common/event.ts:1242:9
at C.s in src/vs/editor/common/viewModelEventDispatcher.ts:64:18
at C.endEmitViewEvents in src/vs/editor/common/viewModelEventDispatcher.ts:109:8
at <anonymous> in src/vs/editor/common/viewModel/viewModelImpl.ts:1111:27
at cb in src/vs/editor/browser/widget/codeEditor/codeEditorWidget.ts:1655:14
at D.U in src/vs/editor/common/viewModel/viewModelImpl.ts:1106:36
at D.restoreCursorState in src/vs/editor/common/viewModel/viewModelImpl.ts:1035:8
at K.restoreViewState in src/vs/editor/browser/widget/codeEditor/codeEditorWidget.ts:999:32
at N.setInput in src/vs/workbench/contrib/files/browser/editors/textFileEditor.ts:139:14
at async o.S in src/vs/workbench/browser/parts/editor/editorPanes.ts:434:4
at async o.L in src/vs/workbench/browser/parts/editor/editorPanes.ts:254:34
at async o.openEditor in src/vs/workbench/browser/parts/editor/editorPanes.ts:131:11
at async in src/vs/workbench/browser/parts/editor/editorGroupView.ts:1269:49
at async ee in src/vs/workbench/browser/parts/editor/multiEditorTabsControl.ts:916:6
```
[Go to Errors Site](https://errors.code.visualstudio.com/card?ch=f1e16e1e6214d7c44d078b1f0607b2388f29d729&bH=73bb9dc1-a287-3058-1890-efbe4d1346da)
Repository: vscode
Issue: Cannot read properties of undefined (reading 'size')
Labels: error-telemetry

```javascript
TypeError: Cannot read properties of undefined (reading 'size')
at S.elementHeight in src/vs/base/browser/ui/list/listView.ts:808:28
at he.reveal in src/vs/base/browser/ui/list/listWidget.ts:1904:35
at O.s in src/vs/base/browser/ui/list/listWidget.ts:401:13
at <anonymous> in src/vs/base/browser/ui/list/listWidget.ts:342:18
at d.value in src/vs/base/common/event.ts:484:15
at l.B in src/vs/base/common/event.ts:1211:13
at l.fire in src/vs/base/common/event.ts:1242:9
at HTMLDivElement.E in src/vs/base/browser/event.ts:40:41
```
[Go to Errors Site](https://errors.code.visualstudio.com/card?ch=f1e16e1e6214d7c44d078b1f0607b2388f29d729&bH=5c52cc12-5e5f-298a-1831-0a4126dfa894)
Repository: pytorch
Issue: Missing grad_fn information while torch.compile with customized gradient function
Labels: triaged,oncall: pt2,module: aotdispatch,module: pt2-dispatcher

### 🐛 Describe the bug

I was using torch.compile to optimize a transpose single operator network, and instead of triggering the output_type configuration of alias_of_input, I wanted to use fw_outs directly as the output of the network, so I tried to add a custom gradient function to the network in anticipation of triggering the output_type configuration of custom_function_view. I used the following script as described earlier,
```python
# *_*coding:utf-8 *_*
import torch
import torch.nn as nn
import torch.nn.functional as F
import json
import numpy as np
import torch._dynamo as dynamo

class CustomFunction(torch.autograd.Function):
    # @staticmethod
    def forward(self, input):
        return torch.transpose(input, 0, 1)


class CustomTranspose_2D(nn.Module):
    def __init__(self):
        super().__init__()
    def forward(self, input):
        return CustomFunction.apply(input)

if __name__ == '__main__':
    device = 'cpu'
    backend = 'cpu'
    shape2D = (64, 128)
    input_data = np.arange(1.0, shape2D[0] * shape2D[1] + 1).astype(np.float32)
    input_data = input_data.reshape(shape2D)
    mul1 = torch.ones(128, 64).to(device)
    input_data = torch.tensor(input_data , requires_grad=True).to(device)
    print("input_data: ", input_data)
    model = CustomTranspose_2D().to(device)
    optimized_model = torch.compile(model, backend=backend)
    output = optimized_model(input_data)
    print("output: ", output)
```
Inside torch._functorch._aot_autograd.collect_metadata_analysis, the value obtained for grad_fn is None, as shown below
![578651757f66e21a4420d355eecfe50b](https://github.com/user-attachments/assets/c0c6bcb2-257d-4cec-8226-2f13d4a5dbcb)
Therefore, the output_type configuration of alias_of_input is still triggered.
Under such conditions, inside torch._functorch._aot_autograd.functional_utils.gen_alias_from_base there will be in-place processing of fw_outs, which is not what I expect.
<img width="551" alt="dcc62f9066c877c667822e754d2d0f28" src="https://github.com/user-attachments/assets/5a882ae2-5d01-4979-aa99-2028c5f0f8d5">

Is there something wrong with my previous processing? What should I do in order for the output_type to be set to **custom_function_view** or **non_alias**?

### Error logs

_No response_

### Minified repro

_No response_

### Versions

env:
Python  3.11.9
torch     2.3.0+cpu
numpy  1.26.3

cc @ezyang @chauhang @penguinwu @zou3519 @bdhirsh
Repository: pytorch
Issue: torch.compile should not recompiles when `.requires_grad=True` under `torch.no_grad()` context
Labels: triaged,oncall: pt2,module: dynamo

### 🐛 Describe the bug

```python
import torch

@torch.compile()
def f(a, b):
    return (a + b).clip(0)

a = torch.randn(1024, 1024)
b = torch.randn(1024, 1024)

with torch.no_grad():
    f(a, b)
    a.requires_grad_(True)
    f(a, b)
```

Run with `TORCH_LOGS="recompiles"`

```
V0727 08:08:44.508000 30548 torch/_dynamo/guards.py:2688] [0/1] [__recompiles] Recompiling function f in /teamspace/studios/this_studio/debug.py:3
V0727 08:08:44.508000 30548 torch/_dynamo/guards.py:2688] [0/1] [__recompiles]     triggered by the following guard failure(s):
V0727 08:08:44.508000 30548 torch/_dynamo/guards.py:2688] [0/1] [__recompiles]     - 0/0: tensor 'L['a']' requires_grad mismatch. expected requires_grad=0
```

Putting `torch.no_grad()` inside the compiled function also yields the same results. Although this is not a bug per se, minimize recompiles should be beneficial, especially to avoid hitting recompiles limit. From my understanding, there shouldn't be any correctness problem if we don't recompile, since `.requires_grad` is irrelevant inside the `torch.no_grad()` context.

### Versions

Latest torch nightly 2.5.0.dev20240726

cc @ezyang @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @amjames
Repository: PowerToys
Issue: Advanced Paste
Labels: Issue-Bug,Needs-Triage,Product-Advanced Paste

### Microsoft PowerToys version

0.82.1

### Installation method

Microsoft Store

### Running as admin

Yes

### Area(s) with issue?

Advanced Paste

### Steps to reproduce

    I have a 3 monitor setup.  When I trigger Advanced Paste on monitor 2, for instance, the app pulls monitor 3 on to monitor 2.  This leave me unable to copy/select the text on the intended monitor 2.  

### ✔️ Expected Behavior

I was expecting to be able to run Advanced Paste then be able to select the text from the intended screen.

### ❌ Actual Behavior

I have a 3 monitor setup.  When I trigger Advanced Paste on monitor 2, for instance, the app pulls monitor 3 on to monitor 2.  This leave me unable to copy/select the text on the intended monitor 2.  

### Other Software

_No response_
Repository: ollama
Issue: lama runner process has terminated: exit status 0xc0000005 - snowflake-arctic-embed
Labels: bug

### What is the issue?

It's again the #4334 issue. I have multiple local CPU nodes and using ollama behind the litellm proxy.
The issue is with embedding call for **snowflake-arctic-embed** model.
For example **nomic-embed-text** seems to be working fine.

```litellm.llms.ollama.OllamaError: {"error":"llama runner process has terminated: exit status 0xc0000005"}```

### OS
Windows

### GPU

_No response_

### CPU

Intel

### Ollama version

0.2.8 - 0.3.0
Repository: next.js
Issue: Inconsistent Image Loading with Case-Sensitive Extensions
Labels: examples

### Verify canary release

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

### Provide environment information

```bash
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Enterprise
  Available memory (MB): 8076
  Available CPU cores: 4
Binaries:
  Node: 20.13.1
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.2.3
  eslint-config-next: 14.2.3
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.4.5
Next.js Config:
  output: N/A
```


### Which example does this report relate to?

This report does not directly relate to any specific example from the Next.js examples folder. It is a general issue encountered in projects where static images with case-sensitive extensions (e.g., .JPG vs. .jpg) cause problems in the production build

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

Chrome Version 127.0.6533.72 (Official Build) (64-bit)

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

_No response_

### Describe the Bug

In our project, we have static images stored in the public folder. When an image has a .JPG extension, but the code references it with a .jpg extension, everything works fine in the development mode. However, in the production mode, after building the project, these images fail to load, and no clear error message is provided.

### Expected Behavior

I expect that image files with case-sensitive extensions (e.g., .JPG vs. .jpg) should be handled consistently across both development and production environments. Specifically, in production mode, these images should load correctly without any issues, just as they do in development mode. Alternatively, there should be a clear and concise error message indicating the mismatch in file extensions during the build process, allowing developers to identify and correct the issue promptly.

### To Reproduce

1. Create a Next.js project or use an existing one.

2. Place an image with a .JPG extension in the public directory.

3. Reference this image in a component using a .jpg extension.

`
// ExampleComponent.jsx
import Image from 'next/image';

const ExampleComponent = () => (
  <div>
    <Image src="/example.JPG" alt="Example Image" width={500} height={500} />
  </div>
);

export default ExampleComponent;
`

4. Run the project in development mode using npm run dev.

5. Observe that the image loads correctly without any errors.

6. Build the project for production using npm run build.

7. Start the production server using npm start. 

8. Observe that the image fails to load in production mode, and no clear error message is provided.