sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: rust
Issue: Implement `Default` for singleton function item types
Labels: A-trait-system,T-lang,C-feature-request

## Context

I have recently found myself doing some work that involves storing function-like items in structs along with other data, which involves a field of some generic type `F` that is going to implement some `Fn` trait. Such a struct might look something like this:
```rust
struct DeferredMappedData<S, T, F> {
    data: S,
    function: F,
    _phantom: PhantomData<T>,
}
```
with the idea that `F: Fn(S) -> T` or similar. Thus, such a type would typically support things like
```rust
fn eval(&self) -> T { //... }
fn new(data: S, function: impl Fn(S) -> T) -> Self { //... }
```
and so on.

## The problem

An issue that I've run into is that `F` is very often the type of a function item, in which case one would hope that the actual value of the function could be inferred from the type parameter and nothing else, which is essentially the same thing as implementing `Default`. This would allow me, for example, to write code like this:
```rust
impl<S, T, F: Default> DeferredMappedData<S, T, F> {
    fn from_data(data: S) -> Self {
        Self {
            data,
            function: Default::default(),
            _phantom: PhantomData,
        }
    }
}
```

However, that is not the case, and code like this is, at the moment, effectively worthless, since function item types are not `Default`.

Of course, this shortfall doesn't always arise so explicitly; for instance, the `Default` bound could be introduced by a `#[derive]` macro or similar. In my particular case, this actually has to do with building values through reflection (and hence possibly during things like deserialization).

## Workarounds

As far as I'm aware, the only real way to work around this is to manually monomorphize away `F` yourself (and hence bake the explicit function into the implementations of the methods). If you only care about some small number of values of `F`, maybe that's acceptable (e.g. using macros), but in any kind of general interface, there is effectively no workaround for this at all, to my knowledge.

## Aside

Being able to actually *name* these function types would also be valuable — even with the `Default` implementation, you still can't name the type of the monomorphized struct, for instance. My understanding is that there are efforts towards that kind of thing, like being able to alias the names of automatically inferred types, but I'm not really in the loop there. Again, I'm certainly not a compiler person or anything, but I think that, independently, being able to explicitly name the singleton types of function items would also be nice. (Basically, I don't see why the compiler should necessarily have to infer this for me at all times.)

<!-- TRIAGEBOT_START -->

<!-- TRIAGEBOT_ASSIGN_START -->

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

<!-- TRIAGEBOT_ASSIGN_END -->
<!-- TRIAGEBOT_END -->
Repository: go
Issue: x/build/cmd/golangbuild: How to set the timeout for LUCI builder “fetch preobuild go”
Labels: Builders,NeedsInvestigation

Hi, 
The network bandwidth of the Loong64 builder is small, so fetch prebuilt go timeout errors often occur during the build testing process.  How can I avoid it?

Thanks.


![2024-09-26_23-19](https://github.com/user-attachments/assets/7d7bdb31-e713-4e97-aa72-7b7b53c1c5d3)
Repository: godot
Issue: iOS 18 TouchScreenButton not working.
Labels: bug,platform:ios,needs testing,topic:input,topic:2d

### Tested versions

Godot v4.2.stable.official [46dc27791]

### System information

iPhone 16 pro (iOS 18), iPad Air (5th Gen) (iOS 18)

### Issue description

I'm using a TouchScreenButton to make a phone game and the click isn't being registered on my iOS 18 devices. I have older phones running older iOS versions that work fine. When I build for my iOS 18 devices (iPad and iPhone 16) the TouchScreenButton "Pressed" signal is not being registered / the callback is not being called.

### Steps to reproduce

1) Create a TouchScreenButton with "Pressed" signal. 
2) Add callback for Pressed signal to log something
3) Deploy to iOS 18 device
4) no button press registered

### Minimal reproduction project (MRP)

N/A
Repository: godot
Issue: Pixel font renders impossibly small size on tooltips
Labels: bug,topic:gui

### Tested versions

4.3 stable

### System information

Linux with X11

### Issue description

When using a pixel font like Terminus, and picking the smallest possible size as Main Font in the settings, some GUI elements still try to render in a smaller font size leading to unreadable text.

