sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Invalid import path rewrite in declaration file
Labels: Bug,Help Wanted

### 🔎 Search Terms

"import paths", "imports rewrite"

### 🕗 Version & Regression Information

- This changed between versions 5.5.4 and 5.6.3

### ⏯ Repository with repro

https://github.com/MariaSolOs/path-rewrite-bug

### 💻 Code

The linked repository contains all of the necessary code to reproduce the issue. This is a pnpm monorepo with 4 packages.

`mod1` simply exports the following interface and makes it available outside the package:
```ts
// mod1/index.ts
export interface Foo {
  foo: string;
}
```
```jsonc
// mod1/package.json
{
  ...
  "exports": {
    ".": {
      "types": "./dist/index.d.ts",
      "default": "./dist/index.js"
    }
  }
}
```

`mod2` depends on `mod1` and exports its types.
```ts
// mod2/index.ts
import { Foo } from "mod1";

export const createFoo = (foo: string): Foo => ({ foo });

export type * from "mod1";
```
```jsonc
// mod2/package.json
{
  ...
  "exports": {
    ".": {
      "types": "./dist/index.d.ts",
      "default": "./dist/index.js"
    }
  },
  "dependencies": {
    "mod1": "workspace:*"
  }
}
```

`mod3` depends on `mod2` and exports a simple `getFoo` function using the imported function from `mod2`:
```ts
// mod3/index.ts
import { createFoo } from "mod2";

export const getFoo = () => createFoo("foo");
```
```jsonc
// mod3/package.json
{
  ...
  "exports": {
    ".": {
      "types": "./dist/index.d.ts",
      "default": "./dist/index.js"
    }
  },
  "dependencies": {
    "mod2": "workspace:*"
  }
}
```

Finally, `mod4` depends on `mod3` and uses `getFoo` to create another function:
```ts
// mod4/index.ts
import { getFoo } from "mod3";

export const foo = getFoo();
```
```jsonc
// mod4/package.json
{
  ...
  "exports": {
    ".": {
      "types": "./dist/index.d.ts",
      "default": "./dist/index.js"
    }
  },
  "dependencies": {
    "mod3": "workspace:*"
  }
}
```

### 🙁 Actual behavior

Because `mod3` has an invalid `index.d.ts`, `mod4` fails compilation when doing a lib check of `mod3`'s type declaration files. This is the invalid declaration file from `mod3`:

```ts
export declare const getFoo: () => import("mod1").Foo;
//# sourceMappingURL=index.d.ts.map
```

### 🙂 Expected behavior

For the behavior from previous versions of TypeScript to be maintained: Since `mod2` re-exports `mod1`s types, and since `mod3` depends on `mod2`, compiling `mod3` should produce this:

```ts
export declare const getFoo: () => import("mod2").Foo;
//# sourceMappingURL=index.d.ts.map
```

### Additional information about the issue

_No response_
Repository: react
Issue: [Compiler Bug]: TS types missing for `eslint-plugin-react-compiler`
Labels: Type: Bug,Status: Unconfirmed,Component: Optimizing Compiler

### What kind of issue is this?

- [ ] React Compiler core (the JS output is incorrect, or your app works incorrectly after optimization)
- [ ] babel-plugin-react-compiler (build issue installing or using the Babel plugin)
- [X] eslint-plugin-react-compiler (build issue installing or using the eslint plugin)
- [ ] react-compiler-healthcheck (build issue installing or using the healthcheck script)

### Link to repro

https://www.typescriptlang.org/play/?#code/JYWwDg9gTgLgBFApgQwMYwMIXMANoqOAMymzgHJEBnXYAOxgFoxcBXAc3saTSdWzB4C5ANwAoIA

### Repro steps

1. Configure `compilerOptions.checkJs = true` in `tsconfig.json`
2. Import from `eslint-plugin-react-compiler` in `eslint.config.js`
3. 💥 Observe the error below

