sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: node
Issue: [http]: Missing Content-Length Header when Responding to HEAD Requests
Labels: http

### Version

v23.5.0

### Platform

```text
Darwin MacbookPro-2.local 24.0.0 Darwin Kernel Version 24.0.0: Tue Sep 24 23:39:07 PDT 2024; root:xnu-11215.1.12~1/RELEASE_ARM64_T6000 arm64 arm Darwin
```

### Subsystem

http

### What steps will reproduce the bug?

Just start the server and `curl` the results:

```js
import { createServer } from 'node:http';
const hostname = '127.0.0.1';
const port = 3000;
const server = createServer((req, res) => {
  res.statusCode = 200;
  res.setHeader('Content-Type', 'text/plain');
  res.end('Hello World');
});
server.listen(port, hostname, () => {
  console.log(`Server running at http://${hostname}:${port}/`);
});
```

`curl -v http://127.0.0.1:3000/` to get the response header through `GET`;
`curl -I http://127.0.0.1:3000/` to get the response header through `HEAD`.

### How often does it reproduce? Is there a required condition?

Always. No required condition.

### What is the expected behavior? Why is that the expected behavior?

According to [MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/HEAD):

> The HEAD HTTP method requests the metadata of a resource in the form of [headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers) that the server would have sent if the [GET](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/GET) method was used instead. This method can be used in cases where a URL might produce a large download, for example, a HEAD request can read the [Content-Length](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Length) header to check the file size before downloading the file with a GET.

`HEAD` requests are a bit different than other request methods without body because it is essentially `GET`s with body removed. It should be allowed to return all the headers that a `GET` request returns.

### What do you see instead?

However, in the current http library, *all* responses without body will not return the `Content-Length` header:
https://github.com/nodejs/node/blob/7bc2946293757389468f1fa09714860f8e1147b7/lib/_http_outgoing.js#L550

Curl results:
- `-I` (`HEAD` Requests)

  ```
  ~> curl -I http://127.0.0.1:3000/
  HTTP/1.1 200 OK
  Content-Type: text/plain
  Date: [redacted]
  ```

- `-v` (`GET` Requests)
  ```
  ~> curl -v http://127.0.0.1:3000/
  *   Trying 127.0.0.1:3000...
  * Connected to 127.0.0.1 (127.0.0.1) port 3000
  > GET / HTTP/1.1
  > Host: 127.0.0.1:3000
  > User-Agent: curl/8.7.1
  > Accept: */*
  >
  * Request completely sent off
  < HTTP/1.1 200 OK
  < Content-Type: text/plain
  < Date: [redacted]
  < Content-Length: 11
  <
  * Connection #0 to host 127.0.0.1 left intact
  Hello World
  ```

### Additional information

_No response_
Repository: angular
Issue: Re-land disabling component styles instead of removing them
Labels: area: core,core: stylesheets

### Which @angular/* package(s) are relevant/related to the feature request?

platform-browser

### Description

