sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: neovim
Issue: LSP: Enable filtering of code lenses
Labels: enhancement,needs:discussion,lsp

### Feature already in Vim?

No

### Feature description

It would be nice if neovim provided an API for filtering code lenses.
In my use-case, [haskell-language-server relies on code lenses for quite a few features](https://haskell-language-server.readthedocs.io/en/latest/features.html#code-lenses).

Some of them are useful to the degree that I have set up an autocmd to aggressively refresh them. But in some projects, code lenses that I'm not at all interested in show up. I can disable each plugin in the client config, but it would be nice if I could filter them out only for specific projects.

I'm thinking of something like this:

```lua
-- codelens.lua
function M.on_codelens(err, result, ctx, opts, _)
-- ...
end

function M.refresh(opts)
end
```

```lua
-- user call
opts = {
  filter = function(lens)
  --...
  end
}
vim.lsp.codelens.refresh(opts)
```

A similar API is provided by `lsp.codeAction`.

### Alternatives
* In my case, I can disable the respective haskell-language-server plugins. This takes effect globally though, so it isn't very flexible. Other language servers may not support this.
* Override the `textDocument/codeLens` handler manually.

Let me know if you think it's a good idea, and if so I'll gladly take some time to draft a PR.
Repository: go
Issue: cmd/go: Docs for `go mod vendor` does not include any information about vendoring a module for making changes
Labels: Documentation,NeedsDecision,GoCommand

### What is the URL of the page with the issue?
 
https://go.dev/ref/mod#go-mod-vendor
 
### What is your user agent?

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36
 
### Screenshot
 
![image](https://user-images.githubusercontent.com/9752092/196778353-947cd636-4887-4a35-8e1a-7b6a9726bc0b.png)
 
### What did you expect to see?

In the docs for `go mod vendor` I expect to see something regarding vendoring a dependency for making changes. For example bug fixes or addressing vulnerabilities. However, in the docs it explicitly says "Local changes should not be made to vendored packages". I think it would be nice to include a quick mention of this usecase here and a link to the "replace" directive and/or "workspaces" to address this.
Repository: go
Issue: encoding/json: clearer error message for boolean like prefix in invalid json strings
Labels: NeedsInvestigation

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
1.19
</pre>

### Does this issue reproduce with the latest release?
Yes.


### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
Using go playground. 
</pre></details>
https://go.dev/play/p/-AeaDZbeRj1

### What did you do?
Json.Unmarshal tries to box a string that starts with a boolean character ('t' or 'f') into a different error compared to a string starting with any other character. This causes the json validation error to be confusing. Can the error be fixed to be similar in both cases (first character invalid) or make the error for attempted boolean parsing to be different ("invalid boolean prefix detected", etc.).

Reproduced here:
https://go.dev/play/p/-AeaDZbeRj1

Code:
<pre>
package main

import (
	"encoding/json"
	"fmt"
)

func main() {

	// check valid input
	myJsonString := `{"some":"json"}`

	// check invalid input, like boolean start character.
	myJsonString1 := `test`
	myJsonString2 := `random`
	myJsonString3 := `true`
	var s map[string]interface{}
	fmt.Println(json.Unmarshal([]byte(myJsonString), &s))
	fmt.Println(json.Unmarshal([]byte(myJsonString1), &s))
	fmt.Println(json.Unmarshal([]byte(myJsonString2), &s))
	fmt.Println(json.Unmarshal([]byte(myJsonString3), &s))
}

Output:
<nil>
invalid character 'e' in literal true (expecting 'r')
invalid character 'r' looking for beginning of value
json: cannot unmarshal bool into Go value of type map[string]interface {}

Program exited.
</pre>

In the above, the error showing "invalid character 'e' in literal true" can be updated to state "invalid literal..." for clarity.
<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on go.dev/play is best.
-->



### What did you expect to see?
"invalid literal true, error in character 'e'"


### What did you see instead?
invalid character 'e' in literal true (expecting 'r')
Repository: godot
Issue: freeing `PhysicsServer3DExtension` crashs without any info
Labels: bug,topic:physics,topic:gdextension,crash

### Godot version

v4.0.beta3.official [01ae26d31]

### System information

windows 10

### Issue description

I run in this issue while migration my unit test api.
To test extraction of class names from engine classes i loop over all engine classes provided by `ClassDB.get_class_list()`
My test aborts without any reason, no error in the console

After adding more log infos i find out freeing a instance of `PhysicsServer3DExtension` aborts function calls without any error.
 

### Steps to reproduce

Run the code and you see the line `prints("freed")` is not executed.
```
func _ready():
	var instance := PhysicsServer3DExtension.new()
	prints(instance, instance.has_method("free"))
	# await get_tree().process_frame
	instance.free()
	prints("freed")
	await get_tree().process_frame
```
To force to see the "real" error i try to add an extra await process_frame
Rerun the code and comment in the line `# await get_tree().process_frame`
Now an error is shown
![image](https://user-images.githubusercontent.com/347037/196784958-345e8b0f-a933-406d-ab9a-8d21170400bd.png)


You can run over all engine classes and see the debuger crashes randomly.
The line `prints("--- Done ---")` is never called
```
func _ready():
	for clazz_name in ClassDB.get_class_list():
		if not ClassDB.can_instantiate(clazz_name):
			continue
		var instance = ClassDB.instantiate(clazz_name)
		prints(clazz_name, instance)
		await get_tree().process_frame
		if not instance is RefCounted:
			prints("---> free()", instance, instance.has_method("free"))
			instance.free()
			prints("freed")
			await get_tree().process_frame
	prints("--- Done ---")
```


### Minimal reproduction project

_No response_
Repository: rust
Issue: Partially const traits
Labels: A-const-eval,F-const_trait_impl

#102225 attempts to constify `Iterator` which would be a stepping stone towards `for _ in iter` loops in const fns.

The trouble there is that `#[const_trait]` requires that all trait methods are const and `Iterator` has an ever-growing set of methods which now all would have to be constified even though we only really need `Iterator::next` to be const to enable iterator loops.
And not only do those methods themselves have to be const but their return types must be const-constructable. So this property is quite viral.

Since most of the const trait syntax is still experimental and full of placeholders this may result in an unnecessarily large maintenance burden for the standard library. Additionally it can also hinder future API evolution because it rules out adding impossible-to-constify methods.

From a libs perspective partially const traits would allow us to constify the minimal necessary API surface to unlock further experimentation.

[Prior zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/const.20in.20the.20standard.20library/near/301868649) in which the [const_trait](https://hackmd.io/@beef/S1xy90bzs#const_trait-attribute) hackmd was brought up. My reading of it suggests that partially const traits were primarily removed due to open design questions, not due to fundamental impossibility.
Repository: vscode
Issue: Markdown preview does not scroll to top on new URI
Labels: bug,markdown,insiders-released

<!-- ⚠️⚠️ 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?: N/A (depends on the built-in markdown extension)

<!-- 🪓 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.72.1
- OS Version: macOS 12.4

Steps to Reproduce:

1. Create two Markdown documents, one with a relative link to the other, and enough content in both documents to scroll down
2. Preview the document with the link and scroll down to the link, then click it

Expected Behavior:

The link to the other document should open the new document at the top

Actual Behavior:

The scroll position stays the same, opening the new document at a random spot in that document

Other Information:

This change is probably straightforward to make, but it would break the existing behavior. I'm struggling to imagine why that behavior would be desirable though, so not sure it would actually affect anyone in a meaningful way.

cc @mjbvz
Repository: go
Issue: x/vulndb: add fix version to reports when it becomes available 
Labels: NeedsInvestigation,vulncheck or vulndb

If a vulnerability in a new report still does not have a fix, how do we include the fix information when and if it becomes available?

For std vulnerabilities this seems to be less of a problem since fixes have to go through the Go team.

For third party vulnerabilities, the story is less clear. Few options:

- have a specific supression tag. This tag *would not* indicate that we should not report vulnerability, yet it will serve as a designation for which reports might need more info. We can then automatically and periodically go through such reports and, if they have a link to a GH issue, see if the issue is closed. If so, manually add the fix information.

- perhaps we can hook to changes to Github advisories and if those changes mention fix info, we can add that info to the respective report.
Repository: rust
Issue: Suggest `~const std::marker::Destruct` for type parameters when needed
Labels: A-diagnostics,T-compiler

Given the following code ([playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=c33dba2eda44d304df24d541423cc05f)):

```rust
#![feature(const_mut_refs)]
#![feature(const_trait_impl)]

const fn call_twice<F>(mut f: F)
where
    F: ~const FnMut() -> (),
{
    f();
    f();
}

fn main() {
    let mut a = 10;
    call_twice(|| { a -= 1; });
    assert_eq!(a, 8);
}
```

The current output is:

```
error[E0493]: destructor of `F` cannot be evaluated at compile-time
  --> src/main.rs:4:24
   |
4  | const fn call_twice<F>(mut f: F)
   |                        ^^^^^ the destructor for this type cannot be evaluated in constant functions
...
10 | }
   | - value is dropped here
```

Ideally the output should suggest a `where`-clause fix:

```
help: consider restricting `F` to be destructible in const contexts:
  | where
 6|   F: ~const FnMut() -> () + ~const std::marker::Destruct,
  |                          +++++++++++++++++++++++++++++++
```

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

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

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: go
Issue: x/sys/windows/svc : IsWindowsService doesn't work properly inside a windows container
Labels: help wanted,OS-Windows,NeedsFix

### What version of Go are you using (`go version`)?

<pre>
$ go version go1.19.2 linux/amd64
x/sys v0.1.0
</pre>

### Does this issue reproduce with the latest release?

Yes

### What did you do?

If I use IsWindowsService() inside a container servercore:ltsc2019 it always returns false, nevermind if I launch it as CLI or as service.
In windows containers world the service stack is native. It's not necessarly a "container pattern" but it's widely used for multiple reasons. So that method should work.

After some tests, the fail reason seems pretty simple.
On the host the "Session ID" of the process svchost.exe (for example) is 0, but inside the container, the "Session ID" of a process svchost.exe is 1.
The **only** process with a session ID 0 inside a container are :
```
Get-Process | where {$_.SessionId -eq 0}

Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName
-------  ------    -----      -----     ------     --  -- -----------
      0       0       56          8                 0   0 Idle
     50       3      456       1212       5.20    964   0 smss
   2117       0      156        136      23.61      4   0 System
```
But good news, the parent process is still "services.exe".

WmiApSrv is a random service (it's the native monitoring stack of windows)
```
Get-Process -Id (Get-CimInstance Win32_Process -Filter "Name = 'WmiApSrv.exe'" | select ParentProcessId).ParentProcessId

Handles  NPM(K)    PM(K)      WS(K)     CPU(s)     Id  SI ProcessName
-------  ------    -----      -----     ------     --  -- -----------
    218      10     3628       7780     175.66    524   1 services
```
I think, removing the condition `parentProcess.SessionID == 0` could be safe and fine... Any windows guru there ?

In the meantime, the older deprecated funtion `IsAnInteractiveSession` is also buggy in a container, and **never** detects an interactive session even if you are in a CLI.
Repository: flutter
Issue: Improve the performance of the EditableTextState / text input synchronization
Labels: a: text input,framework,c: performance,P2,team-framework,triaged-framework

Currently every frame the `EditableTextState` will calculate and send state to the text input in the following locations:
1) https://github.com/flutter/flutter/blob/9064bf674b544a8d472ee231cb69b9f9b841d843/packages/flutter/lib/src/widgets/editable_text.dart#L3213
1) https://github.com/flutter/flutter/blob/9064bf674b544a8d472ee231cb69b9f9b841d843/packages/flutter/lib/src/widgets/editable_text.dart#L3225
1) https://github.com/flutter/flutter/blob/9064bf674b544a8d472ee231cb69b9f9b841d843/packages/flutter/lib/src/widgets/editable_text.dart#L3189

In the use case defined in https://github.com/flutter/flutter/issues/59327 this represents a significant portion of the ui thread's time.  I implemented a naive approach that dropped the frequency of the updates and that lead to a 28% decrease in CPU usage (https://github.com/flutter/flutter/pull/113722).  @LongCatIsLooong and Hixie determined there is a better way to be more reactive for sending updates so that is preferable to the naive drop in frequency.  We should implement that.

Here is the chat excerpt that explains the alternative:
```
Hixie — Today at 2:08 PM
if you just want to know when the rect changes, the way to do that is to create a Layer
similar to how FollowerLayers work
LongCatIsLooong — Today at 2:16 PM
The rects sent to the textinputplugin are in RenderEditable coordinates so probably no layer needed? 
But EditableTextState doesn't get notified when the text layout changes so it has to poll the caret location
Hixie — Today at 2:28 PM
oh if it's RenderEditable coordinates then yeah that's even better
why doesn't the RenderEditable know when the text layout changes?
isn't it responsible for doing the layout?
LongCatIsLooong — Today at 2:37 PM
EditableTextState doesn't, the inlinespan and writing direction etc,. are handed to the underlying TextPainter and the text painter figures out whether it needs to rebuild a new ui.Paragraph. I think TextPainter can probably be made a Listenable now that it has a dispose method?
Hixie — Today at 2:44 PM
who updates the TextPainter?
LongCatIsLooong — Today at 2:45 PM
RenderEditable does so yeah technically it can implement the same logic to figure out whether the text layout will be dirtied
I think the same issue prevents us from caching things that depend on text layout outside of TextPainter since only TextPainter knows when to invalidate them
Hixie — Today at 2:47 PM
i think it's fine to recompute the rect each time we update the TextPainter even if that's a bit more often than necessary
the key is just to do it no more often than that :-)
```
Repository: godot
Issue: AudioEffectSpectrumAnalyzerInstance.get_magnitude_for_frequency_range reports jittered values
Labels: bug,confirmed,topic:audio

### Godot version

3.5 stable
4.0 beta3

### System information

Windows 10 64 bits NVIDIA GeForce GTX 1060

### Issue description

I started playing with rendering a spectrum, and even after some smoothing and peaking, noticed it was kinda low quality. Then I noticed that the reported frequencies were actually jittering along the frequency axis.

It happens for all FFT sizes, but can be mistaken for a "normal precision issue" with the default 1024. It is a lot more obvious with larger FFT sizes and a chirp sound. The frequency peak "wiggles" constantly around the frequency it is supposed to be "following". 

https://user-images.githubusercontent.com/1311555/196815731-cc8b47ac-7d94-4009-aa0e-ce16ab5e0420.mp4

After seeing this, it becomes clear other FFT sizes also have this problem, but around a shorter width.
It seems the issue is temporal: reported values alternate between some time close to now and some time in the past. To the point when the chirp restarts, we can see values from the previous chirp still flicker back and forth for a brief moment.

Such discrepancy is not expected. It really looks like something is wrong in the way values are reported. Maybe the data from the ringbuffer is read in the wrong way?

### Steps to reproduce

Test project:

3.5:
[AudioAnalyzerFFTBug.zip](https://github.com/godotengine/godot/files/9824758/AudioAnalyzerFFTBug.zip)
4.0 beta3:
[AudioAnalyzerFFTBug_GD4.zip](https://github.com/godotengine/godot/files/9824806/AudioAnalyzerFFTBug_GD4.zip)

### Minimal reproduction project

_No response_
Repository: rust
Issue: regression: change in overflow checking
Labels: P-medium,T-compiler,regression-from-stable-to-stable

The regression in `diesel-softdelete` is separate and regressed in #100757

Looks like we changed the boundary here which seems like it causes needless breakage for users - not convinced we should do that.

_Originally posted by @compiler-errors in https://github.com/rust-lang/rust/issues/103243#issuecomment-1284406703_
Repository: go
Issue: encoding/xml: EncodeToken doesn't indent Comment
Labels: NeedsInvestigation

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
1.19.2
</pre>

### Does this issue reproduce with the latest release?
Yes


### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code> Output</summary><br><pre>
$ go env
GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/***/Library/Caches/go-build"
GOENV="/Users/***/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/***/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/***/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.19.2"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/***/workspace/go/src/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/4d/n7jcw1x95zxc_cchskx53f4c0000gn/T/go-build2258919332=/tmp/go-build -gno-record-gcc-switches -fno-common"
</pre></details>

### What did you do?

<!--
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on go.dev/play is best.
-->

```
package main

import (
	"bytes"
	"encoding/xml"
	"fmt"
	"io"
)

func main() {
	input := `<book> <author>Fred</author><!-- <price>20</price><currency>USD</currency> --><isbn>23456</isbn> </book>`
	decoder := xml.NewDecoder(bytes.NewReader([]byte(input)))
	buf := new(bytes.Buffer)
	encoder := xml.NewEncoder(buf)
	encoder.Indent("", " ")

tokenize:
	for {
		token, err := decoder.Token()

		switch {
		case err == io.EOF:
			encoder.Flush()
			break tokenize
		case err != nil:
			fmt.Printf("failed to tokenize xml, error: %s", err)
		default:
			err := encoder.EncodeToken(token)
			if err != nil {
				fmt.Printf("failed to encode xml, error: %s\n", err)
			}

		}
	}

	fmt.Println(buf.String())
}
```

### What did you expect to see?

Comment is put as a new line.
```
<book> 
 <author>Fred</author>
 <!-- <price>20</price><currency>USD</currency> -->
 <isbn>23456</isbn> 
</book>
```

### What did you see instead?

Comment is put at the same line as previous element.
```
<book> 
 <author>Fred</author><!-- <price>20</price><currency>USD</currency> -->
 <isbn>23456</isbn> 
</book>
```

### What to change?

I think we can add `p.writeIndent(1)` and `p.writeIndent(-1)` before and after writing the comment element, https://github.com/golang/go/blob/go1.19.2/src/encoding/xml/marshal.go#L220.
Repository: flutter
Issue: The use of properties and dimensions should be simplified.
Labels: team-infra,P2,triaged-infra

Properties and dimensions are currently defined in 4 different places:

* .ci.yaml file
* infra configurations
* cocoon backend
* Recipes

Apart from the technical debt this creates all sort of errors when properties are not propagated correctly or when we implement the translation of properties to dimensions or viceversa.

To fix this problem we need to define properties and dimensions in .ci.yaml and pass them verbatim to all the other different places.
Repository: PowerToys
Issue: Always On Top Window Border Looks Weird When Adapting The Window Size Using On Top Windows 22H2 Presets
Labels: Issue-Bug,Product-Always On Top,Needs-Triage,Needs-Team-Response

### Microsoft PowerToys version

0.63.0

### Installation method

Windows Store

### Running as admin

- [X] Yes

### Area(s) with issue?

Always on Top

### Steps to reproduce

![image](https://user-images.githubusercontent.com/82771944/196840576-55c1b968-8aa1-49dc-8cc5-af912d1aae20.png)


### ✔️ Expected Behavior

Adaptative window border

### ❌ Actual Behavior

![image](https://user-images.githubusercontent.com/82771944/196840542-c4e50e2a-4145-46d5-b3f4-672544c17074.png)


### Other Software

_No response_