sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Enable npm Build Provenance
Labels: Infrastructure

We would like to ensure that TypeScript can provide [provenance and publish attestation on npm](https://docs.npmjs.com/generating-provenance-statements). This may require some amount of reconfiguration with how TypeScript's builds are created.

@weswigham already has this working on #59013 for nightly builds, but not yet for major releases.
Repository: TypeScript
Issue: Support Expandable Quick Info/Hover Verbosity
Labels: Domain: Type Display,Domain: Quick Info

There is a lot of interest and discussion in #38040 and #56010 when it comes to showing/hiding details of a quick info request. In https://github.com/microsoft/vscode/issues/195394, we have a proposed client/editor API to serve up such an experience, and we'd like to provide it.

There are some questions that still need to be answered and prototyped. For example, *what* precisely should be expanded? In some cases, a type reference can be expanded into its structural form. In others, an elision (`...`) can possibly be shown. Whether this is always desirable is questionable.
Repository: rust
Issue: Feature request: Function to join thread with timeout 
Labels: C-enhancement,T-libs-api

A somewhat niche, but still occasionally useful feature is the ability to join a thread with a timeout, i.e. wait for a thread to join until a timeout is reached. It would be nice if this was included in the standard library, since trying to write an external crate for this is fairly convaluted, because the thread management logic is tightly coupled to the standard library.

I propose adding a function that allows this to `std::thread::JoinHandle` and `std::thread::ScopedJoinHandle`.
The API could look approximately like this:
```rust
impl<T> JoinHandle<T> {
    pub fn join_timeout(self, duration: Duration) -> Result<T, JoinTimeoutError<T>> {
        todo!()
    }
}

pub enum JoinTimeoutError<T> {
    Panic(Box<dyn Any + Send + 'static>),
    Timeout(JoinHandle<T>),
}
```

Returning the `JoinHandle` on timeout might be a little clunky, but it is the only way I could think of to enforce that `join_timeout` isn't called again after it succeeds. Alternatively `join_timeout` could take `&mut self` and then return a third enum variant or panic to indicate that the thread has already been joined.

I don't know how difficult this would be to implement for all supported platforms, but similar functions are included in (among others) [Python](https://docs.python.org/3/library/threading.html#threading.Thread.join), [Java](https://docs.oracle.com/javase/8/docs/api/java/lang/Thread.html#join-long-), [C#](https://learn.microsoft.com/en-us/dotnet/api/system.threading.thread.join?view=net-8.0#system-threading-thread-join(system-int32)) and [POSIX threads](https://linux.die.net/man/3/pthread_timedjoin_np), so it should at least be possible on all major platforms.
Repository: flutter
Issue: iOS autocorrect highlight persists in field after hot restart
Labels: platform-ios,P2,team-text-input,triaged-text-input

### Steps to reproduce

1. Run any app with a text input, such as the one below.
2. Enter some text until autocorrect is triggered and the text is highlighted blue. If you can't trigger it, try a commonly misspelled word.
3. Hot restart.

### Expected results

The text is cleared and so is the highlight.

### Actual results

The text disappears, but the highlight remains. It happens for both TextField and CupertinoTextField, but only on iOS (I tried iOS simulator, Android emulator, and MacOS).

### Code sample

<details open><summary>Code sample</summary>

```dart
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: const <Widget>[
            Padding(
              padding: EdgeInsets.symmetric(horizontal: 32.0),
              child: TextField(),
            ),
          ],
        ),
      ),
    );
  }
}
```

</details>


### Screenshots or Video

<img width="116" alt="Screenshot 2024-06-25 at 5 24 09 PM" src="https://github.com/flutter/flutter/assets/389558/1db20ade-f1c3-4f31-85b0-3c121b73bf50">




### Flutter Doctor output

<details open><summary>Doctor output</summary>

```console
[!] Flutter (Channel master, 3.23.0-13.0.pre.335, on macOS 14.5 23F79 darwin-arm64, locale en)
    ! Unknown upstream repository.
      Reinstall Flutter by following instructions at https://flutter.dev/docs/get-started/install.
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
[✓] Chrome - develop for the web
[!] Android Studio (version unknown)
    ✗ Unable to determine Android Studio version.
[✓] Android Studio (version 2023.2)
[✓] Connected device (3 available)
    ! Error: Browsing on the local area network for Bella’s iPad. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
      The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources

! Doctor found issues in 2 categories.
```

</details>
Repository: godot
Issue: Windows can go into a state where right click doesn't rotate camera
Labels: bug,topic:editor,topic:3d

### Tested versions

v4.3.beta2.official [b75f0485b]

### System information

Godot v4.3.beta2 - Windows 10.0.22631 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 4080 (NVIDIA; 32.0.15.5599) - Intel(R) Core(TM) i7-14700K (28 Threads)

### Issue description

I am reliably able to put Godot into a similar state as described here: #92305

Basically you can right click and it will rotate the camera for one frame, but then stop.

### Steps to reproduce

- Launch Godot project selector
- Select a project that will load a 3D scene
- While the editor is loading (it always loads in a maximized window for me), try to drag the title bar a few times until it reduces to a non-fullscreen window
- 90% of the time when I do this the editor is in a state where right-clicking into the 3d viewport only rotates for a single frame.

### Minimal reproduction project (MRP)

Reproduced this with a brand new empty project.

Tried to reproduce in v4.2.2.stable.official [15073afe3] but couldn't.

I did manage to get into this state somehow outside of the initial load, but not sure how I did it.
Repository: tauri
Issue: Electron provides a `new-window` event in the main thread, but TAURI does not.
Labels: type: feature request

### Describe the problem

The following are window-wide event handlers available in Electron that are triggered when a URL is opened in a new window.
```javascript
 const electron = require("electron");
 const shell = electron.shell;
 const app = electron.app;
 const BrowserWindow = electron.BrowserWindow;
 
 app.on('ready', function() {
   const mainWindow = new BrowserWindow({width: 1600, height: 600});
   mainWindow.loadURL('file://' + __dirname + '/index.html');
 
   // New window event intercepted and opened in default browser (currently not concerned with page transitions)
   mainWindow.webContents.on('new-window', function(e,url){
     e.preventDefault();
     shell.openExternal(url);
   });
 });
```

However, these events have not yet been implemented in TAURI as far as I can tell.

This event is required when external HTML containing an a tag is loaded and displayed, for example, or when a URL is opened in an iframe (e.g., YouTube embedding) tag.
I am currently working on a project for such a situation.
It is inefficient to change the a tag in JavaScript and add the `target="_blank"` attribute each time.

### Describe the solution you'd like

So I would like to add a `new-window` event in the `listen` function in the TAURI API.

```typescript
import { listen, type Event } from '@tauri-apps/api/event';
import { Open } from '@tauri-apps/api/shell;

const winPosUnlisten = await listen("tauri://new-window", async (e: Event<{ url: string }>) => {
    e.preventDefault();
    await Open( url );
});
```

### Alternatives considered

_No response_

### Additional context

Please let me know if there are other existing methods that would be better.
Thank you very much.
Repository: deno
Issue: suggestion: add `Deno.lutimes[Sync]()`
Labels: public API,suggestion,ext/fs,std

It'd behave the same as Node's `fs.lutimes()`. Such work would unblock https://github.com/denoland/deno_std/issues/5083. Related #23172.
Repository: flutter
Issue: [tool] "ProcessException: This program is blocked by group policy..." at `MicrosoftEdgeDevice._getSdkNameAndVersion`
Labels: c: crash,P2,team-tool,triaged-tool

Stacktrace on Flutter 3.22.2:

(Exception message translation: "This program is blocked by group policy. For more information, contact your system administrator.")
```
ProcessException: このプログラムはグループ ポリシーによりブロックされています。詳細については、システム管理者に問い合わせてください。
  Command: C:\WINDOWS\system32\reg.EXE query HKEY_CURRENT_USER\Software\Microsoft\Edge\BLBeacon /v version
at _ProcessImpl._start(process_patch.dart:402)
at Process.start(process_patch.dart:38)
at _runNonInteractiveProcess(process_patch.dart:579)
at Process.run(process_patch.dart:49)
at LocalProcessManager.run(local_process_manager.dart:72)
at ErrorHandlingProcessManager.run.<anonymous closure>(error_handling_io.dart:661)
at _run(error_handling_io.dart:556)
at ErrorHandlingProcessManager.run(error_handling_io.dart:660)
at MicrosoftEdgeDevice._getSdkNameAndVersion(web_device.dart:280)
at MicrosoftEdgeDevice.sdkNameAndVersion(web_device.dart:276)
at MicrosoftEdgeDevice.sdkNameAndVersion(web_device.dart)
at MicrosoftEdgeDevice._meetsVersionConstraint(web_device.dart:267)
at WebDevices.pollingGetDevices(web_device.dart:364)
at PollingDeviceDiscovery._initTimer.<anonymous closure>(device.dart:498)
at _rootRun(zone.dart:1391)
at _CustomZone.run(zone.dart:1301)
at _CustomZone.runGuarded(zone.dart:1209)
at _CustomZone.bindCallbackGuarded.<anonymous closure>(zone.dart:1249)
at _rootRun(zone.dart:1399)
at _CustomZone.run(zone.dart:1301)
at _CustomZone.bindCallback.<anonymous closure>(zone.dart:1233)
at Timer._createTimer.<anonymous closure>(timer_patch.dart:18)
at _Timer._runTimers(timer_impl.dart:398)
at _Timer._handleMessage(timer_impl.dart:429)
at _RawReceivePort._handleMessage(isolate_patch.dart:184)
```

Code:

https://github.com/flutter/flutter/blob/ecd7518df5ecf36e8e1d52aefe3ea28db71054d9/packages/flutter_tools/lib/src/web/web_device.dart#L280-L282
Repository: flutter
Issue: [ios][platform_view] Reuse ad banners in performance benchmark
Labels: platform-ios,a: platform-views,P2,team-ios,triaged-ios

There's a big improvement by pre-loading and re-using the banners in UIKit. Here's my UIKit project with recycling: 

```

  override func viewDidLoad() {
    super.viewDidLoad()
    
    tableView.register(UITableViewCell.self, forCellReuseIdentifier: "cell")
    
    for _ in 0..<25 {
      let banner = GADBannerView(adSize: GADAdSizeBanner)
      banner.adUnitID = "ca-app-pub-3940256099942544/2934735716"
      banner.rootViewController = self
      banner.adSize = GADAdSizeBanner
      banner.load(GADRequest())
      banners += [banner]
    }
}

  override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
    let row = indexPath.row
    
    if row % 3 == 0 {
      let banner = banners[row / 3]
      cell.contentView.addSubview(banner)
    } else {
      cell.contentView.subviews.first?.removeFromSuperview()
    }
    return cell
  }
```

We should see if it is possible to do the same with Flutter.
Repository: rust
Issue: Terse diagnostic on lack of ~const bound in inherent associated const functions
Labels: A-diagnostics,T-compiler,F-const_trait_impl,D-terse,PG-const-traits

When a trait is used as a bounds to a generic inherent implementation, and that inherent implementation defines a const function, methods from that bounding trait are not being handled as const inside that definition.

I tried this code:

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

#[const_trait]
trait Foo {
  fn bar(&self) -> u16;
}

struct Baz<F: Foo>(F, u16);

impl<F: Foo> Baz<F> {
  const fn bat(f: F) -> u16 { f.bar() }
}
```

I expected to see this happen: The code would compile and use the const bar() method implemented on F.

Instead, this happened: The compiler yields the error:

```
error[E0277]: the trait bound `F: ~const Foo` is not satisfied
  --> file.rs:11:30
   |
11 |   const fn bat(f: F) -> u16 { f.bar() }
   |                               ^^^^^^^
```

### Meta
This was tested on rustc 1.81.0-nightly (6b0f4b5ec 2024-06-24).
Repository: tauri
Issue: [bug] Cancelling drag & drop with the escape key does not fire cancellation
Labels: type: bug,status: needs triage

### Describe the bug

When I am in the middle of a drag & drop operation (dragging in a file outside of the app into the app), if I click the Escape key to cancel the drag & drop before I actually drop the file, the `onDragDropEvent()` handler will not get an event for that cancellation.

See this console log output as an example:
![Screenshot 2024-06-25 at 21 57 43](https://github.com/tauri-apps/tauri/assets/77378/878d248e-d372-41ff-b247-578e4cc2d492)

The first line shows my `onDragDropEvent()` handler registering the `dragged` event. The second line appears when I click the Escape key.

The referenced line in the stack trace, `webview.js:481` is the following:
![Screenshot 2024-06-25 at 21 59 30](https://github.com/tauri-apps/tauri/assets/77378/b5e526bc-47ca-401d-ba75-640dce1adb3d)

I wonder if `position` should allowed to be null/undefined and/or always report the last-known point if unknown.

P.S. I only tested this on macOS, but I imagine that behavior would be similar on Windows and Linux?

### Reproduction

1. Set up a very basic Tauri app with:
```
import { getCurrent } from "@tauri-apps/api/webview";
<...>
await getCurrent().onDragDropEvent((event) => {
    console.log(event)
}
```
2. Drag in a file. Notice the initial drag-on event firing.
3. Before dropping the file, press the Escape key to cancel the drag & drop.

### Expected behavior

Another event should fire with the cancellation information.

### Full `tauri info` output

```text
$ tauri info

[✔] Environment
    - OS: Mac OS 14.4.0 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.79.0 (129f3b996 2024-06-10)
    ✔ cargo: 1.79.0 (ffa9cf99a 2024-06-03)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 21.5.0
    - npm: 10.2.4
    - bun: 1.1.15

[-] Packages
    - tauri [RUST]: 2.0.0-beta.22
    - tauri-build [RUST]: 2.0.0-beta.17
    - wry [RUST]: 0.40.1
    - tao [RUST]: 0.28.1
    - @tauri-apps/api : not installed!
    - @tauri-apps/cli [NPM]: 2.0.0-beta.20

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../build
    - devUrl: http://localhost:1420/
    - framework: Svelte
    - bundler: Vite
```


### Stack trace

```text
[Error] TypeError: null is not an object (evaluating 'event.payload.position')
	(anonymous function) (webview.js:481)
	value (user-script:5:227)
	value (user-script:5:299)
	(anonymous function) (Script Element 16:1:91)
	Global Code (Script Element 16:1:173)
```


### Additional context

_No response_
Repository: ui
Issue: [bug]: Application error: a client-side exception has occurred on examples > playground page
Labels: bug

### Describe the bug

If we explore playground examples on this page : https://ui.shadcn.com/examples/playground and click on load a preset dropdown, we get to see this error 
![image](https://github.com/shadcn-ui/ui/assets/114129405/4df9a4fc-d302-4357-a4c3-532cb8366547)


### Affected component/components

Entire Webpage

### How to reproduce

1. Go to [https://ui.shadcn.com/examples/playground](https://ui.shadcn.com/examples/playground)
2. Click on Load a preset dropdown
3. And the error occurs. 

### Codesandbox/StackBlitz link

https://ui.shadcn.com/examples/playground

### Logs

```bash
TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
    at Function.from (<anonymous>)
    at O (69016-e46275a046c77977.js:1:8485)
    at M (69016-e46275a046c77977.js:1:7484)
    at 69016-e46275a046c77977.js:1:6256
    at 69016-e46275a046c77977.js:1:14852
    at Map.forEach (<anonymous>)
    at 69016-e46275a046c77977.js:1:14841
    at aI (eb2a38ac-8c1a930f3b668d8a.js:1:72883)
    at aU (eb2a38ac-8c1a930f3b668d8a.js:1:72943)
    at aV (eb2a38ac-8c1a930f3b668d8a.js:1:73382)
```


### System Info

```bash
Windows 10 & Chrome
```


### Before submitting

- [x] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: TypeScript
Issue: `abstract class` should be usable in expressions
Labels: Suggestion,Awaiting More Feedback

### 🔍 Search Terms

abstract, class, expression

### ✅ Viability Checklist

- [X] This wouldn't be a breaking change in existing TypeScript/JavaScript code
- [X] This wouldn't change the runtime behavior of existing JavaScript code
- [X] This could be implemented without emitting different JS based on the types of the expressions
- [X] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
- [X] This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types
- [X] This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals

### ⭐ Suggestion

```ts
function myMixin(Base: typeof Object) {
  return abstract class Mixed extends Base {};
}
```

### 📃 Motivating Example

Preferable to:
```ts
function myMixin(Base: typeof Object) {
  abstract class Mixed extends Base {}
  return Mixed;
}
```

### 💻 Use Cases

1. What do you want to use this for?
Same uses as without
3. What shortcomings exist with current approaches?
Slight additional verbosity
5. What workarounds are you using in the meantime?
Slight additional verbosity
Repository: transformers
Issue: New `save_strategy` option called "best" to save when a new best performance is achieved.
Labels: Feature request

### Feature request

Introduce a new option for the `save_strategy` argument called `"best"` which would save the model once a new best performance is achieved.

### Motivation

The `save_strategy` argument was first introduced a few years ago in https://github.com/huggingface/transformers/pull/10286. Currently the supported options are `"no"`, `"epoch"`, and `"steps"`. I'm assuming that this is to match the [`IntervalStrategy`](https://github.com/huggingface/transformers/blob/0f67ba1d741d65b07d549daf4ee157609ce4f9c1/src/transformers/trainer_utils.py#L221:L224) that's used by evaluation as well.

Judging by a conversation on a HuggingFace Discussion Forum topic, the best model is always kept by default and therefore if saving occurs at any time during the process then the best model is saved (ref: https://discuss.huggingface.co/t/save-only-best-model-in-trainer/8442). If the user deems that saving often is too burdensome then they may set `save_strategy = "no"` which would save the best model at the end of training.

I believe that introducing some flexibility for saving would be beneficial so that users don't have to perform saving so often but also don't have to wait until the end for a checkpoint.

### Your contribution

If this feature is deemed worth it by the core maintainers then I'd be willing to take this on myself and open a PR. There are some aspects that I believe might warrant further discussion (e.g., which metric should be used to determine "best," how to override `IntervalStrategy`, etc.).
Repository: rust
Issue: rustdoc reproducibility issue due to nondeterministic anon.llvm.<hash>
Labels: T-compiler,C-bug,A-reproducibility

I am facing a reproducibility issue with _rustdoc_ in Yocto project. The issue is happening due to a different _llvm.<**hash**>_ generation between the builds.

![anon-1](https://github.com/rust-lang/rust/assets/56015745/514181ff-35e8-4eef-96f8-3b566df2dc2f)
![anon-2](https://github.com/rust-lang/rust/assets/56015745/56ad7504-84dc-4911-8ef2-ac872a13aca4)

What could be the reason for this _llvm.<**hash**>_ is nondeterministic. Any optimization settings causing this? (I tried the PGO enabling/disabling but has no effect).

[Info] - This issue we've seen in past https://internals.rust-lang.org/t/rustdoc-binary-is-not-reproducible/20027. There we concluded the issue is fixed by _disabling PGO_ and setting _tools = ["rust-demangler",]_ but it is not fixed. Somehow with those settings _rustdoc_ is not generating at all. (We found that by removing _tools = ["rust-demangler",]_ the _rustdoc_ is generated)
Repository: transformers
Issue: Tokenizer discard data that exceed max_length
Labels: Core: Tokenization,Feature request

### Feature request

When use tokenizer, it truncate data to max_length, but can't just discard the data.

### Motivation

Sometimes we want the sentence to be complete

### Your contribution

No