sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: TypeScript
Issue: Allow for dropping tsconfig.json in arbitrary folder and specifying the source root with tsc command 
Labels: Suggestion,Awaiting More Feedback

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Please read the FAQ first, especially the "Common Feature Requests" section.

-->

## Search Terms
1. tsconfig.json 
1. TS18003
1. project root
<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->

## Suggestion
I have been deving an automation publish tool, with typescript inside. Nice work for you!

Since the tsconfig.json file need to be put in a center config folder other than project/source code root. amd i have tried to use `tsc --watch --project path-to-tsconfig.json`  to make this future, which is not working for now. 

I got `TS18003` error, and i know why this happen: tsc just want to remind us we may have a wrong include or exclude config. 😄 I cannot find any tsc command should i use to conject with `--project` option to specify the project root.

I find in the tsc sourcecode that the `compiler.parseJsonConfigFileContent(_, _, basePath);` function could let us specify the project basePath when parsing tsconfig.json, so, i want to ask if we can expose a command option to let use the same function as basePath, maybe `--configFileBasePath` or `--configContext`?

Please let me know if there already is a solution for my use case. 

Thank you for your works!

<!-- A summary of what you'd like to see added or changed -->


## Examples

<!-- Show how this would be used and what the behavior would be -->
`tsc --project path-to-tsconfig.json --configContext path-to-source-code-root`

## Checklist

My suggestion meets these guidelines:
* [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. new expression-level syntax)
Repository: angular
Issue: bug(animations): Element rendered twice when animated
Labels: type: bug/fix,area: animations,freq2: medium,P4

<!--
PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.

ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION.
-->

## I'm submitting a...
<!-- Check one of the following options with "x" -->
<pre><code>
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  <!-- Please search GitHub for a similar issue or PR before submitting -->
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
[ ] Other... Please describe:
</code></pre>

## Current behavior
<!-- Describe how the issue manifests. -->


## Expected behavior
<!-- Describe what the desired behavior would be. -->


