sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: VSCode unable to retrieve typing information with composite, emitDeclarationOnly and strict
Labels: Needs Investigation,Rescheduled

# TL;DR

Exactly the same as #43909 with addition of `"strict": true` [re-exposing the same issue](https://github.com/microsoft/TypeScript/issues/43909#issuecomment-909347161), and also tested and reproing against TS 4.3.5 and 4.4.2. I've updated the same repro to cover this case.

# Bug Report

### 🔎 Search Terms

composite project references emit declaration emitdeclarationonly vscode strict

### 🕗 Version & Regression Information

- This is the behavior in every version I tried, and I reviewed the FAQ for entries about: declarationEmitOnly and composite/project references

I've tried:
* 4.3.5
* 4.4.2

### ⏯ Playground Link

I don't think it's possible to set up multiple projects using project references in Playground. If I'm mistaken, please let me know. For now I've created the smallest repro I can below.

### 💻 Code

As this uses project references I set up [a basic monorepo](https://github.com/JasonGore/ts-composite-declaration) with no external deps other than typescript.

To repro (also in README.md):
1. clone https://github.com/JasonGore/ts-composite-declaration.git
1. run `yarn`
1. `cd packages/emit-standard`
1. `yarn tsc`
1. `cd ../packages/emit-composite`
1. `yarn tsc` (although I don't think this should technically be needed for projrefs)

Open VSCode from repo root and open `packages/consumer/src/index.ts` and note comments.

### 🙁 Actual behavior

This is an `emitDeclarationOnly` example emitting type information for packages that have `.js` files. The only difference between `emit-standard` and `emit-composite` is that one has `composite` set to true and is a reference of `consumer` package.

In VSCode, `emit-composite` seems unable to retrieve typing information, whether or not `emit-composite/lib` output exists:

![image](https://user-images.githubusercontent.com/26070760/116757828-b37d9200-a9c3-11eb-997f-44006a787fc5.png)

However, if you run `yarn tsc` in `packages/consumer`, typing information DOES seem to be available. I'm not sure if this is a TS or VSCode bug. For each TS version I tried above I ensured that VSCode was using "workspace version" and all exhibit this behavior.

### 🙂 Expected behavior

Typing information should be available in VSCode for both cases.
Repository: pytorch
Issue: issues flutter in android studio
Labels: triaged,module: android,oncall: mobile


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
> Could not resolve all artifacts for configuration ':app:debugCompileClasspath'.
   > Could not download x86_debug.jar (io.flutter:x86_debug:1.0.0-ee76268252c22f5c11e82a7b87423ca3982e51a7)
      > Could not get resource 'https://storage.googleapis.com/download.flutter.io/io/flutter/x86_debug/1.0.0-ee76268252c22f5c11e82a7b87423ca3982e51a7/x86_debug-1.0.0-ee76268252c22f5c11e82a7b87423ca3982e51a7.jar'.
         > Read timed out

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 39m 28s
Exception: Gradle task assembleDebug failed with exit code 1
Repository: node
Issue: segfault when using ESM dynamic import repeatedly in special circumstances
Labels: duplicate

### Version

v16.8.0

### Platform

Linux mkg-razer 5.10.61 #1-NixOS SMP Thu Aug 26 12:51:21 UTC 2021 x86_64 GNU/Linux

### Subsystem

ESM modules

### What steps will reproduce the bug?

- Create a package.json with at least "type": "module" set
- Create a file `b.js` with the following contents

```js
export default () => {}
```
- Open a nodeJS repl and paste the following
```
async function require (thing) {
  const imported = await import(thing) // "dynamic import"
  return Object.assign(imported.default, imported)
}

require('./b.js')
```

Wait a few seconds and run `require('./b.js')` again

### How often does it reproduce? Is there a required condition?

Sometimes it doesn't segfault, try running `require('./b.js')` again a few times, or try something like `require('./b.js').then(console.log)`

### What is the expected behavior?

It should return the module

### What do you see instead?

It segfaults

```
Segmentation fault (Speicherabzug geschrieben)
```

### Additional information

_No response_
Repository: flutter
Issue: Handle "The file or directory is corrupted and unreadable, errno = 1392" in error handling io during file creation
Labels: c: crash,tool,P2,team-tool,triaged-tool

Seen in crash logging during `flutter packages get` while rendering a generated plugin registrant from a template. The tool can likely not recover from this, so it should be added to error handling io to throw a tool exit to ask the user to fix it.

On version 2.6.0-0.0.pre dev
```
Thread 0 main threadFileSystemException: FileSystemException: Cannot create file, path = 'E:\appName\ios\Runner\GeneratedPluginRegistrant.h' (OS Error: The file or directory is corrupted and unreadable.
, errno = 1392)
at _File.throwIfError(file_impl.dart:635)
at _File.createSync(file_impl.dart:273)
at ForwardingFile.createSync(forwarding_file.dart:23)
at ErrorHandlingFile.createSync.<anonymous closure>(error_handling_io.dart:286)
at _runSync(error_handling_io.dart:597)
at ErrorHandlingFile.createSync(error_handling_io.dart:285)
at _renderTemplateToFile(flutter_plugins.dart:31)
at _writeIOSPluginRegistrant(flutter_plugins.dart:752)
at injectPlugins(flutter_plugins.dart:1068)
at <asynchronous gap>(async)
at FlutterProject.ensureReadyForPlatformSpecificTooling(project.dart:338)
at <asynchronous gap>(async)
at PackagesGetCommand.runCommand(packages.dart:173)
at <asynchronous gap>(async)
at FlutterCommand.run.<anonymous closure>(flutter_command.dart:1125)
at <asynchronous gap>(async)
at AppContext.run.<anonymous closure>(context.dart:150)
at <asynchronous gap>(async)
at CommandRunner.runCommand(command_runner.dart:209)
at <asynchronous gap>(async)
at FlutterCommandRunner.runCommand.<anonymous closure>(flutter_command_runner.dart:288)
at <asynchronous gap>(async)
at AppContext.run.<anonymous closure>(context.dart:150)
at <asynchronous gap>(async)
at FlutterCommandRunner.runCommand(flutter_command_runner.dart:236)
at <asynchronous gap>(async)
at run.<anonymous closure>.<anonymous closure>(runner.dart:62)
at <asynchronous gap>(async)
at AppContext.run.<anonymous closure>(context.dart:150)
at <asynchronous gap>(async)
at main(executable.dart:92)
at <asynchronous gap>(async)
```

/cc @christopherfujino
Repository: flutter
Issue: [flutter_tools] filter out of crash reporting crashes with local engine
Labels: tool,P3,team-tool,triaged-tool

we probably don't need to track crashes with local engine or dirty git checkouts
Repository: TypeScript
Issue: `!constant` in boolean expression not reported (function not called error)
Labels: Suggestion,In Discussion

# Bug Report

It is a common source of bugs that developers fail to call functions in boolean expressions.   This, among other reasons, the compiler checks for constant boolean expressions.  However, there seems to be a hole in the existing checks.  TSC currently allows "!fn" where "fn" and "(!fn) == true" are not allowed.  It would be beneficial to check this kind of expression as well.

```js
function fn() { return 'abc'; }

if (fn) {}  // ERROR: This condition will always ...
if (!fn) {} // not reported
if (fn == true) {} // ERROR: This condition will always ...
if ((!fn) == true) {} // ERROR: This condition will always ...
```

### 🔎 Search Terms

function "condition always true"

function constant boolean expression 

### 🕗 Version & Regression Information
unknown, presumably since the beginning of time, at least TS 3.3, related improvement in TS 3.7

- This is the behavior in every version I tried, and I reviewed the FAQ for entries about Truthy expressions

### ⏯ Playground Link

[Playground link with relevant code](https://www.typescriptlang.org/play?#code/PTAEFkE9QYwewCYFNQHM5IM6gBZIE5JA)

https://www.typescriptlang.org/play?ts=3.7.5&q=247#code/GYVwdgxgLglg9mABMMAKAlIg3ogTgUyhFyQHIBDAIwlIG5EBfAWAChWZhFUVMtmWOXAIQ9s-QdyQBeKYii4Q+XuM6pUIsJhlyFSsa1ZA

### 💻 Code

```ts
function fn() { return 'abc'; }

if (fn) {}  // ERROR: This condition will always ...
if (!fn) {} // not reported
if (fn == true) {} // ERROR: This condition will always ...
if ((!fn) == true) {} // ERROR: This condition will always ...
```

### 🙁 Actual behavior

No warning

### 🙂 Expected behavior

"This condition will always ..." warning
Repository: go
Issue: spec: clarify sequencing of function calls within expressions
Labels: Documentation,NeedsDecision

The program below tests the order-of-evaluation semantics of `return *p, f(p)`. With gccgo, it prints 0 (i.e., evaluating `*p` before calling `f(p)`), and with cmd/compile it prints 2 (i.e., evaluating `*p` after `f(p)` returns).

But is it allowed to print `1`? I.e., can `*p` be evaluated *in the middle* of `f(p)` being evaluated, after the `*p = 1` and before the `*p = 2`?

The spec says simply:

> For example, in the (function-local) assignment
>
> ```
> y[f()], ok = g(h(), i()+x[j()], <-c), k()
> ```
>
> the function calls and communication happen in the order `f()`, `h()`, `i()`, `j()`, `<-c`, `g()`, and `k()`. However, the order of those events compared to the evaluation and indexing of `x` and the evaluation of `y` is not specified.

I don't think there's any other text in the spec that requires evaluation of a function call to within an expression to be handled atomically with respect to other expressions either.

@griesemer and I agree only 0 or 2 should be allowed (i.e., 1 should not be allowed), but that the spec could be clearer about this.

```
package main

func main() {
	x, _ := g()
	println(x)
}

func g() (int, int) {
	p := new(int)
	return *p, f(p)
}

func f(p *int) int {
	*p = 1
	*p = 2
	return 0
}
```
Repository: TypeScript
Issue: Experiment with pre-allocated collections
Labels: Needs Investigation,Domain: Performance,Rescheduled

In some (many?) places, we know in advance how big the array we're building will be but, to keep it packed (vs sparse), we have to push elements one at a time and let the array grow in chunks, generating a bunch of garbage.  We hypothesize that allocating the correct size up-front will save us a bunch of GC time.

With maps, we less commonly know the final size, but we want to experiment with giving them capacity 1 (rather than the default, 4) in cases where this is the most common size.  (Something about symbols?  Maybe most aren't merged?)

https://chromium-review.googlesource.com/c/v8/v8/+/3122568
https://chromium-review.googlesource.com/c/v8/v8/+/3122502

To play with this, we'll need to patch and build node locally.
Repository: angular
Issue: Improve "Circular dependency in DI" error output for better debugging
Labels: feature,hotlist: error messages,area: core,hotlist: google,core: di,feature: in backlog

Currently when there is a circular dependency in DI error is thrown, in some cases the framework just outputs the token, without the entire DI path, for example:

```
Error: NG0200: Circular dependency in DI detected for InjectionToken XYZ. Find more at http://go/ngerr/NG0200
```

Consider improving development experience by making sure full DI path is present in the output. There is a logic in [the throwCyclicDependencyError function](https://github.com/angular/angular/blob/master/packages/core/src/render3/errors_di.ts#L16) to output the path, but the path is not always provided (for ex. see [the R3Injector.hydrate function](https://github.com/angular/angular/blob/master/packages/core/src/di/r3_injector.ts#L413)).
Repository: vscode
Issue: Cannot connect to the extensions marketplace
Labels: bug,proxy

<!-- ⚠️⚠️ 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?: Yes/No

<!-- 🪓 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:
- OS Version:

Steps to Reproduce:

i updated my vscode to version 1.59.0 and cannot connect to the extension

![net err](https://user-images.githubusercontent.com/63897321/131598197-8769b9e6-5550-4a66-9cda-74ff2444858e.PNG)
![after update](https://user-images.githubusercontent.com/63897321/131598202-b4cece1f-d191-4a69-a99e-3a654681a4d9.PNG)
![before update](https://user-images.githubusercontent.com/63897321/131598205-203bb7c0-3fc5-43a3-ba87-d869f8b46044.PNG)
![extension err](https://user-images.githubusercontent.com/63897321/131598210-44e8ae21-285d-4088-8d92-73bd77c8826e.PNG)
Repository: go
Issue: archive/zip: Reader.Open lies about directory fs.FileMode
Labels: NeedsInvestigation

<!--
Please answer these questions before submitting your issue. Thanks!
For questions please use one of our forums: https://github.com/golang/go/wiki/Questions
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.17 linux/amd64
</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="amd64"
GOBIN=""
GOCACHE="/home/user/.cache/go-build"
GOENV="/home/user/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/user/go/pkg/mod"
GOOS="linux"
GOPATH="/home/user/go"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.17"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2958766942=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

https://play.golang.org/p/-MVV8qRhxxC roughly:
```go
r, _ := NewReader(b, len)
f, _ := r.Open("path/to/dir")
s, _ := f.Stat()
fmt.Print(s.Mode())
```


### What did you expect to see?
`drw-rw-rw-` (as derived from `zip.File.FileHeader.Mode()`)

### What did you see instead?
`dr-xr-xr-x`

### Additional context?
It appears that the implementation of `Reader.Open`, specifically `fileListEntry.Mode`, instead of returning the actual mode contained in `fileListEntry.file.FileHeader.Mode`, will returns a hardcoded `fs.FileMode`:
```go
package zip // import "archive/zip"

func (f *fileListEntry) Mode() fs.FileMode { return fs.ModeDir | 0555 }
```
 I am guessing, but it seems like this was done since `fileListEntry.file` can be `nil` when the directory entry is synthetic, e.g. the zip contains a file without directory files leading to it, see #48084.

If we wanted to hit two birds with one stone, since this would be a clear signal that "the directory file is missing", I think it would be reasonable to: (though it is a breaking change)
```go
package zip // import "archive/zip"

func (f *fileListEntry) Mode() fs.FileMode {
        if f.file == nil {
                return 0
        }
        return f.file.FileHeader.Mode
}
```
Repository: pytorch
Issue: When compiling TAG 1.9.0 or master for android，An error occurred and the compilation failed！ABIS_LIST=arm64-v8a
Labels: module: android,oncall: mobile

third_party/XNNPACK/src/qc8-gemm/gen/1x8c4-minmax-fp32-neondot.c:65:18: error: assigning to 'int32x4_t' (vector of 4 'int32_t' values) from incompatible type 'int'
      vacc0x0123 = vdotq_lane_s32(vacc0x0123, vb0123x0123, va0x01234567, 0);

XNNPACK/src/qc8-gemm/gen/1x8c4-minmax-fp32-neondot.c:66:18: error: assigning to 'int32x4_t' (vector of 4 'int32_t' values) from incompatible type 'int'




ABIS_LIST=arm64-v8a      ERROR
ABIS_LIST=x86                   OK

Error only when compiling arm64-v8a

My NDK is：android-ndk-r18b
Repository: pytorch
Issue: How to add nan value judgment for variable t0_1 in fused_clamp kernel generated by torch/csrc/jit/tensorexpr/cuda_codegen.cpp.
Labels: oncall: jit

For this python program:

```import torch

torch._C._jit_set_profiling_executor(True)
torch._C._jit_set_profiling_mode(True)
torch._C._jit_override_can_fuse_on_cpu(True)
torch._C._jit_override_can_fuse_on_gpu(True)
torch._C._debug_set_fusion_group_inlining(False)
torch._C._jit_set_texpr_fuser_enabled(True)

def func2(a, b):
    return torch.clamp(a + b, min=0, max=2)

device = 'cuda'
a = torch.randn(4, 4, dtype=torch.float, device=device, requires_grad=True)
nan = torch.tensor(float('nan'), dtype=torch.float, device=device)

scripted_fn = torch.jit.script(func2)
script_outputs = scripted_fn(a,nan)
opt_script_outputs = scripted_fn(a,nan)

print(script_outputs.detach().cpu())
print(opt_script_outputs.detach().cpu())
```

this program will call 2 cuda kernel:
clamp_kernel_cuda is show as follow,

```
void clamp_kernel_cuda(TensorIterator& iter, Scalar min_value, Scalar max_value) {
  AT_DISPATCH_ALL_TYPES_AND2(kHalf, kBFloat16, iter.dtype(), "clamp_cuda", [&]() {
    auto lower = min_value.to<scalar_t>();
    auto upper = max_value.to<scalar_t>();
    gpu_kernel(iter, [=]GPU_LAMBDA(scalar_t v) -> scalar_t {
      // Propagate nan, which doesn't propagate automatically for ROCm
      if (_isnan(v)) {
        return v;
      } else {
        return ::min(::max(v, lower), upper);
      }
    });
  });
}
```
and jit codegen kernel is show as follow,

```
extern "C" __global__
void fused_clamp(float* t0, float* aten_clamp) 
{
  if (512 * blockIdx.x + threadIdx.x<16 ? 1 : 0) {
    float t0_1 = t0[512 * blockIdx.x + threadIdx.x];
    aten_clamp[512 * blockIdx.x + threadIdx.x] = (t0_1<0.f ? 0.f : t0_1)>2.f ? 2.f : (t0_1<0.f ? 0.f : t0_1);
    }
  }
}
```
My question is why not to add nan value judgment for variable t0_1, expect generated kernel is show as follows,

```
extern "C" __global__
void fused_clamp(float* t0, float* aten_clamp) 
{
  if (512 * blockIdx.x + threadIdx.x<16 ? 1 : 0) {
    float t0_1 = t0[512 * blockIdx.x + threadIdx.x];
    aten_clamp[512 * blockIdx.x + threadIdx.x] = isnan(t0_1) ? t0_1 : ((t0_1<0.f ? 0.f : t0_1)>2.f ? 2.f : (t0_1<0.f ? 0.f : t0_1));
    }
  }
}
```
For AMD device(ROCM), if not nan value judgment, fused_clamp kernel will return 0 without nan. If we want to generate fused_clamp kernel as above, how to modify code in torch/csrc/jit/tensorexpr/kernel.cpp:979, 
```

```
Repository: godot
Issue: Godot Mono C#: Can't access SQLite database file that is inside a .pck/.apk, once exported
Labels: bug,platform:android,topic:porting,needs testing,topic:dotnet

### Godot version

Godot Engine v3.3.3.stable.mono.official

### System information

Windows 10, OpenGL ES 3.0 Renderer: GeForce GTX 1050/PCIe/SSE2

### Issue description

I have a Godot Mono C# project with a functioning Sqlite database in the root directory (res://database.db). I can read and write from it as long as I don't export the project. But one I export it the app just crashes because it can't find the database.db file. 

I think it's more of a missing feature than a bug, because I can't tell C# to look in a path like "res://database.db". I can only use the relative root path which is "database.db". Which works fine so long as I don't export. Once I export, I need to manually copy database.db, System.Data.SqQlite.dll, and SQLite.Interop.dll to the resulting export directory. This being a procedure that I can't do for android exports.

### Steps to reproduce

1. Add database.db file to the root directory (res://database.db)
2. Add System.Data.SqQlite.dll and SQLite.Interop.dll to the root directory as well.

> 3. Running the game without  exporting results in successful SQLite communication.

4. Specify database.db as a non-resource file to include under Export>Resources
5. Export the project to windows.

> 6. The files are included in the .pck file but the application crashes, I think because it can't find the database.

### Minimal reproduction project

[SQLiteTest.zip](https://github.com/godotengine/godot/files/7088081/SQLiteTest.zip)
Repository: rust
Issue: Unused function in size-optimized asm
Labels: C-bug,I-heavy

<!--
Thank you for filing a bug report! 🐛 Please provide a short summary of the bug,
along with any information you feel relevant to replicating the bug.
-->

I tried this code https://godbolt.org/z/6oTTE84nz with 

```rust
#[derive(PartialEq, Eq)]
pub enum A{
    Big([u8; 1]),
    Small
}

pub fn test(a: A) -> bool {
    a == A::Small
}

```

I expected to see this happen: under size opt (-Copt-level=z) the unused `spec_eq` function is eliminated. Since code size is a motivation for that opt level, I would expect unused functions to get eliminated.

```asm
<T as core::array::equality::SpecArrayEq<U,_>>::spec_eq:
        mov     al, byte ptr [rdi]
        cmp     al, byte ptr [rsi]
        sete    al
        ret

example::test:
        cmp     dil, 1
        sete    al
        ret
```

Instead, this happened: `spec_eq` is present with opt levels `s`and `z`. 

It is however removed with levels `2` and `3`.

### 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.56.0-nightly (5eacec9ec 2021-08-28)
binary: rustc
commit-hash: 5eacec9ec7e112a0de1011519a57c45586d58414
commit-date: 2021-08-28
host: x86_64-unknown-linux-gnu
release: 1.56.0-nightly
LLVM version: 13.0.0
```