sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: go/doc: requires 2 pass for multiline comments with spacing
Labels: NeedsInvestigation

### Go version

Go 1.22

### Output of `go env` in your module/workspace:

```shell
GO111MODULE='on'
GOARCH='arm64'
GOBIN=''
GOCACHE='/Users/davewalker/Library/Caches/go-build'
GOENV='/Users/davewalker/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/davewalker/src/go/pkg/mod'
GONOPROXY='github.com/Workiva'
GONOSUMDB='github.com/Workiva'
GOOS='darwin'
GOPATH='/Users/davewalker/src/go'
GOPRIVATE='github.com/Workiva'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/opt/homebrew/opt/go/libexec'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/opt/homebrew/opt/go/libexec/pkg/tool/darwin_arm64'
GOVCS=''
GOVERSION='go1.22.0'
GCCGO='gccgo'
AR='ar'
CC='cc'
CXX='c++'
CGO_ENABLED='1'
GOMOD='/Users/davewalker/src/go/src/github.com/Workiva/fmttest/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/mv/8cw5jx652lg0hyrqjn28dctc0000gs/T/go-build2871199811=/tmp/go-build -gno-record-gcc-switches -fno-common'
```


### What did you do?

```example.go
package main

/*
    This is a multiline comment with
    things
  */
func A() {}
```

The file above needs to have `go fmt` run twice on it to be formatted properly.  Discovered via `go/format` package with `format.Source()` where read in AST comments are improperly formatted after a single pass.

### What did you see happen?

After the first `go fmt`
```example.go
package main

/*
	This is a multiline comment with
	things
*/
func A() {}
```

After the second `go fmt`
```example.go
package main

/*
This is a multiline comment with
things
*/
func A() {}
```

### What did you expect to see?

An idempotent formatter that can format source in one pass.
Repository: flutter
Issue: [unified_analytics] avoid flutter_tools feature flags from getting truncated when sending to unified_analytics
Labels: P1,team-tool,triaged-tool

Currently, the enabled features we send for analytics remains in the same order that they were enabled. So if we had 3 features:
- my-first-feature
- my-second-feature
- my-thrid-feature

The list will always be = `"my-first-feature,my-second-feature,my-thrid-feature"`

In GA4 we have a 36 character limit so if the string is longer than 36 characters, anything after 36 gets truncated and dropped. This could send a false signal that a given feature is not being used,

We should encode the feature names more compactly, to minimize the loss of data due to truncation
Repository: ollama
Issue: Restrict model pulling based on license
Labels: feature request

It would be great if there was a configurable option to restrict the ability for Ollama server to pull certain models based on the model's license. This is necessary for organizations that would like to use Ollama as a model runtime, but cannot use some models due to limitations in their licenses.

