sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: cmd/go: support a -C flag value to not use any current directory
Labels: help wanted,Proposal,Proposal-Accepted,GoCommand,Tools

`cmd/go` uses the current directory for a number of things:

* Walking parent directories to find the current module
* Walking parent directories to find the current workspace
* Resolving relative package paths, like `.` or `./foo`

However, in some cases, we do not need any of those. For example:

* When querying global config settings, like `go env -json GOROOT GOCACHE GOPROXY`
* When querying the default build context, like `go list -f={{context.ReleaseTags}} runtime`
* When querying information about the standard library, like `go list -json runtime`

On one hand, finding the current module and workspace for these three commands is wasteful. On the other, it can be actively harmful. For example, if the current directory or any of its parents has a `go.mod` with broken syntax, then any of the three commands above may fail. In our fork of `cmd/go/script_test.go`, we had to make calls like these inside a temporary directory to work around the problem: https://github.com/rogpeppe/go-internal/pull/188

Using a temporary directory is also far from ideal. It still walks the parent directories, which is still wasteful. And it could still break in some (hopefully rare) edge cases, like if `/tmp/go.mod` existed and had broken syntax.

One possible solution would be to manually turn off the search for "current module" and "current workspace". For the latter, it seems that we can use `GOWORK=off`. For the former, I don't seem to be able to find an "off" setting. There's `GO111MODULE=off`, but I don't _really_ want GOPATH mode either, and I believe this mode will disappear at some point anyway.

Moreover, turning off the search for these two files may be enough today, but in the future cmd/go may use the current directory to look for more files, just like `go.work` was introduced recently. So I really want a general option to mean "do not use the current directory to alter your behavior in any way".

Luckily, in https://github.com/golang/go/issues/50332 we gained a global "chdir" option. I propose that it gain a special value, `-C=off`, to mean just that. The process would still have a current directory, and it would still make direct accesses to the filesystem (e.g. to look inside `GOROOT` or to read the `GOENV` file), but any major feature relying on the current directory would be disabled or fail. For example:

* There would never be a current or main module
* There would never be a current or main workspace
* Relative package paths, like `go list .` or `go list ./foo`, would fail

I realise that this is likely a complex set of changes for the innards of `cmd/go`, as the current directory is likely used in many places. I also realise that it likely does not make sense to use some commands like `go build -C=off`. So perhaps we could start by only supporting this mode in `go env` and `go list`: two commands often used by Go tools to get the information they need.

cc @myitcv @rogpeppe
Repository: go
Issue: debug/gosym: report different line number than cmd/addr2line
Labels: NeedsInvestigation,compiler/runtime

<!--
Please answer these questions before submitting your issue. Thanks!
-->

### What version of Go are you using (`go version`)?

<pre>
$ go version
go1.18.8
</pre>

### What operating system and processor architecture are you using (`go env`)?

<details><summary><code>go env</code></summary><br><pre>
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOENV="/root/.config/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/root/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/root/go"
GOPRIVATE=""
GOPROXY="https://goproxy.cn"
GOROOT="/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/go/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.18.8"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/root/go.mod"
GOWORK=""
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-build4192850700=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?
get pprof:
```
curl pprof 127.0.0.1:8887/debug/pprof/profile?seconds=1
```
open it with pprof raw:
```
  793: 0x410ab7 M=1 runtime.nextFreeFast /usr/local/go1.18/go/src/runtime/malloc.go:850 s=0
             runtime.mallocgc /usr/local/go1.18/go/src/runtime/malloc.go:1083 s=0
Mappings
1: 0x400000/0x99c2000/0x0 /home/data/server/otel-collector/data/otelcol-contrib 0bfdbe13c5603e284aed96d5ad62f47eea0cb692 [FN]
```

use debug/gosym to get  funcname and line:
```
func parse(file string, f *elf.File) (*elf.File, *gosym.Table) {
	pclndat, err := f.Section(".gopclntab").Data()
	if err != nil {
		f.Close()
		log.Fatalf("reading %s gopclntab: %v", file, err)
	}

	pcln := gosym.NewLineTable(pclndat, f.Section(".text").Addr)
	tab, err := gosym.NewTable(nil, pcln)
	if err != nil {
		f.Close()
		log.Fatalf("parsing %s gosymtab: %v", file, err)
	}

	return f, tab
}
```

### What did you expect to see?
with same address, the debug/gosym  should have same line number compared with go tool addr2line.