![godot_small_pixel_font](https://github.com/user-attachments/assets/3349c21f-e9af-4493-87c0-de56c2ccb417)

(make sure to view the image above at a pixel perfect zoom)


### Steps to reproduce

* use [terminus ttf](https://files.ax86.net/terminus-ttf/) as Main Font and set size to `12`
* check a signal tooltip with args that tries to render at size 10 or something

### Minimal reproduction project (MRP)

no project necessary
Repository: ui
Issue: [bug]: Copy button does not open package manager choice
Labels: bug

### Describe the bug

All "copy this command" sections throughout the docs have a menu that prompts you if you would like to copy this command with npm, yarn, pnpm, or bun. But I found one place in the "getting started with Vite" docs where it does not. At step `5` in the guide where it tells you to copy-paste the dev dependency for `@types/node`, it does not ask for a package manager but just copy-pastes the npm version. 

Link to page: [https://ui.shadcn.com/docs/installation/vite](https://ui.shadcn.com/docs/installation/vite)

### Affected component/components

No compoent

### How to reproduce

1. Go to [https://ui.shadcn.com/docs/installation/vite](https://ui.shadcn.com/docs/installation/vite)
2. Go to step 5
3. Click the copy button for the `npm i -D @types/node` command

### Codesandbox/StackBlitz link

_No response_

### Logs

_No response_

### System Info

```bash
Google chrome on a mac
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: vscode
Issue: [VSCode Extension API] Allow extensions to define custom disabled messages when a command is disabled
Labels: feature-request,menus

<!-- ⚠️⚠️ 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. -->
When a command is disabled through the `enablement` property, the editor and explorer menus simply render a disabled button that shows the `command.title` as a tooltip.
It would be great to have the ability to customize the tooltip for the disabled button to show a custom error message instead.

An example of what the API could like:
```json
{
  "contributes": {
    "commands": [
      {
        "command": "extension.sayHello",
        "title": "Hello World",
        "enablement": "editorLangId == markdown && !isLinux",
        "error": {
          "editorLandId != markdown": "This command is only available in markdown files",
          "isLinux": "This command is only available on Linux"
        }
      }
    ]
  }
}
```

Another way to do it would be to allow developers to control the tooltip through a custom context variable
 ```json
{
  "contributes": {
    "commands": [
      {
        "command": "extension.sayHello",
        "title": "Hello World",
        "enablement": "editorLangId == markdown && !isLinux",
        "tooltip": "extension.sayHello.tooltip"
      }
    ]
  }
}
```
Repository: ui
Issue: [feat]: Add tailwind content step for vite guide
Labels: area: request

### Feature description

In the guide for setting up shadcnui with vite, [https://ui.shadcn.com/docs/installation/vite](https://ui.shadcn.com/docs/installation/vite), I suggest we add a new section between current 2 and 3 that tells the user to change their `content` field in `tailwind.config.js` to include `content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}']`.

![Screenshot 2024-09-26 at 18 29 02](https://github.com/user-attachments/assets/a021030f-c168-4bb0-921e-ef3af890e9fe)

This is a step that is needed to get it to work. I followed the steps that there currently in the docs and it did not work as I got the following issue: 

```
No Tailwind CSS configuration found at /Users/me/Desktop/project
It is likely you do not have Tailwind CSS installed or have an invalid configuration.
Install Tailwind CSS then try again.
Visit https://tailwindcss.com/docs/guides/vite to get started.
```

So its a necessary step to get it to work now, after I changed the `content` field it started working. It's also what Tailwind has right after installing the package so makes sense to include tbh

![Screenshot 2024-09-26 at 18 31 58](https://github.com/user-attachments/assets/ac95d77e-8299-4e94-82dc-883c68947848)



### Affected component/components

_No response_

### Additional Context

I could make a quick simple PR for this to get it out 🙏 

### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues and PRs
Repository: go
Issue: crypto: support ACVP testing
Labels: Testing,NeedsInvestigation,FeatureRequest

### Proposal Details

_Note: not a formal proposal since this is internal work without new exposed APIs or observable behaviour. It's primarily surfacing FIPS work for tracking purposes._

## Background

Go's FIPS 140-3 validation (#69536) will require that we demonstrate that we are only using approved cryptographic algorithms. Doing so is a pre-requisite for [cryptographic _module_ verification (CMVP)][cmvp].

The NIST [Cryptographic Algorithm Validation Program (CAVP)][cavp] allows for certification of algorithm implementations via the [Automated Cryptographic Validation Test Program (ACVT)][acvt] using the [Automated Cryptographic Validation Protocol (ACVP)][acvp]. The [protocol specification][acvp-proto] is available online in an IETF RFC-like format.

[cmvp]: https://csrc.nist.gov/Projects/cryptographic-module-validation-program
[cavp]: https://csrc.nist.gov/projects/cryptographic-algorithm-validation-program
[acvt]: https://www.nccoe.nist.gov/automation-nist-cryptographic-module-validation-program
[acvp]: https://github.com/usnistgov/ACVP
[acvp-proto]: https://pages.nist.gov/ACVP/draft-fussell-acvp-spec.html

## BoringSSL acvptool

Thankfully, the BoringSSL project has [already implemented][acvp-tool] and [documented][bssl-acvp] a pure-Go client that can both interact with the demo NIST server, and operate in an offline mode suitable for CI. It "lowers" the more complex NIST protocol into a simple request/response protocol used over stdin/stdout to speak to a forked module wrapper processes. `@agl`briefly discusses its origin [in a blog post][agl-acvp].

[acvp-tool]: https://boringssl.googlesource.com/boringssl/+/master/util/fipstools/acvp/acvptool/
[bssl-acvp]: https://boringssl.googlesource.com/boringssl/+/refs/heads/master/util/fipstools/acvp/ACVP.md
[agl-acvp]: https://www.imperialviolet.org/2020/12/23/acvp.html

## Requirements

To meet the testing requirements Go should offer an `acvptool` compatible module wrapper for the Go FIPS module.

It should be implemented so that it's possible to build and test from different operating environments (OEs) and with/without processor algorithm accelerators (PAA) features.

It should be integrated into CI so that there is continual assurance that our algorithms will pass when performing live ACVP testing with the NIST test, or production servers.

Since the [license in BoringSSL for new code][bssl-license] (such as the acvp tooling) is compatible with the [Go repository
license][go-license], I believe we have flexibility in terms of whether we vendor the tooling and test data or use both as-is from the BoringSSL repo. The existing Go code in that repo has no external dependencies that would pose a challenge for integration here.

[bssl-license]: https://github.com/google/boringssl/blob/dec0800988062ab0b1d5ea5f3c9575f3392bcd37/LICENSE#L144C1-L158
[go-license]: https://go.dev/LICENSE
Repository: godot
Issue: When building projects, Godot doesnt consistently use the same dotnet executable from c++ and the c#, specifically on mac
Labels: discussion,topic:dotnet

### Tested versions

Looks to be reproducible back to 4.0 based on the commits. I repro'ed it in 4.3

### System information

Godot v4.3.stable.mono - macOS 14.5.0 - Vulkan (Mobile) - integrated Apple M2 Max - Apple M2 Max (12 Threads)

### Issue description

Dotnet isn't generally required to be in a specific location, it has various mechanism to allow other projects/executables to find it, through environment variables, text file redirects and other methods. See https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-environment-variables#dotnet_root-dotnet_rootx86-dotnet_root_x86-dotnet_root_x64

But Godot has 2 different methods of looking up the dotnet executable, in c# and from the c++ and they don't match.

C# is only looking for the executable in 2 locations:
["/usr/local/share/dotnet/dotnet";](https://github.com/godotengine/godot/blob/master/modules/mono/editor/GodotTools/GodotTools/Build/DotNetFinder.cs#L29)
and
["/usr/local/share/dotnet/x64/dotnet"](https://github.com/godotengine/godot/blob/master/modules/mono/editor/GodotTools/GodotTools/Build/DotNetFinder.cs#L23)

The c++ is correctly using the common c# environment variables to find the right version, first checking environment variables like DOTNET_ROOT_ARM64 and then DOTNET_ROOT (it could maybe be slightly better by searching the path):
https://github.com/godotengine/godot/blob/master/modules/mono/editor/hostfxr_resolver.cpp#L335

In my tests, I was hoping that [DOTNET_HOST_PATH](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-environment-variables#dotnet_host_path) would have been set by the pipeline out of the box, but its not at that code location in DotNetFinder.cs.

I think the solution would end up looking maybe like this (but maybe there is a real library function we could be calling):
https://github.com/dotnet/roslyn/blob/main/src/Compilers/Shared/RuntimeHostInfo.cs#L59

### Steps to reproduce

On mac, install dotnet or the sdks into a non-standard location (like say maybe you might do on a build machine).

Then set DOTNET_ROOT to point at that location as the dotnet documentation suggests: https://learn.microsoft.com/en-us/dotnet/core/install/macos#set-environment-variables-system-wide

Then build for Android and the c# will not be able to find the right dotnet executable.

### Minimal reproduction project (MRP)

Since the bug comes from the dotnet installation location variations, not the project, any project will show the problem.
Repository: vscode
Issue: Enterprise Support
Labels: install-update,config,under-discussion

# Support for policies would be greatly appreciated. 

You see the other week I managed to meet some of the Intune PG members and they were super nice and showed me how can one import the `vscode.admx` file into Intune.

But we were all surprised to see that there is only a single policy setting available as of today.

```XML
<?xml version="1.0" encoding="utf-8"?>
<policyDefinitions revision="1.1" schemaVersion="1.0">
	<policyNamespaces>
		<target prefix="VSCode" namespace="Microsoft.Policies.VSCode" />
	</policyNamespaces>
	<resources minRequiredRevision="1.0" />
	<supportedOn>
		<definitions>
			<definition name="Supported_1_67" displayName="$(string.Supported_1_67)" />
		</definitions>
	</supportedOn>
	<categories>
		<category displayName="$(string.Application)" name="Application" />
		<category displayName="$(string.Category_updateConfigurationTitle)" name="updateConfigurationTitle"><parentCategory ref="Application" /></category>
	</categories>
	<policies>
		<policy name="UpdateMode" class="Both" displayName="$(string.UpdateMode)" explainText="$(string.UpdateMode_updateMode)" key="Software\Policies\Microsoft\VSCode" presentation="$(presentation.UpdateMode)">
			<parentCategory ref="updateConfigurationTitle" />
			<supportedOn ref="Supported_1_67" />
			<elements>
		<enum id="UpdateMode" valueName="UpdateMode">
			<item displayName="$(string.UpdateMode_none)"><value><string>none</string></value></item>
			<item displayName="$(string.UpdateMode_manual)"><value><string>manual</string></value></item>
			<item displayName="$(string.UpdateMode_start)"><value><string>start</string></value></item>
			<item displayName="$(string.UpdateMode_default)"><value><string>default</string></value></item>
		</enum>
			</elements>
		</policy>
	</policies>
</policyDefinitions>
```

# The following additional policies would be a great start

1. Disable access to Extension Marketplace
2. Allow list for extensions
3. Block list for extensions
4. Mandatory extensions list
5. Extension update control
6. Alternative location for Extension Marketplace
7. Disable settings synchronization

> I believe you'll find most of these already exist as issues

Thank you so much!
Repository: rust
Issue: Unable to match non_exhaustive enum tuple variants with rest pattern
Labels: A-diagnostics,T-lang,T-compiler,C-bug,D-confusing

Tuple enum variants `Tuple(i32)` from external crates marked with `#[non_exhaustive]` should be able to be matched by the RestPattern `Tuple(val, ..)`. But it fails to compile.

I tried this code:

```rust
// In an external lib crate
#[non_exhaustive]
pub enum ExtNonExhaustiveVariant {
    ExhaustiveUnit,
    #[non_exhaustive]
    Unit,
    #[non_exhaustive]
    Tuple(i32),
    #[non_exhaustive]
    StructNoField {},
    #[non_exhaustive]
    Struct {
        field: i32,
    },
}

// In the bin crate
fn main() {
    match ExtNonExhaustiveVariant::ExhaustiveUnit {
        ExtNonExhaustiveVariant::ExhaustiveUnit => 0, // OK
        ExtNonExhaustiveVariant::Unit { .. } => 0, // OK
        ExtNonExhaustiveVariant::Tuple(val, ..) => val, // FAIL
        ExtNonExhaustiveVariant::StructNoField { .. } => 0, // OK
        ExtNonExhaustiveVariant::Struct { field, .. } => field, // OK
        _ => 0,
    };
}
```

I expected to see this happen: No compile error.

Instead, this happened:

```
error[E0603]: tuple variant `Tuple` is private
  --> src/main.rs:9:34
   |
9  |         ExtNonExhaustiveVariant::Tuple(val, ..) => val,
   |                                  ^^^^^ private tuple variant
   |
note: the tuple variant `Tuple` is defined here
  --> /repro/lib/src/lib.rs:14:5
   |
13 |     #[non_exhaustive]
   |     ----------------- cannot be constructed because it is `#[non_exhaustive]`
14 |     Tuple(i32),
   |     ^^^^^

For more information about this error, try `rustc --explain E0603`.
error: could not compile `bin` (bin "bin") due to 1 previous error
```

### Meta
<!--
If you're using the stable version of the compiler, you should also check if the
bug also exists in the beta or nightly versions.
-->

`rustc --version --verbose`:
```
rustc 1.81.0 (eeb90cda1 2024-09-04)
binary: rustc
commit-hash: eeb90cda1969383f56a2637cbd3037bdf598841c
commit-date: 2024-09-04
host: x86_64-unknown-linux-gnu
release: 1.81.0
LLVM version: 18.1.7
```
Repository: godot
Issue: .APK is unable to read the .OBB file
Labels: bug,platform:android,topic:export

### Tested versions

4.4dev and 4.3.1 
(Both the editor and the templates are built from source)

### System information

Editor: Godot v4.4.dev unknown - Windows 10.0.22631 - Forward Mobile
Device: Redmi Note 8 Pro, Android 11
### Issue description

Using the APK Expansion while exporting to android exports an OBB and an APK file, however after installing the apk and putting the obb file with name `main.[code].com.[companyname].[packagename].obb` to the folder `com.[companyname].[packagename]` under Android/Obb , the app will give the error `Couldn't load project data at path".". Is the .pck file missing?`. I assume that the application is somehow unable to see the obb file. The exact same project with the exact same settings except the APK Expansion being disabled runs perfectly

### Steps to reproduce

- Export an android project with APK expansion
- On a mobile device, download the APK and place the OBB file at the correct path
- Run the application

### Minimal reproduction project (MRP)

N/A
Repository: ollama
Issue: Request to Add Support for Helsinki-NLP Models
Labels: model request

I would like to request adding support for the Helsinki-NLP models, specifically the ones available in this dataset: [Helsinki-NLP/opus-100](https://huggingface.co/datasets/Helsinki-NLP/opus-100/tree/main).

Although the current version of the software supports only GGUF files, I believe that making an exception for these models, which come in BIN format, would be beneficial. The Helsinki-NLP models are known for their high-quality translations, and they are very lightweight. This makes them an excellent choice, especially for users with low-end machines that might struggle with heavier models.

Supporting these models could significantly expand the translation capabilities while maintaining good performance, even on less powerful hardware.
Repository: ui
Issue: [feat]: Transfer Component
Labels: area: request

### Feature description

I would like to request the addition of a Transfer Component to Shadcn UI. This component is commonly found in UI libraries like MUI and Ant Design, allowing users to transfer items between two lists (left panel to right panel, and vice versa). This feature is especially useful in applications that require multi-select item management in an intuitive and efficient way.

The Transfer Component typically includes the following features:

Dual list panels (source and target)
Ability to move items between lists
Filtering and searching within the lists
Support for selecting all or individual items
Customizable list titles and actions
Adding a Transfer Component to Shadcn UI would enhance its usability for developers building complex UIs, as it simplifies item management across categories or states.



### Affected component/components

This would be a new component. However, it could interact with existing components like Checkbox, Button, and possibly List.

### Additional Context

For reference, here are similar implementations in other UI libraries:

[MUI Transfer Component](https://mui.com/material-ui/react-transfer-list/)
[Ant Design Transfer Component](https://ant.design/components/transfer)
The Transfer Component is useful for various scenarios, such as user role management, assignment of items, or categorization workflows.

Thank you for considering this feature request!

### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues and PRs