## Minimal reproduction of the problem with instructions
When triggering an animation of an element shown with `*ngIf` while an animation is already running, the element is rendered twice:
<img width="419" alt="bildschirmfoto 2018-09-27 um 12 31 37" src="https://user-images.githubusercontent.com/5589029/46140843-84727300-c252-11e8-90ba-caf24f9b915f.png">
The pink and the blue box should only be shown once. This happens when hitting the toggle button multiple times in the following example: [angular 7.0.0-beta.7](https://stackblitz.com/edit/angular-gitter-swjfyh?file=app/app.component.html)

This also occurs with angular 6.1.9: [angular 6.1.9](https://stackblitz.com/edit/angular-gitter-agjbr7?file=app%2Fapp.component.html)

This issue seems related to https://github.com/angular/angular/issues/23302

Note: at no time there exists more than one component instance, see this example: https://stackblitz.com/edit/angular-gitter-dp3cub
<img width="464" alt="bildschirmfoto 2018-09-27 um 12 58 12" src="https://user-images.githubusercontent.com/5589029/46141913-9a356780-c255-11e8-9fc9-dff38caeb0ba.png">


## What is the motivation / use case for changing the behavior?
It's a bug


## Environment

<pre><code>
Angular version: 7.0.0-beta.7
<!-- Check whether this is still an issue in the most recent Angular version -->

Browser:
- [x] Chrome (desktop) version 68
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [x] Firefox version 62
- [x] Safari (desktop) version 12
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
</code></pre>
Repository: pytorch
Issue: [caffe2] How to set different learning rates for different layers?
Labels: caffe2

Hi, I would like to ask a question that how to set different learning rates for different layers in Caffe2. Who can provide some examples of this? Thanks in advance.
Repository: TypeScript
Issue: Allow to explicitly pass type parameters via JSDoc
Labels: Suggestion,In Discussion,Domain: JSDoc,checkJs,Domain: JavaScript

## Search Terms

jsdoc generics type parameters constraints

## Suggestion

It seems like it is not possible via JSDoc to explicitly tell compiler which type parameters to pass to a generic function.

## Use Cases

In TypeScript it is possible to explicitly pass type parameters such as `mongoose.model<Model, Schema>('modelName', Schema)` while I could not find a way to do same with JSDoc.

## Examples

`mongoose.model` has two signatures, first one with one type parameter and the other with two. To make use of the second signature we must pass types explicitly.

```ts
export function model<T extends Document>(
  name: string,
  schema?: Schema,
  collection?: string,
  skipInit?: boolean
): Model<T>;

export function model<T extends Document, U extends Model<T>>(
  name: string,
  schema?: Schema,
  collection?: string,
  skipInit?: boolean
): U;
```
```ts
//  Choose second signature in typescript.
const model = mongoose.model<Model, Schema>('modelName', Schema);

// With JSDoc, compiler always chooses first signature and we receive a type mismatch error.
/** @type {Schema & mongoose.Model<Model>} */
const model = mongoose.model('modelName', Schema);

// But something like this would be great.
const model = mongoose.model/**<Model, Schema>*/('modelName', Schema);
```

My apologies if this is already possible, but I've spend almost a week battling this.

Related: https://github.com/Microsoft/TypeScript-Node-Starter/issues/101

## Checklist

My suggestion meets these guidelines:
* [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. new expression-level syntax)
Repository: go
Issue: proposal: spec: define identifiers to be NFKC-normalized 
Labels: LanguageChange,Proposal,LanguageChangeReview

**Background**

Go 1 allows Unicode letters as part of identifiers.
Normally that's quite useful, but sometimes it can lead to confusion: some letters look like _and are acceptable substitutes for_ other similar letters.¹

For example, in [this code snippet](
https://play.golang.org/p/RxwYEczV4uM), the declared identifier is U+00B5 (MICRO SIGN), which is `AltGr+m` on the Linux `altgr-intl` layout, while its use is U+03BC (GREEK SMALL LETTER MU), which is on the long-press menu for the `π` key on the Google [Gboard](https://play.google.com/store/apps/details?id=com.google.android.inputmethod.latin&hl=en_US) on-screen keyboard for Android and iOS.

Fortunately, the Unicode standard defines a number of [normalization forms](http://unicode.org/reports/tr15/) that are intended to smooth out these differences. As it happens, `µ` and `μ` are equivalent under the “compatibility” forms NFKC and NFKD.

**Proposal**

I propose that in Go 2, identifiers with the same NFKC normal form (with [identifier modifications](http://unicode.org/reports/tr31/#NFKC_Modifications)) should be considered the same identifier, and `gofmt` should automatically rewrite all identifiers within a program to their normal forms.

**Compatibility**

This change is not strictly Go 1 compatible: a Go 1 program may, for example, define and use distinct variables named `µ` and `μ` in the same scope. I argue that such programs are confusing at best, and actively misleading at worst, so the only programs that would break under this proposal should be fixed regardless of it.

----

(CC @mpvl @griesemer @robpike)

¹ In the example here, U+03BC is preferred over U+00B5: see https://unicode.org/reports/tr25/.

----

Revisions to this proposal:
* Changed to apply the tr31 NFKC modifications for identifiers.
Repository: godot
Issue: A lot of errors after delete folder with Script and Node
Labels: bug,topic:editor,confirmed

**Godot version:**
3.1 8fc92ae


**OS/device including version:**
Windows 10 


**Issue description:**
After deleting folder with script and node, godot shows a lot of errors and after trying to run Scene, editor show more errors and close game. There are errors:
```
 ERROR: load_source_code: Condition ' err ' is true. returned: err
   At: modules/gdscript/gdscript.cpp:796
ERROR: load: Condition ' err != OK ' is true. returned: RES()
   At: modules/gdscript/gdscript.cpp:2122
ERROR: Failed loading resource: res://aa/Node2D.gd
   At: core/io/resource_loader.cpp:192
ERROR: poll: res://Node2D.tscn:3 - Parse Error: [ext_resource] referenced nonexistent resource at: res://aa/Node2D.gd
   At: scene/resources/scene_format_text.cpp:439
ERROR: load: Condition ' err != OK ' is true. returned: RES()
   At: core/io/resource_loader.cpp:155
ERROR: Failed loading scene: res://Node2D.tscn
   At: main/main.cpp:1704
ERROR: _get_socket_error: Socket error: 10054
   At: drivers/unix/net_socket_posix.cpp:195
WARNING: cleanup: ObjectDB Instances still exist!
     At: core/object.cpp:2081
ERROR: Failed to get modified time for: C:/Users/rafal/PR/Projekty/qwer/aa/Node2D.gd
   At: drivers/windows/file_access_windows.cpp:306
ERROR: _reload_scripts: Condition ' !rel_script.is_valid() ' is true. Continuing..:
   At: editor/plugins/script_editor_plugin.cpp:728
```

**Steps to reproduce:**
1. Create Node  and save it in folder
2. Attach new script to node and save it in same folder
3. Save this scene/node
4. Delete this folder
5. Save Node
6. Try to run project

Video: https://streamable.com/4gjd8
Repository: go
Issue: cmd/go: ensure that 'go mod tidy' and `go get -u` do not introduce ambiguous imports
Labels: NeedsDecision,early-in-cycle,modules

As noted in https://github.com/golang/go/issues/27858#issuecomment-425089484, when a package is moved between two modules that share one of the complete module paths as a prefix, each needs to `require` some baseline version of the other, for two reasons:

1. To ensure that `go get -u` doesn't drop any needed packages.

2. To ensure that any third module that depends on both of the common-prefix modules will always end up in a configuration that provides only one copy of each package.

It would be really unfortunate if moving a package meant that you could never run `go mod tidy` the involved modules again, or that you have to apply some manual edit every time you run it.

We should either modify `go mod tidy` to avoid dropping requirements that are involved in a cycle with the main module, or add some explicit annotation comment to tell it not to drop an apparently-unnecessary requirement.
Repository: godot
Issue: Add "rename_dependencies" to ResourceLoader
Labels: enhancement,topic:editor

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:** 3.0.6
<!-- Specify commit hash if non-official. -->

**Issue description:**
<!-- What happened, and what was expected. -->

Hey there, I'm trying to make a script that automates the process of **fixing dependencies**. Currently we have this available only using the interface, right? It's a very tedious job, especially if we have a lot of assets that we use through many projects. I dug into how this works in the Editor itself and I found that it uses [dependency_editor.cpp](https://github.com/godotengine/godot/blob/master/editor/dependency_editor.cpp#L69). There I found the logic of how it worked, and I made a simple script that does it as well. Until there everything was OK. But I reached the deadend when I was finally fixing the dependencies: Currently there is no easy way to reproduce the [`resource_loader.rename_dependencies`](https://github.com/godotengine/godot/blob/master/core/io/resource_loader.cpp#L434). This is not available to us, users. So I think it would be a good thing to make this method available in the `ResourceLoader` class that we can access in Godot.
Repository: go
Issue: cmd/go: 'go mod why' should have an answer for every module in 'go list -m all'
Labels: NeedsFix,FeatureRequest,modules

Currently, if you run `go mod why -m` on the output of every module in `go list -m all`, some modules may come back with the answer `(main module does not need module […])`, even after a `go mod tidy`.

The reason is that the module graph is conservative: `go list -m all` answers the question “which module versions are implied by the requirements of the main module?”, not “which modules does the main module need to download to complete `go list all`?”.¹

In contrast, `go mod why` explicitly ties its answer to `go list all`.

We should have some flag to `go mod why` to answer the related `go list -m all` question, “what path of requirements imposes the version requirement on module `x`?”

----

¹The command to answer the latter question, as it turns out, is:
```
go list -f '{{with .Module}}{{.Path}} {{.Version}}{{end}}' all | sort -u
```
Repository: go
Issue: testing: No way to view untruncated output from benchmarks
Labels: NeedsDecision

### What version of Go are you using (`go version`)?
```
go version go1.10.3 linux/amd64
```

### Does this issue reproduce with the latest release?
Unknown, but the documentation has not changed.

### What operating system and processor architecture are you using (`go env`)?
```
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/barts/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/barts/go"
GORACE=""
GOROOT="/usr/lib/go-1.10"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go-1.10/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
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-build014311929=/tmp/go-build -gno-record-gcc-switches"
```

### What did you do?
I'm running a benchmark with the verbose flag turned on (`go test -bench . -v`) that calls `b.Logf()` multiple times.

### What did you expect to see?
All logging output, like with tests.

### What did you see instead?
The first few log calls, followed by `... [output truncated]`)
Repository: node
Issue: connection reset when using https server/client combi without keepalive
Labels: help wanted,tls,https,windows

<!--
Thank you for reporting a possible bug in Node.js.

Please fill in as much of the template below as you can.

Version: output of `node -v`
Platform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows)
Subsystem: if known, please specify the affected core module name

If possible, please provide code that demonstrates the problem, keeping it as
simple and free of external dependencies as you can.
-->

* **Version**: 10.11.0, 10.5.0
* **Platform**: Windows 10. Version 1803, build 17134.286
* **Subsystem**: https

<!-- Please provide more details below this comment. -->
We noticed that there are unexpected RST packages when inspecting the connection with Wireshark.
This are our findings for now:
 
- It does not happen when 'keepalive' is set to true.  
- It does not happen with http instead of https
- It does not happen when using the client, e.g. to connect with google.com
- it does not happen when using curl to connect with the server.
- it does not happen if the server is running in the Linux environment

Node does not trigger any error event. Data transfer goes well, but the connection is not closed correctly. The connection ends with:
client -> server: ACK
server -> client: FIN, ACK
client -> server: ACK
TLSv1.2: Encrypted Alert
server -> Client: RST, ACK

Test code:
client: 
```
const https = require("https");
const options = {
	hostname: "localhost",
	port: 8000,
	rejectUnauthorized: false,
	agent: new https.Agent({ 
		keepAlive: false // bug will not happen if set on 'true' 
	})
};
const req = https.request(options, (res) => {
	res.on("data", (data) => {
		//
	});
	res.on("close", () => {
		console.log("response closed");
	});
});
req.end()
```
Server: 
```
const https = require("https");
https.createServer({
	// add cert and key
}, (req, res) => {
	res.statusCode = 200;
	res.end("hello world\n");
}).listen(8000);
```
Repository: rust
Issue: Inaccurate lifetime mismatch diagnostic text when involving match
Labels: C-enhancement,A-diagnostics,T-compiler

```
error[E0623]: lifetime mismatch
   --> bend/crates/sac/src/bin/bin.rs:281:34
    |
277 |     fn deep_or(&self, other: &Self) -> Self {
    |                -----         -----
    |                |
    |                these two types are declared with different lifetimes...
...
281 |             (val, None) | (None, val) => val.clone(),
    |                                  ^^^ ...but data from `self` flows into `other` here
```
Repository: rust
Issue: suggesting for traits do not search the "prelude crates"
Labels: C-enhancement,A-lints,A-diagnostics,T-compiler,A-edition-2018

As [shown in this test case](https://github.com/rust-lang/rust/pull/54603#discussion_r221025575), if you have a crate in the prelude, but you have not imports its trait, and you try to use its methods, you don't get any nice suggestions. This is a shame!

cc @davidtwco
Repository: vue
Issue: Check if tag is already in the window.customElements registry on top of checking config ignoredElements
Labels: feature request,improvement

### What problem does this feature solve?
When Vue is mounting, the function `isUnknownElement` is called and checks, among others, whether the element tag is in the list of `ignoredElements`. In the context of an app that uses multiple web components, we don't want to manually add every new component's tag to the `ignoredElements` list. Maintaining that list could quickly become a headache. If the  `isUnknownElement` also checks the custom elements registry, it could figure out that the element in question is not necessarily unknown.

### What does the proposed API look like?
The API would stay the same, but on top of checking for `config.ignoredElements` in the function `isUnknownElement`, we would also check if `window.customElements.get(vnode.tag)` is defined or not. If it is defined, then we return false.

I am happy to submit a pull request, I just wanted to discuss this first to make sure there aren't design constraints to adding something like this.

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: go
Issue: net/mail: Provide Address.String() alternative which only converts to RFC 5322 and does not encode as RFC 2047
Labels: NeedsDecision,FeatureRequest

The `Address.String()` method sometimes encodes as RFC 2047 after the 5322 formatting depending on the characters in the address. However some services (Ala sparkpost transmission api header fields) want RFC 5322 formatted addresses in UTF8 and not encoded as RFC 2047.


I'm not sure if the [quoting](
I don't think you can easily or safely reverse the 2047 encoding via the mime package because the code has two paths for quoting.
I think you'd want a `String()` method which basically returned before [this](https://github.com/golang/go/blob/master/src/net/mail/message.go#L222).) is a part of rfc 2047 or not.


I know this isn't required to the use the api but I'm wondering if there are any other use case which wouldn't require RFC 2047 encoding as well. If so it might be worthwhile to add an additional string/format function.
Repository: go
Issue: x/tools/go/packages: can't distinguish dynamically-generated sources from checked-in ones
Labels: NeedsInvestigation,Tools,Refactoring

When using `go list -test`, we can distinguish user-provided sources from generated ones based on whether the paths are absolute, as documented [here](https://golang.org/cmd/go/#hdr-List_packages_or_modules) (emphasis mine):

> By default, the lists **GoFiles, CgoFiles, and so on hold names of files in Dir** (that is, paths **relative to Dir**, not absolute paths). The **generated files** added when using the -compiled and -test flags **are absolute paths** referring to cached copies of generated Go source files. Although they are Go source files, the paths may not end in ".go".

Unfortunately, `golang.org/x/tools/go/packages` removes that distinction by making all of the `GoFiles` it returns absolute, without apparently preserving enough information to undo that transformation. That makes it very difficult to use `go/packages` to write tools that transform or otherwise refactor user-provided source code, such as the one in [CL 137076](https://golang.org/cl/137076).

CC @matloob @alandonovan @ianthehat @rsc
Repository: go
Issue: x/tools/go/packages: no way to easily distinguish the test version of the package from the real one
Labels: NeedsInvestigation,Tools

When `Config.Test` is set to `true`, `packages.Load` may return multiple `Package` instances with the same `PkgPath`.

`go list` encodes the information about which package is which redundantly: both in the `ForTest` field and *also* in the reported `ImportPath` for test variants.

`go/packages` strips out the `ImportPath` annotations, but *also* fails to propagate the `ForTest` field. As a result, the only way to distinguish the two packages is by checking which one's `GoFiles` are a superset of the other's. That works most of the time, but I suspect it will fail in some cases (for example, when `b` imports `a` and `a_test` imports `b`, the test version of `b` for `a_test` is compile with exactly the same sources as the non-test copy of `b`).

CC: @matloob @alandonovan @ianthehat
Repository: pytorch
Issue: Misleading step method in lr_scheduler.ReduceLROnPlateau
Labels: todo,module: optimizer,triaged

Since ReduceLROnPlateau takes an optimizer as argument, one can reasonably assume that it wraps the optimizer and the step method from the ReduceLROnPlateau object will actually call the step method of the optimizer. 

Alternatives:
<li>put a warning in the documentation: <i>"the optimizer's parameters are not going to be updated"</i>
<li>put an example with an <i>optimizer.step()</i> call in the documentation
<li>change the step method name, why not <i>update</i> ?
<li>implement a <i>optimizer_step</i> method to explicitly allow the user to call the optimizer step method from the ReduceLROnPlateau object</li><br/>


cc @vincentqb