use go tool addr2line to get funcname and line:
```
[root@plat-sh-infra-prod-jaeger-collector003 ~]#  /go/bin/go tool addr2line /home/data/server/otel-collector/data/otelcol-contrib
410ab7
runtime.mallocgc
/usr/local/go1.18/go/src/runtime/malloc.go:850
```
### What did you see instead?
 the debug/gosym   have different line number compared with go tool addr2line.

debug/gosym:
```
/usr/local/go1.18/go/src/runtime/malloc.go 1117
```

it's line number is 1117, not 850.
Repository: TypeScript
Issue: Declaration emit contains trivial local duplicates
Labels: Suggestion,Experimentation Needed

# Bug Report

<!--
  Please fill in each section completely. Thank you!
-->

### 🔎 Search Terms

`declaration emit` `dts` `inline` `inlining` `duplication`

### 🕗 Version & Regression Information

<!-- When did you start seeing this bug occur?

"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
  https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs

If possible, please try testing the nightly version of TS to see if it's already been fixed.
For npm: `typescript@next`
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly

Note: The TypeScript Playground can be used to try older versions of TypeScript.

Please keep and fill in the line that best applies:
-->

- This is the behavior in every version I tried

### ⏯ Playground Link

<!--
  A link to a TypeScript Playground "Share" link which shows this behavior

  The TypeScript Workbench can be used for more complex setups, try
  https://www.typescriptlang.org/dev/bug-workbench/

  As a last resort, you can link to a repo, but these will be slower for us to investigate.