A check could be placed after [the model manifest](https://github.com/ollama/ollama/blob/790cf34d172e40c0aa4689011b5323cbdd7b83b6/server/images.go#L1034-L1037) is pulled during `PullModel()`. If the license in the manifest is on a block list (conversely, not on an allow list), then return an error.

Ideally the allow/block lists could be passed via CLI (e.g. `--allow-license ["apache-2.0", "mit"]`) or environment variable (e.g. `export OLLAMA_ALLOW_LICENSE='["apache-2.0", "mit"]'`). 

The current model manifest only contains the entire raw license text, not a simple license identifier (e.g. `apache-2.0`). [The Licenses page on Huggingface hub docs](https://huggingface.co/docs/hub/en/repositories-licenses) is a good reference for common license identifiers. Some work might be required to create and track a new license identifier field in the model manifests. Hypothetically, it is possible to compare the raw license text using hashing, but requiring the user to calculate the license hash and pass it like `--allow-license-hash ["12345ABCDEF"]` is not user friendly.

Its likely that allowing/blocking models based on other attributes in the model manifest (hash, tag, family, etc..) would also be useful by many.

This would be a good alternative to locally hosting the model library with a subset of allowed models: https://github.com/ollama/ollama/issues/914
Repository: rust
Issue: Missed Optimization: Inefficient Handling of Mutable Reference in Simple Conditional Assignment
Labels: A-LLVM,I-slow,C-optimization

The following example shows how LLVM isn't able to optimize trivial branches when dealing with `&mut` pointers, while it can with owned values. I'd expect both functions to override `current_len` with `0` without needing to branch.

```rs
#[no_mangle]
pub fn unoptimized(current_len: &mut u32) {
    if *current_len != 0 {
        *current_len = 0;
    }
}

#[no_mangle]
pub fn optimized(mut current_len: u32) -> u32 {
    if current_len != 0 {
        current_len = 0;
    }
    current_len
}
```

```asm
unoptimized:
        cmp     dword ptr [rdi], 0
        je      .LBB0_2
        mov     dword ptr [rdi], 0
.LBB0_2:
        ret

optimized:
        xor     eax, eax
        ret
```

```ll
define void @unoptimized(ptr noalias nocapture noundef align 4 dereferenceable(4) %current_len) unnamed_addr {
start:
  %_2 = load i32, ptr %current_len, align 4
  %0 = icmp eq i32 %_2, 0
  br i1 %0, label %bb3, label %bb1

bb1:
  store i32 0, ptr %current_len, align 4
  br label %bb3

bb3:
  ret void
}

define noundef i32 @optimized(i32 noundef %0) unnamed_addr {
start:
  ret i32 0
}
```
Repository: flutter
Issue: [flutter_tools] Stop instantiating FakeAnalytics from package:unified_analytics in tool tests
Labels: P3,team-tool,triaged-tool

It might be advantageous in the tool if we just stopped importing FakeAnalytics from package:unified_analytics, if breaking changes to that class is going to necessitate refactors to tool tests.

For further context, see these comment threads on a PR:

- https://github.com/flutter/flutter/pull/147250#discussion_r1576771054
- https://github.com/flutter/flutter/pull/147250#discussion_r1576911367
Repository: go
Issue: runtime/pprof: TestLabelSystemstack failure on linux-arm
Labels: NeedsInvestigation,compiler/runtime

```
#!watchflakes
post <- pkg == "runtime/pprof" && test == "TestLabelSystemstack"
```

2024-04-03 15:35 go1.21-linux-arm release-branch.go1.21@d8392e69 runtime/pprof.TestLabelSystemstack [ABORT] ([log](https://ci.chromium.org/b/8751663534303330753))
Repository: rust
Issue: Iterating all `char`s blocks dead code elimination
Labels: A-LLVM,I-slow,C-optimization

This following code does nothing, however does not get optimized away.
```rust
pub fn dead_code_elim_failure() {
    for _ in '\0'..'\u{10ffff}' {}
}
```

```asm
example::dead_code_elim_failure::h8fb80fbacc62758b:
        xor     ecx, ecx
        mov     eax, 57344
.LBB0_1:
        cmp     ecx, 55295
        lea     edx, [rcx + 1]
        cmove   edx, eax
        mov     ecx, edx
        cmp     edx, 1114111
        jb      .LBB0_1
        ret
```

### Meta

Tested on:
```
rustc 1.77.2 (25ef9e3d8 2024-04-09)
binary: rustc
commit-hash: 25ef9e3d85d934b27d9dada2f9dd52b1dc63bb04
commit-date: 2024-04-09
host: x86_64-unknown-linux-gnu
release: 1.77.2
LLVM version: 17.0.6
``` 
```
rustc 1.79.0-nightly (dbce3b43b 2024-04-20)
binary: rustc
commit-hash: dbce3b43b6cb34dd3ba12c3ec6f708fe68e9c3df
commit-date: 2024-04-20
host: x86_64-unknown-linux-gnu
release: 1.79.0-nightly
LLVM version: 18.1.4
```
Repository: PowerToys
Issue: PowerToys Run / display Run recently used locations
Labels: Idea-Enhancement,Product-PowerToys Run,Needs-Triage

### Description of the new feature / enhancement

When using powertoys run, it doesnt know the recently used paths/locations that have been using on the standard run. So I usually open standard run to access the recently used paths because PowerToys wont display those
![Run recently used](https://github.com/microsoft/PowerToys/assets/104733199/f94bcff5-4632-486b-8225-00779372b856)


### Scenario when this would be used?

Someone who plans to start using PowerToys Run over standard Run might want to be able to see those recently used paths/locations on PowerToys

### Supporting information

_No response_
Repository: vscode
Issue: a11y issue on tooltips
Labels: feature-request,workbench-hover

I use a larger mouse cursor and a lot of the tooltips are appearing UNDER the mouse, and with a larger cursor are now obfuscated.  This was recently more evident a pain in the new code-coverage feature where the tool tip over the three 'pills' provide the description of what they represent as the UX nowhere else does.

![image](https://github.com/microsoft/vscode/assets/4821/917b9bf1-fdba-4eba-918e-0709b5ec6ff4)

I then noticed that even with a small cursor the tooltips are appearing under the mouse cursor and while not fully occluded still is a poor experience versus appearing above or measured to be out of the way
Repository: node
Issue: Extremely slow assertion error message generation for minified bundles
Labels: confirmed-bug,assert,performance

### Version

v20.11.1

### Platform

Darwin wololobook 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:11:05 PDT 2024; root:xnu-10063.101.17~1/RELEASE_X86_64 x86_64 i386 Darwin

### Subsystem

assert

### What steps will reproduce the bug?

1. Create an empty file with thousands of columns, e.g. 900,000 `;`'s
2. Append `require('node:assert')(null)`
3. `getErrMessage`, specifically `findColumn` feeding into `acorn` takes several minutes

### How often does it reproduce? Is there a required condition?

We've experienced this in production a number of times but we were never able to figure out what the problem was. We ship minified code to AWS Lambda and utilize the `assert` module for, well, runtime assertions. We were seeing unexplainable timeouts whenever a falsy case was hit.

It was luck that we found this in our test suite because we ran it through Terser by mistake.

### What is the expected behavior? Why is that the expected behavior?

I'd expect the column search to be much faster, closer to something in the sub second/milliseconds range.

### What do you see instead?

It takes minutes to construct the assertion error message.

It looks like a subset of the code may be passed to `acorn` (https://github.com/nodejs/node/blob/main/lib/assert.js#L232) leading to syntax errors as it parses till the end (https://github.com/nodejs/node/blob/main/lib/assert.js#L265), `acorn` then reports that error whenever it hits that point (https://github.com/nodejs/node/blob/main/lib/assert.js#L278), `findColumn` then continues to the next token and reads more chunks if necessary and `acorn` starts from scratch. 

A bundler like Webpack emits an IIFE which itself contains an immediate block. I believe that is the majority of time spent for `acorn` traversing each token in it. I suspect the many errors come from that very block that is incomplete, so `acorn` wastes time trying to parse something that is known to be incomplete.

~I think a better regression to the reproduction section is to do an IIFE and drop semi colons in there: `(() => {;;;;;;;...;;;;;;require('node:assert')(null);})()`~. Interestingly enough, an IIFE around it is not affected by it.

Another interesting thing is that this does not affect normal Error's - is there a particular reason why they run on two different implementations?

### Additional information

<img width="3120" alt="Screenshot 2024-04-24 at 23 33 35" src="https://github.com/nodejs/node/assets/110860/082ef83c-7458-4a0e-b2c3-a228852f6704">
Repository: go
Issue: x/net/quic: TestUDPSourceSpecified failures
Labels: NeedsInvestigation

```
#!watchflakes
default <- pkg == "golang.org/x/net/quic" && test == "TestUDPSourceSpecified"
```

Issue created automatically to collect these failures.

Example ([log](https://build.golang.org/log/13bcf2ab6596c115f0cdec072e9ff9ee01195743)):

    --- FAIL: TestUDPSourceSpecified (0.01s)
        --- FAIL: TestUDPSourceSpecified/udp6/udp6/spec (0.00s)
            udp_test.go:45: Write: write udp6 [::1]:61184->[::1]:55294: sendmsg: no buffer space available


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: excalidraw
Issue: Can we please white list Notion so I can embed Notion docs? 
Labels: whitelist

I got an error when attempting to embed a notion document, and it said to raise an issue here in order to get it whitelisted. Below is the URL I was attempting to embed. I have already made the page public but it didn't work. 

URL: https://ksensetech.notion.site/Ksense-Workflow-Detail-c872c6ba5b694f579a9f50c70186961f

![image](https://github.com/excalidraw/excalidraw/assets/127987648/4e0c0ad6-6e32-4963-9979-c00dd9fe54dd)
Repository: next.js
Issue: Relative <img> 404s when using next/link and trailingSlash in Safari
Labels: bug,linear: next

### Link to the code that reproduces this issue

https://github.com/blakewilson/relative-img-path-bug

### To Reproduce

1. Start the application in dev mode
2. Go to http://localhost:3000
3. Click the first link and confirm that the image exists on the `/hello-world` route
4. Go back to http://localhost:3000
5. Click the second link (using `next/link`) and notice the image 404s on the `/hello-world` route. Refresh the page, and notice the image appears.

### Current vs. Expected behavior

Following the steps above, I expect to see the correct image when rendering the hello world route via next/link. Instead, the image 404s.

### Provide environment information

```bash
Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 23.2.0: Wed Nov 15 21:54:51 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6030
  Available memory (MB): 18432
  Available CPU cores: 11
Binaries:
  Node: 18.17.0
  npm: 10.2.5
  Yarn: N/A
  pnpm: 8.15.1
Relevant Packages:
  next: 14.3.0-canary.21 // Latest available version is detected (14.3.0-canary.21).
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.1.3
Next.js Config:
  output: N/A
```


### Which area(s) are affected? (Select all that apply)

Not sure

### Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), next start (local), Vercel (Deployed), Other (Deployed)

### Additional context

_No response_

<sub>[NEXT-3245](https://linear.app/vercel/issue/NEXT-3245/relative-img-404s-when-using-nextlink-and-trailingslash)</sub>
Repository: ollama
Issue: I have tested 4-5 phi-3-128K-Instruct models from different providers with different quants, all GGUF files, none are runnable with ollama
Labels: bug

### What is the issue?

ollama can import them, but not run them.

(Pythogora) developer@ai:~/PROJECTS/autogen$ ~/ollama/ollama run phi-3-mini-128k-instruct.Q6_K
Error: llama runner process no longer running: 1 error:failed to create context with model '/home/developer/.ollama/models/blobs/sha256-78f928e77e2470c7c09b151ff978bc348ba18ccde0991d03fe34f16fb9471460'

This how the model file looks like.

FROM /opt/data/PrunaAI/Phi-3-mini-128k-instruct-GGUF-Imatrix-smashed/Phi-3-mini-128k-instruct.Q6_K.gguf

TEMPLATE """
{{- if .First}}


{{ .System}}

{{- end}}


{{ .Prompt}}



"""

PARAMETER num_ctx 128000
PARAMETER temperature 0.2
PARAMETER num_gpu 100

PARAMETER stop 

PARAMETER stop 


SYSTEM """You are a helpful AI which can plan, program, and test, analyze and debug."""


### OS

Linux

### GPU

Nvidia

### CPU

Intel

### Ollama version

latest from source.
Repository: ollama
Issue: Command-R fails when using format=json
Labels: bug

### What is the issue?

For some reason command-r is failing when put into JSON format mode. It seems to work fine otherwise.

```
% ollama run command-r  --verbose "output the usa as a json"
` ``json
{
    "country": "United States of America",
    "capital": "Washington, D.C.",
    "population": 333,271,411,
    "states": 50,
    "president": "Joe Biden"
}
` ``

total duration:       6.241768s
load duration:        2.127476417s
prompt eval count:    12 token(s)
prompt eval duration: 249.108ms
prompt eval rate:     48.17 tokens/s
eval count:           63 token(s)
eval duration:        3.86453s
eval rate:            16.30 tokens/s

% ollama run command-r --format json --verbose "output the usa as a json"
Error: an unknown error was encountered while running the model
```

llama3 though does work for json format output:

```
% ollama run llama3 --format json --verbose "output the florida as a json"
{ "name": "Florida", "capital": "Tallahassee", "population": 21477747, "area": 170312, "cities": ["Jacksonville", "Miami", "Tamiami Trail", "Orlando", "St Petersburg"], "fun_facts": [ "Florida is known as the Sunshine State because of its
abundant sunshine and warm weather.", "The state has a diverse range of ecosystems, including beaches, mangroves, and forests." ] }
```

### OS

macOS

### GPU

Apple

### CPU

Apple

### Ollama version

0.1.32
Repository: vscode
Issue: `editorError`, `editorWarning`, `editorInfo` and `editorHint` `background` properties aren't properly aligned
Labels: bug

I prefer to use a background color for editor errors and warnings instead of the squiggles. I find them less distracting and obtrusive. However, recently, they're not correctly aligned with the lines.

I'll share some screenshots to illustrate the issue. There is a colored background on the whole line from the error-lens extension, but the issues persist without the extension and the feature is still unaligned with the line highlight when the line is selected.

### Screenshots

![Captura de tela 2024-04-24 212702](https://github.com/microsoft/vscode/assets/39251878/5e8d9a50-f423-43e1-b3c2-07ad9d006031)
![Captura de tela 2024-04-24 212721](https://github.com/microsoft/vscode/assets/39251878/83b42904-97d5-459b-a3c0-f27d2ba63bfd)


### VS Code Version:
```
$ code --version
1.88.0
5c3e652f63e798a5ac2f31ffd0d863669328dc4c
x64
```
Repository: flutter
Issue: [pigeon] Support ExistentialAny in Swift code
Labels: c: new feature,package,c: proposal,team-ecosystem,p: pigeon,P2,triaged-ecosystem

### Use case

When -enable-upcoming-feature ExistentialAny is set to Other Swift Flags, it results in a build error.
This feature is said to default to true in Swift 7, and 'any' needs to be appended to Existential Type.
Since the code generated by the current pigeon does not append 'any' to the Existential Type, I would like it to be modified to include this.

In issue( #147283 ), I provided sample code and a feature request that also covers ExistentialAny.
However, this issue will focus specifically on addressing errors related to ExistentialAny.

By generating code from the following code using pigeon and simply adding -enable-upcoming-feature ExistentialAny to Other Swift Flags, you can see a build error.

```dart
import 'package:pigeon/pigeon.dart';

@ConfigurePigeon(
  PigeonOptions(
    dartOut: 'lib/generated/sample.g.dart',
    dartOptions: DartOptions(),
    swiftOut: 'ios/Runner/generated/Sample.g.swift',
    swiftOptions: SwiftOptions(),
  ),
)
@HostApi()
abstract class SampleApi {
  @async
  Sample fetchSampleAsync(SampleParameter parameter);

  Sample fetchSampleSync(SampleParameter parameter);

  @async
  Object? objectSampleAsync(Object? parameter);

  Object? objectSampleSync(Object? parameter);
}

@FlutterApi()
abstract class CallFromNative {
  Sample fetchSample(SampleParameter parameter);

  Object? objectSample(Object? parameter);
}

class Sample {
  Sample({
    required this.text,
    required this.id,
  });
  final String text;
  final int id;
}

class SampleParameter {
  SampleParameter({
    required this.text,
    required this.id,
  });
  final String text;
  final int id;
}
```

I will provide a link to a sample repository to easily confirm the build error.
https://github.com/yuukiw00w/ExistentialAnySampleForFlutter

### Proposal

Please add 'any' to the Existential Type as in the following Pull Request.
https://github.com/yuukiw00w/ExistentialAnySampleForFlutter/pull/1/files

From what I've confirmed, 'any' needs to be added to 'Error' (in completion handler), to the 'api' in the 'setUp' function and `FlutterBinaryMessenger`.
Repository: flutter
Issue: There should be an easy way to create an Image Widget and an ImageProvider from a dart:ui Image.
Labels: c: new feature,a: images,P2,team-framework,triaged-framework

The workaround is folks are converting to ByteData then back to an image via MemoryImage, which is actually insanely expensive since it adds PNG encode/decode on both sides.

https://stackoverflow.com/questions/58870443/flutter-image-object-to-imageprovider

Draft proposal:

```dart
// Returns an already loaded image.
class CanvasImageProvider extends ImageProvider<ui.Image> {
  CanvasImageProvider(this.image);

  final ui.Image image;

  @override
  ImageStreamCompleter loadImage(ui.Image image, ImageDecoderCallback decode) {
    return OneFrameImageStreamCompleter(
      SynchronousFuture<ImageInfo>(ImageInfo(
        image: image,
      ))
    );
  }

  @override
  Future<ui.Image> obtainKey(ImageConfiguration configuration) {
    return SynchronousFuture<ui.Image>(image);
  }
}
```

TBD whether or not we expose a new Image constructor or how we make it more obvious that this isn't the correct pattern.
Repository: ollama
Issue: Apple Silicone Neural Engine: Core ML model package format
Labels: feature request

Please consider adding Core ML model package format support to utilize Apple Silicone Nural Engine + GPU.

List of Core ML package format models

https://github.com/likedan/Awesome-CoreML-Models
Repository: pytorch
Issue: Add support for IPC features for PrivateUse devices
Labels: module: multiprocessing,feature,triaged,needs design,module: PrivateUse1

### 🚀 The feature, motivation and pitch

Currently, PyTorch only supports inter-process communication (IPC) on CUDA devices. I'm looking into doing IPC on 3rd party devices and hope some abstract code can be added to the PyTorch community.
So I want to ask if this feature is considered

### Alternatives

I plan to provide underlying support through PrivateUse1Hooks, and provide PrivateUse1 device support for the _share_device_, _new_shared_device, and _release_ipc_counter_device methods in the python Storage class.

### Additional context

_No response_

cc @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu @penguinwu @fegin @XilunWu @wanchaol @fduwjj @wz337 @tianyu-l @wconstab @yf225 @chauhang @d4l3k @VitalyFedyunin @NmomoN @fwenguang @cdzhan @1274085042 @PHLens @rohan-varma
Repository: excalidraw
Issue: Arrow disappears when adjusting the size of its surrounding Box
Labels: bug

1. select an arrow.
2. wrap a box around the arrow.
3. adjust the size of the box, the arrow disappears.


https://github.com/excalidraw/excalidraw/assets/73568310/c0cd1864-9ea3-44e6-b574-6daa67daa7e8