sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: proposal: net/http: parser for netrc files
Labels: Proposal

There are two implementations of a netrc parser: one lives in src/cmd/go/internal/web2/web.go and the other one lives in x/tools/cmd/auth/netrcauth/netrcauth.go.

Apart from the fact that these two implementations may differ in how they parse the spec this is a useful piece of functionality written by people with a high degree of trust and it would be nice if this library could be imported from somewhere.
Repository: godot
Issue: Godot crashes when renaming an Audio file
Labels: bug,topic:editor,confirmed,topic:audio,topic:import,crash

Godot 3.1 stable, Windows 10.

If you attach an Audio file to an AudioStreamPlayer in a scene and then afterwards try to rename the audio file in the the FileSystem then Godot will crash. It does not matter if the scene is open or closed. In our case the audio file was an ogg file. 

We also tried testing this with a sprite node but this works as intended, so it might only be a problem with audio files.

To reproduce simply make:
- A new scene and add an AudioStreamPlayer.
- Attach an audio file and save the scene.
- Rename the audio file in the FileSystem

**Edit:** I did some more testing and I found out that this does not happen every time but almost every time. It happens both when the scene is open and closed but it seems to be happen more when it's open.

Edit 2: We also tried on Windows 8.1 but we were only able to reproduce the crash one time after a lot of renaming, so it might be worse on Windows 10 (but it's hard to say).
Repository: godot
Issue: Option to reorder variables in debug inspector
Labels: enhancement,topic:editor,usability

**Godot version:**
3.2 dev


**OS/device including version:**
The variable inspector for debugging has been quite limited and difficult to handle.

Besides the problem already reported in https://github.com/godotengine/godot/issues/26993, where it is not possible to keep a variable in the same position as the inspector during debugging, also, when there are many variables, they appear in the inspector in an apparently random order, that is, to find a variable in the inspector, one has to make a visual search, variable by variable, until finding the desired variable (and as already said above, all this is lost when debugging with F10 or F12) ...

![image](https://user-images.githubusercontent.com/11199752/55721025-ac4c4b80-59d8-11e9-997b-1c0f1fa557ef.png)

My suggestion: 
Allow variables to be **ordered alphabetically by name**, in ascending and descending order.
Also, a **search button** to find a variable name would be pretty cool.
Repository: rust
Issue: Functions with uninhabited return values codegen trap instead of unreachable
Labels: A-codegen,T-compiler

With https://github.com/rust-lang/rust/pull/59639, I would expect the following two functions to generate the same LLVM IR:
```rust
#[derive(Clone, Copy)]
pub enum EmptyEnum {}

#[no_mangle]
pub fn empty(x: &EmptyEnum) -> EmptyEnum {
    *x
}

#[no_mangle]
pub fn unreach(x: &EmptyEnum) -> EmptyEnum {
    unsafe { std::hint::unreachable_unchecked() }
}
```
However, [they do not](https://play.rust-lang.org/?version=nightly&mode=release&edition=2018&gist=ea23cb43f5e0270d834063df075c1495):
```
; playground::empty
; Function Attrs: noreturn nounwind nonlazybind uwtable
define void @_ZN10playground5empty17he3f416ff39576b93E(%EmptyEnum* noalias nocapture nonnull readonly align 1 %x) unnamed_addr #0 {
start:
  tail call void @llvm.trap()
  unreachable
}

; playground::unreach
; Function Attrs: norecurse noreturn nounwind nonlazybind readnone uwtable
define void @_ZN10playground7unreach17h416ea08edc51ffc9E(%EmptyEnum* noalias nocapture nonnull readonly align 1 %x) unnamed_addr #1 {
start:
  unreachable
}
```
Namely, `empty` triggers a well-defined trap while `unreach` causes UB.

That this makes a difference can be seen [when adding](https://play.rust-lang.org/?version=nightly&mode=release&edition=2018&gist=071e2e180cab8170a85fe564d8f86e05):
```rust
pub fn test_unreach(x: bool) -> i32 {
    if x {
        42
    } else {
        unsafe { unreach(&*(8 as *const EmptyEnum)) };
        13
    }
}

pub fn test_empty(x: bool) -> i32 {
    if x {
        42
    } else {
        unsafe { empty(&*(8 as *const EmptyEnum)) };
        13
    }
}
```
The first becomes
```
; playground::test_unreach
; Function Attrs: norecurse nounwind nonlazybind readnone uwtable
define i32 @_ZN10playground12test_unreach17he4cbbc8d69597b0eE(i1 zeroext %x) unnamed_addr #2 {
start:
  ret i32 42
}
```
but the second becomes
```
; playground::test_empty
; Function Attrs: nounwind nonlazybind uwtable
define i32 @_ZN10playground10test_empty17hcb53970308f4f532E(i1 zeroext %x) unnamed_addr #3 {
start:
  br i1 %x, label %bb1, label %bb2

bb1:                                              ; preds = %start
  ret i32 42

bb2:                                              ; preds = %start
  tail call void @llvm.trap() #5
  unreachable
}
```
because the second branch does not actually cause UB.

Cc @eddyb @cuviper
Repository: go
Issue: cmd/go: version encoding in GOPROXY indexes (list files)
Labels: NeedsInvestigation,modules

[goproxy](https://tip.golang.org/cmd/go/#hdr-Module_proxy_protocol) states that
> GET $GOPROXY/<module>/@v/list returns a list of all known versions of the given module, one per line. 

but also, a few lines later, that

> To avoid problems when serving from case-sensitive file systems, the *module* and *version* elements are case-encoded

That seems to imply that because version is case-encoded in file paths and urls, it is also encoded in lists. However, “seems to imply” is not the same thing as a clear specification, and 
[rewriteVersionList](https://github.com/golang/go/blob/c37b6ecc8ae90fad4c3bde947d96487820cdceec/src/cmd/go/internal/modfetch/cache.go#L503) for example, does not seem to perform any encoding check before writing indexes.

(practically we will need to force lower-casing in the versions we process for other reasons, but the go version spec, unfortunately, is not so strict).

That's one of the many little things that make an official `go mod index` desirable (issue #31303)
Repository: three.js
Issue: ImageBitmapLoader Cache key should take account of ImageBitmapOptions
Labels: Suggestion

##### Description of the problem

**Background**

`ImageBitmap` is created with `createImageBitmap()`. `createImageBitmap()` can take options `imageOrientation(flipY)`, `premultiplyAlpha`, and so on. The options have effect to bitmap.

https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/createImageBitmap

So `ImageBitmap`s created with different options parameters should be distinguished from each other even if they refer to the same url.

**Problem**

But `Cache` system in `ImageBitmapLoader` uses only url as cache key.

https://github.com/mrdoob/three.js/blob/dev/src/loaders/ImageBitmapLoader.js#L50
https://github.com/mrdoob/three.js/blob/dev/src/loaders/ImageBitmapLoader.js#L87

In the example below, `bitmap` should be distinguished from `bitmap2` but identical if `Cache` is enabled.

```javascript
var loader = new THREE.ImageBitmapLoader();

loader.setOptions( { imageOrientation: 'none' } );
loader.load( url, function ( bitmap ) {

    loader.setOptions( { imageOrientation: 'flipY' } );
    loader.load( url, function ( bitmap2 ) {

        console.log( bitmap === bitmap2 ); // Should be false

    } );

} );
```

##### Three.js version

- [x] Dev
- [ ] r103
- [ ] ...

##### Browser

- [x] All of them
- [ ] Chrome
- [ ] Firefox
- [ ] Internet Explorer

##### OS

- [x] All of them
- [ ] Windows
- [ ] macOS
- [ ] Linux
- [ ] Android
- [ ] iOS

##### Hardware Requirements (graphics card, VR Device, ...)
Repository: rust
Issue: Request: rustdoc search filter for `unsafe` items
Labels: T-rustdoc,C-feature-request,A-type-based-search

I think that it would be very useful if the pages that rustdoc generated had a way to quickly look at just all of the `unsafe` functions/methods/traits. It would be useful to see both a list of every `unsafe` item and also to have a search be able to "focus" on just `unsafe` items.
Repository: godot
Issue: Editor: context menu for the script symbol
Labels: enhancement,topic:editor,usability

**Godot version:**
3.1 stable

**OS/device including version:**
Win7


**Issue description:**
Right now, the only interaction with the script symbol is LMB click to bring up the script in the script panel.

As editor UI improvement, I request a RMB click to bring up only for this particular script specific options such as
 
- Remove Script (instead of "clear script" as it is called now in the context menu of the node, which does not actually clear the script, but removes it from the node)
- Remove Script And Delete From res://
- Extend Script
- Copy Script https://github.com/godotengine/godot/issues/27280
- Paste Script (Replace Script) https://github.com/godotengine/godot/issues/27280
- Save Script As ...
- Rename Script

![script-context](https://user-images.githubusercontent.com/47016402/55733266-d1af7880-5a1d-11e9-8d4d-ce62ea1d93d7.png)
Repository: pytorch
Issue: Clean up and consolidate DDP tests
Labels: oncall: distributed,module: tests,triaged

Tests for `DistributedDataParallel` are scattered in `test_distributed.py` and `test_c10d.py`. There are some duplicated contents, e.g., input modules and skip rules. We should dedup and consolidate existing tests, and extract them into a separate `test_ddp.py` file.
Repository: flutter
Issue: Support multiple windows for desktop shells
Labels: c: new feature,engine,platform-mac,platform-windows,customer: crowd,platform-linux,a: desktop,P3,customer: chalk (g3),a: multi window,team-framework,triaged-framework

See discussion in https://github.com/google/flutter-desktop-embedding/issues/98

If we end up supporting multiple root views within one engine instance, this will require embedding API changes. If we don't, we'll need to have a viable strategy to recommend for coordinating between windows that works for cases that require constant synchronization (e.g., a tools palette in one window, with the canvas using those tools in another)
Repository: vue
Issue: [template-renderer] Make it possible to not automatically render used async scripts
Labels: feature request

### What problem does this feature solve?
In oder to make https://github.com/maoberlehner/vue-lazy-hydration more useful it would be great if we could prevent the template renderer from automatically injecting async scripts. The way vue-lazy-hydration works is, that it behaves differently on the server than it does on the client. On the server the script (of an async component) is loaded immediately so the template renderer correctly detects that it is used. But on the client the script might not be needed at all but because the template renderer has already injected it it is immediately loaded on page load.

There is currently kind of a backlash against loading huge amounts of JavaScript. vue-lazy-hydration can help with removing a lot of unnecessary JavaScript on server side rendered, mostly static sites like blogs and documentation. But currently it can't completely prevent loading all of the unnecessary JavaScript because of the way how template renderer works.

Here is the relevant line in the code: https://github.com/vuejs/vue/blob/dev/src/server/template-renderer/index.js#L226

### What does the proposed API look like?
I propose to make this configurable:

```js
const renderer = createBundleRenderer(serverBundle, {
  template,
  renderUsedAsyncScripts: false,
});
```

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: go
Issue: x/tools/go/packages: fake command-line-args package isn't created on windows when ad-hoc package file is missing
Labels: NeedsInvestigation,Tools

I haven't been able to reproduce this for go list, so I'm setting this as a go/packages bug for now.

It seems like on Windows, when doing a `go list -e` of an ad-hoc package where a source file doesn't exist, the fake `command-line-args` package that contains the error isn't created. See the comment on golang.org/x/tools/go/packages.TestErrorMissingFile.
Repository: flutter
Issue: Allow setting desktop shell window title
Labels: c: new feature,engine,platform-mac,platform-windows,platform-linux,c: proposal,a: desktop,e: glfw,P3,team-framework,triaged-framework

The closest analog to `SystemChrome.setApplicationSwitcherDescription`'s mobile behavior would be to have it change the title of the window containing the Flutter view. This would definitely be the right behavior for single-window applications, but would also be useful for, e.g., document-style applications where the Flutter code would want to be able to put the document title in the window dynamically based on the content.
Repository: pytorch
Issue: C++ custom module not thread safe
Labels: needs reproduction,module: cpp,triaged

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->

If I create multiple threads, each owning its own built in pytorch module such as `torch::Linear`, I don't get thread safety related errors when running the networks concurrently. However, when I implement my own module, I get segmentation faults.

## To Reproduce

I managed to create this MCVE. This does nothing more than
1. define my own convolution block (`ConvBlock`)
2. define a function which will be executed by another thread
3. make the main thread and the subthread perform the exact same operation

Note that the two threads have their own instance of `ConvBlock`. Thus I think it's expected that feed forwarding through these networks separately should be thread safe. However, it's not.

```
#include <iostream>
#include <thread>
#include <torch/torch.h>

struct ConvBlockImpl : torch::nn::Module {
    ConvBlockImpl(int in_channel, int C /* channels out */, int K, int P)
      : conv(register_module("conv", torch::nn::Conv2d(torch::nn::Conv2dOptions(in_channel, C, K).padding(P)))),
        batch_norm(register_module("bn", torch::nn::BatchNorm(C))) { /* pass */ }

    torch::Tensor forward(const torch::Tensor& x){
        return torch::relu(batch_norm(conv(x)));
    }

    torch::nn::Conv2d conv;
    torch::nn::BatchNorm batch_norm;
};
TORCH_MODULE(ConvBlock);


void foo()
{
    std::cout << "Foo: " << std::this_thread::get_id() << std::endl;
    ConvBlock net(3, 3, 3, 1);
    while (true) {
        torch::Tensor x = torch::ones({8,3,3,3});
        torch::Tensor out = net->forward(x);
    }
}


int main() {
    std::cout << "Main: " << std::this_thread::get_id() << std::endl;
    std::cout.flush();

    std::thread worker(&foo);

    ConvBlock net(3, 3, 3, 1);
    while (true) {
        torch::Tensor x = torch::ones({8,3,3,3});
        torch::Tensor out = net->forward(x);
    }

    worker.join();

    return 0;
}
```

Once run (I'm on macOS 10.14.3), the result looks something like
```
Main: 0x119ed55c0
Foo: 0x70000649d000
Segmentation fault: 11
```


<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->

Two different threads are holding two different instances of my custom made module, thus I assumed that any operations done to each of them shouldn't interfere with the other.

## Environment

 - PyTorch Version (e.g., 1.0): libtorch 1.0.1
 - OS (e.g., Linux): macOS 10.14.3
 - How you installed PyTorch (`conda`, `pip`, source): downloaded libtorch from the website
 - Build command you used (if compiling from source):
 - Python version: -
 - CUDA/cuDNN version: CPU only
 - GPU models and configuration: -
 - Any other relevant information: -
Repository: flutter
Issue: Support Texture widget in GLFW embedding
Labels: c: new feature,engine,c: proposal,a: desktop,e: glfw,P3,team-linux,triaged-linux

See google/flutter-desktop-embedding#107 for discussion
Repository: rust
Issue: arm-unknown-linux-gnueabi libstd panics at startup with lto enabled
Labels: O-Arm,T-compiler,C-bug

Without lto everything seems fine.
Repository: flutter
Issue: Add desktop shell support for text navigation key combinations
Labels: c: new feature,engine,platform-mac,platform-windows,platform-linux,c: proposal,a: desktop,e: glfw,P2,team-text-input,triaged-text-input

On macOS, typing cmd+right invokes moveToRightEndOfLine: These methods are already received by doCommandBySelector: so we we just need to implement the logic.

On glfw we could use modifier flags https://www.glfw.org/docs/latest/group__mods.html#ga14994d3196c290aaa347248e51740274
Repository: flutter
Issue: Add multi-monitor high-DPI support to GLFW shell
Labels: c: new feature,engine,c: proposal,a: desktop,e: glfw,P3,team-linux,triaged-linux

The GLFW shell handles monitor resolution, but only based on the primary monitor.

From looking at docs, it seems like `glfwGetWindowContentScale/glfwSetWindowContentScaleCallback` is the right way to handle the multi-monitor case, but that requires GLFW 3.3; 3.2 is still the stable version. Once 3.3 is stable we should look into updating the copy in third_party and implementing this.
Repository: flutter
Issue: Support window size/placement on desktop
Labels: c: new feature,framework,engine,platform-mac,platform-windows,customer: crowd,platform-linux,a: desktop,e: glfw,P3,team-framework,triaged-framework

A Flutter application running on desktop should be able to control its window size and placement. This will require exposing screen information (array of screens with frames in global coordinates) as well to be useful.

This is something that's so basic to a desktop application that I think it makes much more sense to implement as a system channel than a plugin.
Repository: flutter
Issue: Not possible to change screen when app inactive
Labels: c: new feature,platform-ios,framework,a: fidelity,a: quality,P3,team-ios,triaged-ios

This is somewhere between a 'how do I' and a feature request. What I'm trying to do is essentially block app's screen whenever it isn't the active app (i.e. switcher, when the user pulls down the notification pane on iOS, etc). I've set up a WidgetsBindingObserver to detect when the app switches to Inactive or Paused, and I'm trying to render a different page in that case.

I'm fairly sure this isn't possible within flutter as I've tried using `SchedulerBinding.instance`'s `scheduleForcedFrame` and `scheduleWarmupFrame` which don't work, and they seem like the most reasonable thing to use. With either, the frame isn't actually rendered until the app resumes again.

I don't know if this is actually even possible to do - but it does seem like it is possible with native iOS code. I think `[self.view snapshotViewAfterScreenUpdates:YES];` and possibly `setNeedsDisplay`. I haven't looked into android too much yet.

If anyone has an idea of how this can be done completely within flutter I'd appreciate it, otherwise I'll be looking at doing it natively...
Repository: flutter
Issue: Something is wrong with the Navigator.replace() method.
Labels: framework,d: api docs,f: routes,P2,team-framework,triaged-framework

Hi there,

So the `replace(oldRoute, newRoute)` method on Navigator expects the old route to be already on the history list (asserting that its `_navigator` actually equals to the `this` navigator), but there's a dead lock here:

- When you push a new page, you have to create a route.
- When you want to create a route, you have to create a destination page (widget) in its builder.

As an example:

```dart
final route = PageRouteBuilder(
  pageBuilder: (_) => NewPageWidget(),
);

Navigator.of(context).push(route);
```

We are unable to preserve the `route` instance which is transitioning the UI to `NewPageWidget` because the latter is already instantiated. The reason why we need access to the `route` instance is because its `_navigator` property is initialized after it was pushed to the stack.

At some point, we would like to replace the `NewPageWidget` with a another page (it's a requirement, I cannot use `pushReplacement()` or any other method for that matter), but without access to the original `route` instance that originally placed the page on the stack, how exactly can `replace(oldRoute, newRoute)` work?

A deadlock? If not, an example that show cases a possible solution would be more than welcome, thank you!
Repository: godot
Issue: Tileset collision points doesn't update properly after modification in editor
Labels: enhancement,topic:editor,usability

Godot version: 3.1-stable


**Issue description:**
Tile collision doesn't update visually until you switch off of it then back when numbers are changed in the editor.


**Steps to reproduce:**
Create TileMap
Add new TileSet
Add image in TileSet editor
New Single Tile
Set Region
Add Rectangle in collision tab
Click collision shape in editor
Edit points by changing the number
Then switch from collision to region back to collision and it will update properly

![godot bug](https://user-images.githubusercontent.com/48169450/55768501-c0c52e00-5a42-11e9-8646-23fd97a7f775.gif)
Repository: pytorch
Issue: RNN module weights not compacted
Labels: oncall: jit

I exported a JIT model and load it in C++, it runs well on CPU. but when I run it on GPU, I get this warning and then the program crashed.
``` text
Warning: RNN module weights are not part of single contiguous chunk of memory. 
This means they need to be compacted at every call, possibly greatly increasing memory usage. 
To compact weights again call flatten_parameters(). (_cudnn_impl at ..\aten\src\ATen\native\cudnn\RNN.cpp:1249)
```
I tried vgg16 net module before, and it worked well both on CPU and GPU.
I tried to read the API documents, but I can't find flatten_parameters() function. And there is no usage document for other APIs.

Here is my code
```cpp
	std::shared_ptr<torch::jit::script::Module> module = torch::jit::load(
		"E:/temp/stm.pt", c10::kCUDA);
	assert(module != nullptr);
	cout << "load module ok!" << endl;
	//module->to(at::kCPU);
	module->to(at::kCUDA);


	cv::Mat img;
	cv::Mat img_float;
	img = cv::imread("E:/pics/00.jpg", IMREAD_GRAYSCALE);
	//cv::cvtColor(img, img, cv::COLOR_BGR2GRAY);
	img.convertTo(img_float, CV_32F, 1.0 / 255.0);
	cv::resize(img_float, img_float, cv::Size(160, 32));

	auto img_tensor = torch::CPU(torch::kFloat32).tensorFromBlob(img_float.data, { 1, 32, 160, 1 });
	img_tensor = img_tensor.permute({ 0, 3, 1, 2 });
	img_tensor[0][0] = img_tensor[0][0].sub_(0.5).div_(0.5);
	auto img_var = torch::autograd::make_variable(img_tensor, false);
	cout << img_var.sizes() << endl;

	vector<torch::jit::IValue> inputs;
	//inputs.push_back(img_var.to(at::kCPU));
	inputs.push_back(img_var.to(at::kCUDA));
	auto output = module->forward(inputs).toTensor();
	auto res = output.max(2);
	auto predicts = get<1>(res);
	cout << predicts;
```

And [this link](https://github.com/Sierkinhane/crnn_chinese_characters_rec/tree/master/trained_models) is the pytorch model I use.

cc @suo