-->
[Playground link with relevant code](https://www.typescriptlang.org/play?target=99&ts=5.0.0-dev.20221118#code/KYDwDg9gTgLgBAYwgOwM7wJJwLxwN4BQcxcA9AFTlElzlwAiECq1J5prcYUEYAXHBhQArsAIBfANwECoSLEQp0cDMgA2AS2TAAJjX3FcGabPDR4SNPACCmgIapdAmAE8wwCADMVOFZKA)

### 💻 Code

<!-- Please post the relevant code sample here as well-->
```ts
export const I = {
    /**
     * Docs
     */
    prop: true
};

export const Inlined           = I;
export const Aliased: typeof I = I;
```

### 🙁 Actual behavior

Declaration emit contains a duplicated type.

```ts
export declare const I: {
    /**
     * Docs
     */
    prop: boolean;
};
export declare const Inlined: {
    /**
     * Docs
     */
    prop: boolean;
};
export declare const Aliased: typeof I;
```

### 🙂 Expected behavior

Declaration emit should reference the original via an alias.

```ts
export declare const I: {
    /**
     * Docs
     */
    prop: boolean;
};
export declare const Inlined: typeof I;
export declare const Aliased: typeof I;
```

### Notes

I know this is working-as-expected so feel free to close immediately if there is no quick win in sight.

We've got a bunch of documentation that has bloated declarations because of this specific trivial intra-file variant of the more generalized duplication/inlining issue.  It happens when we do renames or migrations of types from one name to another and they need to be exported under separate names.  The workaround is to explicitly add the `typeof X` annotation but folk forget this.

The general solution long-term will be to go with `--isolatedDeclarations` and a completely different form of declaration emit, but in the short-term, and for folks that enjoy inference, maybe there's also a possibility to quickly fix up existing declaration emit for this specific case?
Repository: pytorch
Issue: When the torch.masked_select operator passes in the same parameters, it behaves differently on CPU and GPU.
Labels: triaged,module: masked operators

### 🐛 Describe the bug

Test on the CPU:

    import torch
    input = torch.rand([], dtype=torch.float64)
    out = torch.logcumsumexp(input, dim=1)
    print(out)

result: IndexError: Dimension out of range (expected to be in range of [-1, 0], but got 1)


Test on the CPU:

    import torch
    input = torch.rand([], dtype=torch.float64).cuda()
    out = torch.logcumsumexp(input, dim=1)
    print(out)

result: IndexError: tensor(0.4230, device='cuda:0', dtype=torch.float64)

When the torch.masked_select operator passes in the same parameters, it behaves differently on CPU and GPU.

### Versions

pytorch: 1.12.1
Python version: 3.8
CUDA/cuDNN version: cuDNN 11.3
GPU models and configuration: RTX3060
Operating System：Windows
Repository: pytorch
Issue: OSError: libcublas.so.11: cannot open shared object file: No such file or directory
Labels: module: binaries,triaged

### 🐛 Describe the bug

import torch

### Versions

python 3.10.6
torch==1.13.0
linux x86_64
posix

cc @seemethere @malfet @osalpekar @atalman @ezyang
Repository: pytorch
Issue: torch.floor_divide: The dividend of torch.floor_divide is set to 0, but it can still run on the GPU.
Labels: module: error checking,triaged

### 🐛 Describe the bug

Test on the GPU:

    import torch
    input = torch.randint(2, 8, [1, 8], dtype=torch.int64)
    other = 0
    out = torch.floor_divide(input, other)
    print(out)

result: RuntimeError: ZeroDivisionError


Test on the GPU:

    import torch
    input = torch.randint(2, 8, [1, 8], dtype=torch.int64).cuda()
    other = 0
    out = torch.floor_divide(input, other)
    print(out)

result: RuntimeError: tensor([[4294967295, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295, 4294967295]], device='cuda:0')

The dividend of torch.floor_divide is set to 0, but it can still run on the GPU.

### Versions

pytorch: 1.8
Python version: 3.8
CUDA/cuDNN version: cuDNN 11.3
GPU models and configuration: RTX3060
Operating System：Windows
Repository: godot
Issue: Function get_folded_lines() and is_line_folded() does not return the value if the line is folded
Labels: discussion,topic:editor,topic:gui

### Godot version

Godot 4 - beta 4

### System information

Macbook Pro (M1)

### Issue description

I'm updating a plugin that affects the code editor for the Godot, but the `get_folded_lines()` return the value only for the first line folded, but does not return the values for the other lines folded. And the function `is_line_folded()` does not return if the line if folded or not.

In the following example, lines 6~8 and 11~13 should be folded.

<img width="747" alt="Screenshot 2022-11-21 at 12 39 35" src="https://user-images.githubusercontent.com/30536099/203042896-af60667a-45ca-423a-ba31-e3213f06e36e.png">

But lines 5 and 10 are marked as folded. These are the initial lines, that hold the folded lines, but they are not hidden, just folded.

<img width="216" alt="Screenshot 2022-11-21 at 12 39 48" src="https://user-images.githubusercontent.com/30536099/203042915-dc361ce9-4ec6-41cf-ba48-cf2b125e7f7d.png">

I also tried to use the `is_line_hidden()` from the `TextEdit` class but looks like `CodeEdit` does not inherit this class anymore. Or does not have this method in this class.


### Steps to reproduce

1. Open the minimal project
2. Open the `testing.gd` script
3. Deactive and active the testing plugin
4. See the result in the output

### Minimal reproduction project

[folded_lines_minimal_project.zip](https://github.com/godotengine/godot/files/10056189/folded_lines_minimal_project.zip)
Repository: pytorch
Issue: torch.equal can still run successfully when the parameter types are different.
Labels: triaged,module: numpy,module: type promotion

### 🐛 Describe the bug

Test on the CPU:

    import torch
    input = torch.rand([5, 5], dtype=torch.float64)
    other = torch.rand([5, 5], dtype=torch.complex64)
    out = torch.equal(input, other)
    print(out)

result: RuntimeError: Expected object of scalar type double but got scalar type struct c10::complex<float> for argument 'other'


Test on the GPU:

    import torch
    input = torch.rand([5, 5], dtype=torch.float64).cuda()
    other = torch.rand([5, 5], dtype=torch.complex64).cuda()
    out = torch.equal(input, other)
    print(out)

result: False

Although the two parameters input and other of torch.equal are both of Tensor type, but input is of double type and other is of complex type, but when running on the GPU, it gets False. According to understanding, an exception should be thrown.




### Versions

pytorch: 1.8
Python version: 3.8
CUDA/cuDNN version: cuDNN 11.3
GPU models and configuration: RTX3060
Operating System：Windows

cc @mruberry @rgommers @nairbv
Repository: pytorch
Issue: Edge case: torch.baddbmm supports double x int8 x int8 inputs on CPU but not CUDA
Labels: triaged,module: type promotion,module: linear algebra,module: edge cases

### 🐛 Describe the bug


Test on the CPU:
          
              import torch
              input = torch.rand([], dtype=torch.float64)
              batch1 = torch.randint(-2, 128, [10, 3, 4], dtype=torch.int8)
              batch2 = torch.randint(-8, 128, [10, 4, 5], dtype=torch.int8)
              out = torch.baddbmm(input, batch1, batch2)
              print(out)
          
result:RuntimeError: expected scalar type Char but found Double
          

Test on the GPU:
          
              import torch
              input = torch.rand([], dtype=torch.float64).cuda()
              batch1 = torch.randint(-2, 128, [10, 3, 4], dtype=torch.int8).cuda()
              batch2 = torch.randint(-8, 128, [10, 4, 5], dtype=torch.int8).cuda()
              out = torch.baddbmm(input, batch1, batch2)
              print(out)

result: RuntimeError: expected scalar type Double but found Char


torch.baddbmm behaves differently in different pytorch versions. First, in pytorch1.8, the exceptions thrown by the CPU and GPU are completely opposite; 

### Versions

pytorch: 1.8
Python version: 3.8
CUDA/cuDNN version: cuDNN 11.3
GPU models and configuration: RTX3060
Operating System：Windows

cc @nairbv @mruberry @jianyuh @nikitaved @pearu @walterddr @IvanYashchuk @xwang233 @Lezcano
Repository: flutter
Issue: Building all integration test targets into a single application binary
Labels: a: tests,c: new feature,tool,customer: crowd,c: proposal,f: integration_test,P3,team-tool,triaged-tool

## Synopsis

Currently `flutter test integration_test` builds a new `.apk` (Android) / `.app` (iOS) for every integration test file. The problem with this approach is that it greatly slows down the development of integration tests and impedes developer/tester experience. As a Flutter developer, I'm used to the awesome `hot-{reload,restart}` feature and the incredibly fast iteration it allows for, and am disappointed that the experience of developing integration tests is very much subpar compared to the development of user code.

Another problem with the way `flutter test integration_test` works currently is the _inability to build integration tests once and then run them multiple times_ (because every integration test comes in a new app). This feature would be useful in detecting flaky tests faster, without the need to build the application binary every time before running the test file that hasn't been changed in the last N runs.

## Description

For example, let's say that our app has 3 integration tests:

```
integration_test
├── sign_up_test.dart
├── location_test.dart
└── sign_out_test.dart
```

Running `flutter test integration_test` builds the application 3 times, once for every integration test file:

```
  > sign_up_test.dart
    > Build app
    > Install app
    > Run app and execute tests
    > Kill app
    > Uninstall app
  > location_test.dart
    > Build app
    > Install app
    > Run app and execute tests
    > Kill app
    > Uninstall app
  > sign_out_test.dart
    > Build app
    > Install app
    > Run app and execute tests
    > Kill app
    > Uninstall app
```

This seems unnecessary because almost always, the only thing that differs between these applications is the integration test file, which is often 100-200 lines of code. 

Let me stress this: to apply a change of a 100-200 lines of _test_ code, users have to rebuild the whole application.

I think it'd be reasonable if running `flutter test integration_test` on the aforementioned application with 3 integration tests worked like this:

```
  > Build app (with all tests compiled into it)
  > Install app
  > Run app with sign_up_test.dart as main()
  > Clear app data
  > Run app with location_test.dart as main()
  > Clear app data
  > Run app with sign_out_test.dart as main()
  > Clear app data
  > No more tests to run, uninstall app
```


The idea for this issue comes from [this comment](https://github.com/flutter/flutter/issues/114541#issuecomment-1301094425) by @jonahwilliams.

Issues that seem to be related:
- #114541
- #108400
- #101296
- #76985

</details>

<details>
  <summary>Logs</summary>

```
$ flutter --version
Flutter 3.3.7 • channel stable • https://github.com/flutter/flutter.git
Framework • revision e99c9c7cd9 (3 weeks ago) • 2022-11-01 16:59:00 -0700
Engine • revision 857bd6b74c
Tools • Dart 2.18.4 • DevTools 2.15.0
```

</details>
Repository: pytorch
Issue: fx.wrap is ignored with make_fx proxy tensor tracer
Labels: triaged,module: fx

### 🐛 Describe the bug

`torch.fx.wrap` is used to create a "leaf function" that will be preserved as a `call_function` node in the FX trace instead of being
traced through. However, it works only with `torch.fx.symbolic_trace`.

```py
import torch
from torch.fx.experimental.proxy_tensor import make_fx

M = N = K = 32
a = torch.randn(M, K, device="cuda", dtype=torch.float16)
b = torch.randn(N, K, device="cuda", dtype=torch.float16)
bias = torch.randn(N, device="cuda", dtype=torch.float16)

@torch.fx.wrap # doesn't work with make_fx!
def my_gelu(x):
    return torch.nn.functional.gelu(x)

def func(a, b, bias):
    linear = torch.nn.functional.linear(a, b, bias=bias)
    y = my_gelu(linear)
    return y

gm = make_fx(func)(a, b, bias)
gm.graph.print_tabular()
# opcode         name    target              args              kwargs
# -------------  ------  ------------------  ----------------  --------
# placeholder    a_1     a_1                 ()                {}
# placeholder    b_1     b_1                 ()                {}
# placeholder    bias_1  bias_1              ()                {}
# call_function  t       aten.t.default      (b_1,)            {}
# call_function  addmm   aten.addmm.default  (bias_1, a_1, t)  {}
# call_function  gelu    aten.gelu.default   (addmm,)          {}  # Should be "my_gelu" function here!
# output         output  output              (gelu,)           {}
```

The current alternative to make `make_fx` not trace through custom functions is to create a custom `torch.library.Library` with `CompositeExplicitAutograd` dispatch key. This alternative is much more complicated than using `fx.wrap`.

### Versions

master branch.

cc @ezyang @SherlockNoMad @soumith @EikanWang @jgong5 @wenzhe-nrv
Repository: godot
Issue: PanoramaSky exhibits rendering artifacts on Android unless shader high float precision is enabled in GLES2
Labels: bug,platform:android,topic:rendering,topic:3d

### Godot version

3.5.1.stable

### System information

Linux. Both gles2 and gles3, gtx 1650 ti

### Issue description

Panorama Sky has artifacts on android export. I can reproduce artifacts on PC build if I enable mipmap in import. On android regardless of mipmap enabled or disabled artifacts shows up. Tested with fresh empty project with both gles2 and gles3. Not tested on iOS.

![Screenshot_2022-11-21-17-28-01-59_56224d0738a10b351314082da143caa1](https://user-images.githubusercontent.com/50569653/203051328-8a012cee-e146-49c6-b1fc-ea3ee0694837.jpg)
![Screenshot_2022-11-21-17-27-50-09_56224d0738a10b351314082da143caa1](https://user-images.githubusercontent.com/50569653/203051347-79a5ec2d-2c7a-4da3-91f1-42b6a803fdb5.jpg)
![Screenshot_2022-11-21-14-51-56-26_336c75996dcfb7c86b746b62071ccc9a](https://user-images.githubusercontent.com/50569653/203051361-e9087d0d-563d-442e-a189-12e6bd427776.jpg)


### Steps to reproduce

Create PanoramaSky and export to android.
For PC enable mipmap for panorama image in import settings and re-import.

### Minimal reproduction project

[panorama_test.zip](https://github.com/godotengine/godot/files/10056407/panorama_test.zip)
Repository: rust
Issue: Google does not seem to be indexing all pages on docs.rust-lang.org
Labels: A-docs

### Location

https://doc.rust-lang.org/nightly/nightly-rustc/rustc_lint/builtin/static.UNSAFE_OP_IN_UNSAFE_FN.html

### Summary

The `{{produces}}` tag is not replaced on this page like it is on https://doc.rust-lang.org/nightly/rustc/lints/listing/allowed-by-default.html#unsafe-op-in-unsafe-fn.

### Significance

The `rustc_lint::builtin::*` page is often the first hit on Google for the lint name (especially when written with underscores).

### Background

[Documentation for `{{produces}}`](https://github.com/rust-lang/rust/blob/736c675d2ab65bcde6554e1b73340c2dbc27c85a/compiler/rustc_lint_defs/src/lib.rs#L619-L623)

[Code that replaces for `{{produces}}`](https://github.com/rust-lang/rust/blob/736c675d2ab65bcde6554e1b73340c2dbc27c85a/src/tools/lint-docs/src/lib.rs#L275-L335)
Repository: flutter
Issue: Pass parameters to build tooling
Labels: c: new feature,tool,c: proposal,a: build,P3,team-tool,triaged-tool

<!-- Thank you for using Flutter!

     If you are looking for support, please check out our documentation
     or consider asking a question on Stack Overflow:
      * https://flutter.dev/
      * https://api.flutter.dev/
      * https://stackoverflow.com/questions/tagged/flutter?sort=frequent

     If you have found a bug or if our documentation doesn't have an answer
     to what you're looking for, then fill out the template below. Please read
     our guide to filing a bug first: https://flutter.dev/docs/resources/bug-reports
-->

## Steps to Reproduce

<!-- Please tell us exactly how to reproduce the problem you are running into. -->

Build https://aur.archlinux.org/packages/invoiceninja-desktop-git (or https://github.com/invoiceninja/admin-portal directly) with `flutter run`:

<img width="827" alt="image" src="https://user-images.githubusercontent.com/13354331/203054866-af60d579-9ffd-4280-9691-32ab9bbde7f5.png">

- I would like to get rid of the make warning, how can I pass `-Wno-dev` to make?
- Can I suppress the root warning? Since this is fakeroot, it does not matter.