```
Could not find a declaration file for module 'eslint-plugin-react-compiler'. 'node_modules/eslint-plugin-react-compiler/dist/index.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/eslint-plugin-react-compiler` if it exists or add a new declaration (.d.ts) file containing `declare module 'eslint-plugin-react-compiler';`ts(7016)
```

![Screenshot 2024-10-23 at 18 52 33](https://github.com/user-attachments/assets/7545d733-9ed7-4a1b-aeb1-6bb03bb2e270)


### How often does this bug happen?

Every time

### What version of React are you using?

19.0.0-rc-69d4b800-20241021

### What version of React Compiler are you using?

19.0.0-beta-8a03594-20241020


### Alternatives Considered

I thought maybe there would be types at [`@types/eslint-plugin-react-compiler`](https://www.npmjs.com/package/@types/eslint-plugin-react-compiler) (DefinitelyTyped), but this does not exist
Repository: go
Issue: x/build: test missing from the list of test events
Labels: Builders,NeedsInvestigation

I vote commit-queue in https://go-review.googlesource.com/c/go/+/621997 ,
See https://logs.chromium.org/logs/golang/buildbucket/cr-buildbucket/8733272018311763649/+/u/step/11/log/2
linux-amd64-race result like <code>Status for test slices.BenchmarkCompactFunc/sorted is missing from the list of test events. Setting to `pass` because package passed.</code>
Repository: angular
Issue: @defer is broken for dynamic component (maybe)
Labels: area: core,core: defer

### Which @angular/* package(s) are the source of the bug?

core

### Is this a regression?

Yes

### Description

I have been trying to lazy-load a component in the browser during the idle state. The issue is that the component is inside an ng-template, and I am using "createComponent" to dynamically create a component (modal), and I'm projecting some dynamic content inside that. I am trying to lazy-load this dynamic content with @defer, but it doesn’t seem to work.

My question is: if the component inside the ng-template loads as eagerly without using @defer, why doesn't it lazy-load when I apply @defer(on idle)? The component only loads after I inject the ng-template content into the dynamic component and attach it to the DOM.

(Please close and ignore this issue if this is dumb - I'm just learning new stuffs in Angular.)

![Image](https://github.com/user-attachments/assets/ae8e3646-03aa-406a-9d05-bb10d9c5226b)

![Image](https://github.com/user-attachments/assets/1fce6a57-0085-4bb0-8bb0-70b0c225a3fa)

as you can see the component should have loaded on the browser idle state but instead it is getting loaded when the dynamic content is getting attached to the DOM.


### Please provide a link to a minimal reproduction of the bug

https://ng-spark-ebon.vercel.app/components/dialog

### Please provide the exception or error you saw

You can see in the Network tab that the component loads only after it is attached to the DOM, not while in an idle state

### Please provide the environment you discovered this bug in (run `ng version`)

Angular CLI: 18.2.8
Node: 20.16.0
Package Manager: npm 10.8.1
OS: win32 x64

### Anything else?

_No response_
Repository: deno
Issue: Vite doesn't support Deno's `jsr:` imports
Labels: needs investigation

Deno version: deno --version
deno 2.0.2 (stable, release, x86_64-pc-windows-msvc)
v8 12.9.202.13-rusty
typescript 5.6.2

Here is a repo: https://github.com/Ciantic/deno-pure-solid-start

```
11.50.18 [vite] Error when evaluating SSR module C:/Source/JavaScript/solid-start-test/deno-solid-test/src/routes/index.tsx?pick=default&pick=$css: failed to import "jsr:@db/sqlite@0.12"
|- Error: Cannot find module 'jsr:@db/sqlite@0.12' imported from 'C:/Source/JavaScript/solid-start-test/deno-solid-test/src/db/db.ts'
    at nodeImport (C:\Source\JavaScript\solid-start-test\deno-solid-test\node_modules\.deno\vite@5.4.9\node_modules\vite\dist\node\chunks\dep-Cyk9bIUq.js:53036:19)        
    at ssrImport (C:\Source\JavaScript\solid-start-test\deno-solid-test\node_modules\.deno\vite@5.4.9\node_modules\vite\dist\node\chunks\dep-Cyk9bIUq.js:52903:22)
    at undefined
    at async instantiateModule (C:\Source\JavaScript\solid-start-test\deno-solid-test\node_modules\.deno\vite@5.4.9\node_modules\vite\dist\node\chunks\dep-Cyk9bIUq.js:52961:5)