We were wondering if it was possible to re-land [this styles performance patch](https://github.com/angular/angular/commit/1640743b18e0b6a0e501855d5bc21414b2613319) in Angular to disable component styles, instead of removing them from the DOM when all component instances are destroyed

From what we can tell, the referenced performance regression was due to an issue with Chrome that has since been fixed (https://issues.chromium.org/issues/40911913)

If that isn't the case and some context can be provided as to why that perf fix was reverted, we would love to help to re-land it

### Proposed solution

Get https://github.com/angular/angular/commit/1640743b18e0b6a0e501855d5bc21414b2613319 up to date and re-land it into Angular

### Alternatives considered

We have currently been patching that fix into our own version of Angular as it made a significant impact on our performance metrics, but it's becoming a maintenance burden to keep it up to date when we upgrade between Angular versions
Repository: PowerToys
Issue: Support for Vietnamese
Labels: Needs-Triage

### Description of the new feature / enhancement

To support those who are not good at English or cannot really understand the features in Vietnam, Powertoys should add a new language, Vietnamese.

### Scenario when this would be used?

For Vietnamese people who need to use Powertoys in their mother tongue (Vietnamese)

### Supporting information

If accepted, I can be a Vietnamese translator.
Repository: TypeScript
Issue: Allow disable bad refactor suggestions
Labels: Suggestion,Awaiting More Feedback

<!-- ⚠️⚠️ Do Not Delete This! feature_request_template ⚠️⚠️ -->
<!-- Please read our Rules of Conduct: https://opensource.microsoft.com/codeofconduct/ -->
<!-- Please search existing issues to avoid creating duplicates. -->

<!-- Describe the feature you'd like. -->

IDK what this is called but the ellipsis that sometimes appear below starts of words:

![Image](https://github.com/user-attachments/assets/101223e8-6ac2-4b09-b06d-9ea17951e42d)

After much research I could find no way to disable it per line, useful for cases like this where it's not even a constructor function
Repository: langchain
Issue: TracedAsyncStream.__getattr__' was never awaited
Labels: 🤖:bug,investigate

### Checked other resources

- [x] I added a very descriptive title to this issue.
- [x] I searched the LangChain documentation with the integrated search.
- [x] I used the GitHub search to find a similar question and didn't find it.
- [x] I am sure that this is a bug in LangChain rather than my code.
- [x] The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).

### Example Code

venv/lib/python3.11/site-packages/langchain_openai/chat_models/base.py:917

### Error Message and Stack Trace (if applicable)

venv/lib/python3.11/site-packages/langchain_openai/chat_models/base.py:917: RuntimeWarning: coroutine 'async_chat_completions.<locals>.TracedAsyncStream.__getattr__' was never awaited
  if hasattr(response, "get_final_completion") and "response_format" in payload:
RuntimeWarning: Enable tracemalloc to get the object allocation traceback


### Description

Gemini is working without this warning.

langchain_openai/chat_models/base.py:917: RuntimeWarning: coroutine 'async_chat_completions.<locals>.TracedAsyncStream.__getattr__' was never awaited

### System Info

System Information
------------------
> OS:  Linux
> OS Version:  #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov  6 17:42:15 UTC 2
> Python Version:  3.11.0rc1 (main, Aug 12 2022, 10:02:14) [GCC 11.2.0]

Package Information
-------------------
> langchain_core: 0.3.31
> langchain: 0.3.15
> langchain_community: 0.3.14
> langsmith: 0.1.125
> langchain_anthropic: 0.3.1
> langchain_google_genai: 2.0.8
> langchain_google_vertexai: 2.0.8
> langchain_openai: 0.3.1
> langchain_qdrant: 0.2.0
> langchain_text_splitters: 0.3.5
> langserve: 0.3.1

Other Dependencies
------------------
> aiohttp: 3.9.1
> anthropic: 0.42.0
> anthropic[vertexai]: Installed. No version info available.
> async-timeout: 4.0.3
> dataclasses-json: 0.6.3
> defusedxml: 0.7.1
> fastapi: 0.104.1
> fastembed: Installed. No version info available.
> filetype: 1.2.0
> google-cloud-aiplatform: 1.73.0
> google-cloud-storage: 2.18.2
> google-generativeai: 0.8.3
> httpx: 0.27.2
> httpx-sse: 0.4.0
> jsonpatch: 1.33
> langchain-mistralai: Installed. No version info available.
> numpy: 1.26.2
> openai: 1.59.9
> orjson: 3.9.15
> packaging: 24.2
> pydantic: 2.9.2
> pydantic-settings: 2.5.2
> PyYAML: 6.0.1
> qdrant-client: 1.12.2
> requests: 2.32.3
> SQLAlchemy: 2.0.23
> sse-starlette: 1.8.2
> tenacity: 8.2.3
> tiktoken: 0.7.0
> typing-extensions: 4.12.2
Repository: flutter
Issue: [Proposal] Adjust the width of the 'DropdownMenu' based on the selected value.
Labels: c: new feature,framework,f: material design,c: proposal,team-framework

### Use case

Currently, the size is equal to the largest value.
I want to adjust the width of the 'DropdownMenu' to the current value.

### Proposal

<img width="383" alt="Image" src="https://github.com/user-attachments/assets/8c7ffb1b-effe-41f8-96ba-34a1bbc97724" />
Repository: godot
Issue: Godot 4.4 Beta 1 Takes Long Time To Open/Load Massive Scripts as opposed to Godot 3.6
Labels: discussion,topic:editor,performance

### Tested versions

Reproducible in v4.4.beta1.official,
Not reproducible in v3.6 (notably, #74733 seems relevant)


### System information

Godot v4.4.beta1 - Windows 10 - OpenGL 3 (Compatibility)

### Issue description

I am currently working with massive scripts (100k+ lines).
For massive scripts, typing and saving works fine in 3.6 and 4.x. However...

In Godot 3, I can load the script in 1-3 seconds.
In Godot 4.4 beta 1, it takes 4x the time to load the scripts (anywhere from 8-15 seconds)
In other Godot 4 builds (4.0, 4.1, 4.2, and 4.3), this problem is worse (it can be 10 - 30 seconds).

https://github.com/user-attachments/assets/db36d8f7-115f-4893-bd76-7a7532229bcf


https://github.com/user-attachments/assets/55226c70-75b3-4311-9b4b-78e7d54052ff



Normally, you shouldn't be using scripts this long. However, Godot 3.6 is able to load massive scripts very fast, whereas Godot 4.4 beta 1 is not able to, so this is where my concern is.

#74733 seems particularly relevant; was there ever a 4.x counterpart? (it seems to deal more with actual typing than loading, but maybe relevant?)

### Steps to reproduce

1. Create a script with 100k lines. Fill it with "########################################################################", or any other text...
2. Load the script in Godot 3.6 (double click the script, open in the in game text editor)
3. Load the script in Godot 4.4 beta 1
4. Compare the loading times...
5. For an even worse example, use any Godot 4 build PRIOR to 4.4 (4.0, 4.1, 4.2, 4.2), and you will see that the script loading is MUCH MUCH slower.

### Minimal reproduction project (MRP)

[Godot36ScriptLoad.zip](https://github.com/user-attachments/files/18494011/Godot36ScriptLoad.zip)
[godot43beta1scriptload.zip](https://github.com/user-attachments/files/18494010/godot43beta1scriptload.zip)
Repository: vscode
Issue: log out automatically after 8 hours
Labels: info-needed


Type: <b>Feature Request</b>

have to re-log in every 8 hours

VS Code version: SageMaker Code Editor 1.90.1 (Commit unknown, 2025-01-06T17:50:00.381Z)
OS version:   
Modes:


<!-- generated by issue reporter -->
Repository: kubernetes
Issue: NodeResourcesBalancedAllocation does not "Favors nodes that would obtain a more balanced resource usage if the Pod is scheduled there"
Labels: sig/scheduling,kind/feature,needs-triage

### What would you like to be added?

The [doc](https://kubernetes.io/docs/reference/scheduling/config/#scheduling-plugins) says:

> `NodeResourcesBalancedAllocation`: Favors nodes that would obtain a more balanced resource usage if the Pod is scheduled there.

But reading at the code it:

> Favors nodes that would obtain the most balanced resource usage once the Pod is scheduled there.

It would be good to have a plugin that scores according to how the balancing improves.

i.e.

instead of calculating score like this:

```math
S_1 = 100 - 100 * abs \left( \frac{\text{node memory requests} + \text{pod memory request}}{\text{node memory allocatable}} - \frac{\text{node cpu requests} + \text{pod cpu request}}{node cpu allocatable} \right) / 2
```

calculate the ratio improvement, by first calculating ratio before the pod is scheduled:

```math

S_2 = 100 - 100 * abs \left( \frac{\text{node memory requests}}{\text{node memory allocatable}} - \frac{\text{node cpu requests}}{node cpu allocatable} \right) / 2
```
And measuring the improvement

```math
S = max (0, S_1 - S_2)
```

Note: the formula here is incorrect and can be reduced, but you have the idea.

Bonus: Here is a prometheus query to calculate the score (NB: you need to add requested resources to have the exact value):

```
100
-
100
*
abs(
    (
        (
            sum(cluster:namespace:pod_memory:active:kube_pod_container_resource_requests)
            by (node)
            /
            sum(kube_node_status_allocatable{resource="memory"}) by (node)
        )

        -
        (
            sum(cluster:namespace:pod_cpu:active:kube_pod_container_resource_requests)
            by (node)
            /
            sum(kube_node_status_allocatable{resource="cpu"}) by (node)
        )
    )
    /
    2
)
```

### Why is this needed?

When scheduling a pod that is well balanced, the already well balanced nodes are favoured.
Repository: godot
Issue: [3.x] Buttons not respecting order
Labels: bug,topic:input,topic:gui

### Tested versions

Reproducible in v3.6

### System information

Godot v3.6 - Windows 10 - OpenGL 3 (Compatibility)

### Issue description

This is the order of the tree

![Image](https://github.com/user-attachments/assets/6085b359-6326-4491-b1c9-66312a68ebf2)

You would expect that the button in front of the viewport would take priority over the button inside the viewport. However, as you can see,
this is not the behavior

https://github.com/user-attachments/assets/23443eaf-37e4-4e37-a215-5c4ee2c772b8

There have been claims that this was fixed, and this is true for 4.x
#39666
#58334
#79235
#81184

However, in Godot 3, this still persists.



### Steps to reproduce

Create viewport container with a viewport and put a button inside of it
Put a button outside of this structure
Run the scene
Hover the mouse over the buttons, and you will see the behavior is not as expected.

### Minimal reproduction project (MRP)

[Godot36ScriptLoad (2).zip](https://github.com/user-attachments/files/18494549/Godot36ScriptLoad.2.zip)
Repository: go
Issue: runtime: map[int64]struct{} requires 16 bytes per slot
Labels: Performance,NeedsDecision,compiler/runtime,BugReport

With swissmaps in 1.24, a `map[int64]struct{}` requires 16 bytes of space per slot, rather than the expected 8 bytes.

This is an unfortunate side effect of the way the storage is defined internally https://cs.opensource.google/go/go/+/master:src/cmd/compile/internal/reflectdata/map_swiss.go;l=30
```
	// type group struct {
	//     ctrl uint64
	//     slots [abi.SwissMapGroupSlots]struct {
	//         key  keyType
	//         elem elemType
	//     }
	// }
```
`elemType` is `struct{}`. The struct size rules in the compiler say that if struct ends in a zero-size type, that field is given 1 byte of space (in case someone creates a pointer to the last field, we don't want that to point past the end of allocation).
Then, `keyType` needs 8-byte alignment, so the last field actually ends up using a full 8-bytes.

This is the most extreme case of KVKVKVKV wasting space due to alignment requirements. We could probably fix this specific case by deconstructing the array+struct in this internal definition, then we'd only need the extra 8 bytes for the last slot.

Note that #70835 considers changing the layout entirely (putting all keys together), which would also fix this.
Repository: godot
Issue: Unable to 'Favorite' metadata properties in the inspector panel
Labels: enhancement,discussion,topic:editor,documentation

### Tested versions

Reproducible in 4.4.dev7

### System information

Godot v4.4.dev7 - Windows 10 (build 19045) - Multi-window, 2 monitors - Vulkan (Forward+) - dedicated AMD Radeon RX 5600 XT (Advanced Micro Devices, Inc.; 32.0.12033.1030) - AMD Ryzen 9 3900X 12-Core Processor (24 threads)

### Issue description

As the title states, it's currently impossible to pin the `script` property, or any `metadata` properties to the top of the inspector panel using the new *Favorite Property* option.


### Steps to reproduce

Right-click the `script` property, or any `metadata` property in the inspector panel, and select "Favorite Property".

### Minimal reproduction project (MRP)

n/a
Repository: opencv
Issue: Missing documentation for StereoBM parameters
Labels: category: documentation

### Describe the doc issue

The documentation for the [cv::StereoBM class](https://docs.opencv.org/4.x/d9/dba/classcv_1_1StereoBM.html) mentions several methods, including but not limited to [getROI1](https://docs.opencv.org/4.x/d9/dba/classcv_1_1StereoBM.html#a6b44df190e8f3ae0b06707e231dfe14f), [getROI2](https://docs.opencv.org/4.x/d9/dba/classcv_1_1StereoBM.html#ae7a58914c4448aa417b88415ab45b9a1), [getTextureThreshold](https://docs.opencv.org/4.x/d9/dba/classcv_1_1StereoBM.html#a1b6a29dd617f05fd30a0a67bac5e830b) , [setPreFilterSize](https://docs.opencv.org/4.x/d9/dba/classcv_1_1StereoBM.html#a6edbcfd1dd79c9ba0c76a206741b4719), which are not clear in their functionality and how the output disparity image is affected when they are tuned. This problem has been consistent since 3.x, and continues into the 4.12.0-dev and 5.0.0 branch documentation.


### Fix suggestion

If someone can explain what the parameters are and in what context they need to be tuned for, then I'm willing to open a PR to add the explanations to the documentation.
Repository: godot
Issue: Godot 4.4 beta 1 'sample_baked: Offset is non-finite' error when using width curve in line2d
Labels: bug,discussion,documentation,needs testing,regression,topic:2d

### Tested versions

- Reproducible in v4.4.beta1.official [d33da79d3]
- Not reproducible in v4.3.stable.official [77dcf97d8]

### System information

Godot v4.4.beta1 - macOS Sequoia (15.2.0) - Multi-window, 1 monitor - OpenGL 3 (Compatibility) - Apple M1 - Apple M1 (8 threads)

### Issue description

In 4.4 beta 1, when using a line2d with the following script attached...

```gdscript

extends Line2D

var queue : Array

func _physics_process(_delta: float) -> void:
	var pos = get_global_mouse_position()
	queue.push_front(pos)
	if queue.size() > 25:
		queue.pop_back()
	clear_points()
#
	for point in queue:
		add_point(point)

```

...and setting a weight curve, running the scene gives the following error

E 0:00:00:0377   sample_baked: Offset is non-finite
  <C++ Error>    Condition "!Math::is_finite(p_offset)" is true. Returning: 0
  <C++ Source>   scene/resources/curve.cpp:533 @ sample_baked()

There is no error in 4.3 stable

### Steps to reproduce

Add a line_2d, add the following script:

```gdscript

extends Line2D

var queue : Array

func _physics_process(_delta: float) -> void:
	var pos = get_global_mouse_position()
	queue.push_front(pos)
	if queue.size() > 25:
		queue.pop_back()
	clear_points()
#
	for point in queue:
		add_point(point)

```

Set a width curve in the line_2d

Run the scene

Or run the line_2d scene in the attached project

### Minimal reproduction project (MRP)

[test.zip](https://github.com/user-attachments/files/18494833/test.zip)
Repository: deno
Issue: `deno` does not handle missing `shasum` gracefully
Labels: node compat

<details><summary>Version: Deno 2.1.4</summary>
<p>

```bash
deno --version
deno 2.1.4 (stable, release, aarch64-apple-darwin)
v8 13.0.245.12-rusty
typescript 5.6.2
```
</p>
</details> 

I am having trouble using [buf.build](https://buf.build/gen/npm/v1/@buf%2fwcygan_flock.bufbuild_es) as a registry

Based on these blog posts, it should be possible:

1. https://deno.com/blog/deno-in-2024#built-in-performant-dependency-management
2. https://deno.com/blog/v2.0#private-npm-registries

## Steps to reproduce

Edit: I've created a minimal reproducible example that you can use for debugging & testing: https://github.com/wcygan/deno-npm-buf-test

Original response:

.npmrc:

```.npmrc
@buf:registry=https://buf.build/gen/npm/v1/
```

Do `deno install`:

```bash
deno install npm:@buf/wcygan_flock.bufbuild_es
error: npm:@buf/wcygan_flock.bufbuild_es was not found.
```

## Motivation

I would love to try out [deno](https://github.com/denoland/deno) and [fresh](https://github.com/denoland/fresh), but a key issue is preventing me from adopting them. I can't install my gRPC/ConnectRPC types from https://buf.build/wcygan/flock/sdks, which requires me to "Configure your package manager to add Buf as a registry"

I started a discussion on this https://github.com/denoland/deno/discussions/27749, but I think it may be a real issue, and unfortunately it makes Deno and Deno Fresh *dead on arrival* for me since I won't be able to communicate with my backend servers without these packages.

Maybe there is a workaround I am not aware of, or I am doing the installation incorrectly?

## How this works in npm

Using `npm`, this is quite easy, and the instructions are stated on https://buf.build/wcygan/flock/sdks

```bash
npm config set @buf:registry https://buf.build/gen/npm/v1/
npm install @buf/wcygan_flock.bufbuild_es@latest
```

<img width="800" alt="Image" src="https://github.com/user-attachments/assets/f48d4731-0e3b-4d96-a44d-0e7f23c5e99d" />

<img width="800" alt="Image" src="https://github.com/user-attachments/assets/e2837bf7-88bb-4daf-9abb-331ef22110a5" />
Repository: deno
Issue: Error caching npm package from gitlab private registry
Labels: needs investigation

Version: Deno 2.1.6

Seems to be related to #25924
But either was not entirely fixed by #26473 or has since regressed. But I believe it is the latter as  It also failed on 2.0.3

### .npmrc
```
@privateregistryname:registry=https://gitlab.company.engineering/api/v4/packages/npm/
//gitlab.company.engineering/api/v4/packages/npm/:_authToken=XXXXXXX
```

### deno.json
```json
{
  "imports": {
    "@privateregistryname/package-name": "npm:@privateregistryname/package-name@1.0.0"
  }
}
```

### Command
```bash
deno install
error: Failed caching npm package '@privateregistryname/package-name@1.0.0'

Caused by:
    Could not find npm package tarball at: 
https://gitlab.company.engineering/api/v4/projects/4055/packages/npm/@privateregistryname/package-name/-/@privateregistryname/package-name-1.0.0.tgz_
```
Repository: transformers
Issue: convert_llama_weight_to_hf.py
Labels: bug

### System Info

@AshishMulupuri
I am getting the same error as you stated here, can you guide me how to resolve this

### Who can help?

_No response_

### Information

- [x] The official example scripts
- [ ] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)

### Reproduction

.

### Expected behavior

.
Repository: flutter
Issue: Have a canonical `.ci.yaml` parser/library that lives in `flutter/flutter`
Labels: c: proposal,team-infra,P2,c: tech-debt,monorepo

The framework and engine sub-repos, and potentially more (i.e. if we use GitHub Actions) would like to be able to parse, validate, and understand the format of `.ci.yaml`. The canonical representation lives in `flutter/cocoon`, and is backed by a protocol buffer, but we would probably be well-served by just a manually authored Dart file.

I am not sure where this would live in order to be shared, i.e. a hypothetical `//infra` folder or such.
Repository: go
Issue: x/tools/gopls/internal/analysis/modernize: use strings.CutPrefix et al
Labels: gopls,Tools,Refactoring

Replace:
```go
if strings.HasPrefix(s, pre) { use(strings.TrimPrefix(s, pre)) }
-> 
if after, ok := strings.CutPrefix(s, pre); ok { use(after) } 
```
Variants:
- bytes package
- CutSuffix
- `if rest := strings.TrimPrefix(s, pre); rest != s { use(rest) }` ->  ...

cc: @josharian
Repository: terminal
Issue: Navigating to "Color Schemes" page moves focus to inside the page
Labels: Issue-Bug,Product-Terminal,Needs-Tag-Fix,Priority-3,Area-SettingsUI

As stated above. It's surprisingly the only page that does that!