```

[Discord link](https://discord.com/channels/684898665143206084/1298570120653836289)
Repository: go
Issue: path/filepath: Walk/WalkDir susceptible to symlink race
Labels: Security

The filepath.Walk and filepath.WalkDir functions are documented as not following symbolic links.

Both these functions are susceptible to a TOCTOU (time of check/time of use) race condition where a portion of the path being walked is replaced with a symbolic link while the walk is in progress.

The impact of this race condition is either mitigated or exacerbated (depending on your perspective) by the fact that the Walk/WalkDir API is fundamentally subject to TOCTOU races: Walk/WalkDir provides the names of files to a WalkFunc/WalkDirFunc, but the file may be replaced in between the WalkFunc/WalkDIrFunc being invoked and making use of the file name. This fundamental raciness means that a WalkFunc/WalkDirFunc that needs to defend against symlink traversal must use a traversal-resistant API to access files, such as github.com/google/safeopen or the proposed os.Root (#67002). Using a traversal-resistant file API will also defend against races in Walk/WalkDir itself.

Because of the inherent raciness of the Walk/WalkDir API, and the fact that fixing the TOCTOU vulnerability requires non-trivial implementation changes, we are classifying this as a PUBLIC track vulnerability.

This has been assigned CVE-2024-8244.
Repository: pytorch
Issue: [inductor] cpp gemm autotune doesn't work on AMD EPYC
Labels: module: cpu,triaged,oncall: pt2

Repro:
```
python test/inductor/test_aot_inductor.py AOTInductorTestABICompatibleCpu.test_misc_1_max_autotune_True_cpu
```

Error:
```
  File "/data/users/binbao/pytorch/torch/_inductor/codegen/common.py", line 2407, in maybe_append_choice
    choices.append(self.generate(**kwargs))
                   ^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/users/binbao/pytorch/torch/_inductor/select_algorithm.py", line 1123, in generate
    choice_caller = self._wrapped.generate(**kwargs)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/users/binbao/pytorch/torch/_inductor/codegen/cpp_template.py", line 48, in generate
    code = kernel.render(self, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/users/binbao/pytorch/torch/_inductor/codegen/cpp_template_kernel.py", line 51, in render
    template.render(kernel=self, **kwargs), self.render_hooks
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/users/binbao/pytorch/torch/_inductor/codegen/cpp_gemm_template.py", line 1061, in render
    self.log_blockings()
  File "/data/users/binbao/pytorch/torch/_inductor/codegen/cpp_gemm_template.py", line 504, in log_blockings
    log.debug(f"Cache blocking: {self.cache_blocking()}")  # noqa: G004
                                 ^^^^^^^^^^^^^^^^^^^^^
  File "<string>", line 5, in cache_blocking_cache_on_self
  File "/data/users/binbao/pytorch/torch/_inductor/codegen/cpp_gemm_template.py", line 497, in cache_blocking
    return GemmBlocking(*get_cache_blocking(register_blocking, thread_blocking))
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/users/binbao/pytorch/torch/_inductor/codegen/cpp_gemm_template.py", line 430, in get_cache_blocking
    L1_cache_size > 0
torch._inductor.exc.LoweringException: AssertionError: Expect L1_cache_size > 0 but got 0
  target: aten.addmm.default
  args[0]: TensorBox(StorageBox(
    ConstantBuffer(name='L__self___mlp_0_bias', layout=FixedLayout('cpu', torch.float32, size=[64], stride=[1]))
  ))
  args[1]: TensorBox(StorageBox(
    InputBuffer(name='arg9_1', layout=FixedLayout('cpu', torch.float32, size=[16, 128], stride=[128, 1]))
  ))
  args[2]: TensorBox(
    ReinterpretView(
      StorageBox(
        ConstantBuffer(name='L__self___mlp_0_weight', layout=FixedLayout('cpu', torch.float32, size=[64, 128], stride=[128, 1]))
      ),
      FixedLayout('cpu', torch.float32, size=[128, 64], stride=[1, 128]),
      origins=OrderedSet([permute])
    )
  )
```

cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @ezyang @chauhang @penguinwu
Repository: flutter
Issue: [ios]iPadGestureTests in scenario test app failure 
Labels: platform-ios,engine,P2,team-ios,triaged-ios

### Use case

Test: https://github.com/flutter/engine/blob/4e6405e2a89fa8fda2c0e7017ddcd8b39d7b3052/testing/scenario_app/ios/Scenarios/ScenariosUITests/iPadGestureTests.m

2 problems: 
1. it fails
2. it's not running on CI

### Proposal

- Fix the failure
- Run on CI (otherwise the test isn't really helpful)
Repository: vscode
Issue: focusing cell will show previous cursor location
Labels: bug,notebook-markdown

Steps to Reproduce:

1. Place cursor in markdown cell, somewhere in the NOT visible area of the screen
2. Click out of the cell
3. Try to double click somewhere in the visible area of the screen to highlight text
 
🐛Cell scrolls to the previously placed cursor area (which is great if I'm single-clicking into the cell, but in this case, it feels glitchy to me)
Repository: node
Issue: API for temporarily supressing experimental warnings
Labels: feature request,experimental

Spinned off from https://github.com/nodejs/node/issues/55417 to discuss about this more generally.

While it can be abused and lead to unwanted issues, I think CLI tools tend to inevitably want to do it for a cleaner output and will find their way to do it already. One example that I've found previously was how Yarn does it by temporarily monkey-patching `process.emit` 

https://github.com/yarnpkg/berry/blob/031b5da1dc8e459e844efda137b2f00d7cdc9dda/packages/yarnpkg-pnp/sources/loader/applyPatch.ts#L304-L325

So I think we might as well provide a proper API for this instead of having users resort to monkey-patching.

We could either just have something quick and simple like `process.noExperimentalWarning` toggle that gets checked before the warning is emitted (similar to `process.noDeprecation`):

```js
// Temporarily turn off the warning
process.noExperimentalWarning = true;
// ...use the experimental API
// process.noExperimentalWarning = false;
```

Or some API that toggles specific warnings (this requires assigning code to experiments, which we currently do not have):

```js
process.silenceExperimentalWarning && process.silenceExperimentalWarning('EXP1', true);
// ...use the experimental API
process.silenceExperimentalWarning && process.silenceExperimentalWarnings('EXP1', false);
```

Or some API that takes a function and run it without emitting warnings (may be a bit awkward for async APIs, but ensures that users don't forget to toggle it back):

```js
process.runWithoutExperimentalWarning(() => {
   // ...use the experimental API
}, 'EXP1');  // if the experiment code is not passed, silence all experimental warnings
```

For the ones that take codes we could also merge it with deprecation warning handling and just have e.g. `process.silenceWarning()`/`process.runWithoutWarning()` that also accepts `DEP` codes.

More ideas are welcomed, too.
Repository: ui
Issue: [bug]: Cannot install npx shadcn@latest add sidebar-07 
Labels: bug

### Describe the bug

![image](https://github.com/user-attachments/assets/cb031038-07cd-4596-8e65-b2132bcf4009)


### Affected component/components

sidebar

### How to reproduce

npx shadcn@latest add sidebar-07

### Codesandbox/StackBlitz link

_No response_

### Logs

_No response_

### System Info

```bash
windowns 11
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues
Repository: vscode
Issue: `"editor.formatOnSaveMode": "modificationsIfAvailable"` often broken
Labels: feature-request,formatting

<!-- ⚠️⚠️ 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?: Not applicable : Extensions needed

<!-- 🪓 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. -->
Version: 1.94.2
Commit: 384ff7382de624fb94dbaf6da11977bba1ecd427
Date: 2024-10-09T16:08:44.566Z
Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.94.2 Chrome/124.0.6367.243 Electron/30.5.1 Safari/537.36

See https://github.com/microsoft/vscode/issues/203463

`"editor.formatOnSaveMode": "modificationsIfAvailable"` is often broken, even though its description states 👍 > Will attempt to format modifications only
(requires source control). If source control can't be
used, then the whole file will be formatted.

Couldn't it fallback to file also when `modificationsIfAvailable` fail ?
Repository: pytorch
Issue: [PP] Add unit tests to check for memory regressions
Labels: triaged,module: pipelining

We ran into some memory issues which were fixed in this stack: https://github.com/pytorch/pytorch/pull/138119, https://github.com/pytorch/pytorch/pull/138504

As a follow up we need to add unit tests to prevent regressions in pipelining memory usage. There are currently no tests that test pipelining schedules intra-memory allocation, but an idea is to do something similar to FSDP unit tests: https://github.com/pytorch/pytorch/pull/138119#issuecomment-2418036449
Repository: pytorch
Issue: `maybe_mark_dynamic` causes max recursion error when used with compile during tensordict consolidation
Labels: triaged,oncall: pt2,module: fakeTensor,module: dynamic shapes,module: dynamo,module: pt2-dispatcher

## Context

We would like to consolidate tensordict made of NJTs in a single storage.

This should contain all the values, offsets and lengths of all the leaves in the TD. The operation looks like this
```python
swaps = copy(tensors)
for i, t in enumerate(tensors):
    swaps[i] = tensor.view(torch.uint8).view(-1)
torch.stack(swaps, storage)
out = storage.split(tensor_lengths)
out = [t.view(t_src.dtype).view(t_src.shape) for t, t_src in zip(out, tensors)]
```

This operation can be hugely CPU-overhead bound and when compiled we can get a nice 2x speed-up. It should work with dynamic shapes (for torchrec users for instance you may know how many jagged tensors you'll get ahead of time but not how big they are going to be).

## Issue

Currently, doing that when the number of NJTs exceeds 64 or so causes a max recursion depth error.

The line responsible for this is this one:
https://github.com/pytorch/pytorch/blob/cd9c6e9408dd79175712223895eed36dbdc84f84/torch/nested/_internal/nested_tensor.py#L145C9-L145C41

I created a minimal reproducible example for this that only requires PT to be installed:
https://gist.github.com/vmoens/c15e6a6862ad849e30856034cbf33f1a

If you comment out the line 8:
```python
        torch._dynamo.maybe_mark_dynamic(values, 0)
```
then the code runs fine (although compile time can be exceedingly long). 

With this line uncommented, you should get:

```
torch._dynamo.exc.TorchRuntimeError: Failed running call_method view(*(FakeTensor(..., size=(4*s141,), dtype=torch.uint8), torch.float32), **{}):
maximum recursion depth exceeded while calling a Python object

from user code:
   File "/Users/vmoens/Library/Application Support/JetBrains/PyCharm2023.3/scratches/scratch_8.py", line 57, in consolidate
    result = [
  File "/Users/vmoens/Library/Application Support/JetBrains/PyCharm2023.3/scratches/scratch_8.py", line 58, in <listcomp>
    view_old_as_new(v, oldv)
  File "/Users/vmoens/Library/Application Support/JetBrains/PyCharm2023.3/scratches/scratch_8.py", line 52, in view_old_as_new
    v = v.view(oldv.dtype)
```

cc @ezyang @chauhang @penguinwu @eellison @bobrenjc93 @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @amjames @rec @zou3519 @bdhirsh @yf225 @jbschlosser @anijain2305
Repository: go
Issue: x/tools/cmd/splitdwarf/internal/macho: unrecognized failures
Labels: NeedsInvestigation,Tools

```
#!watchflakes
default <- pkg == "golang.org/x/tools/cmd/splitdwarf/internal/macho" && test == ""
```

Issue created automatically to collect these failures.

Example ([log](https://ci.chromium.org/b/8733272192998882241)):

    FAIL	golang.org/x/tools/cmd/splitdwarf/internal/macho [build failed]


— [watchflakes](https://go.dev/wiki/Watchflakes)
Repository: ui
Issue: [bug]: Typo in Sidebar documentartion
Labels: bug

### Describe the bug

I am almost sure there is a typo in the Sidebar documentation:
<img width="748" alt="Screenshot 2024-10-23 at 16 21 01" src="https://github.com/user-attachments/assets/e460f94f-ebc7-4264-b37f-5ff72309abd3">

Link: https://ui.shadcn.com/docs/components/sidebar#width

### Affected component/components

Sidebar

### How to reproduce

Go to https://ui.shadcn.com/docs/components/sidebar#width

### Codesandbox/StackBlitz link

_No response_

### Logs

_No response_

### System Info

```bash
macOS, Arc.
```


### Before submitting

- [X] I've made research efforts and searched the documentation
- [X] I've searched for existing issues