sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: godot
Issue: ShaderMaterial doesn't save with sensible defaults
Labels: enhancement,discussion,topic:shaders

**Godot version:**
3.2 rc3
**OS/device including version:**
ArcoLinux
**Issue description:**
When creating a ShaderMaterial and assigning it a shader, Godot will not supply the shader params with sensible defaults, but instead assign null to anything which wasn't set manually.

```
uniform vec4 base_color : hint_color;
uniform vec4 pattern_color : hint_color = vec4(1);
uniform sampler2D pattern_texture : hint_albedo;
uniform vec2 pattern_size = vec2(1);
uniform vec2 pattern_offset;
uniform vec4 black : hint_color = vec4(.06, .09, .16, 1);
uniform vec4 white : hint_color = vec4(1., .91, .83, 1);
uniform bool shadeless;
uniform bool specular;
uniform float spec_softness : hint_range(0, 1) = 0.01;
uniform float spec_size : hint_range(0, 1) = 0.01;
uniform float threshold : hint_range(0, 1) = 0.;
uniform float softness : hint_range(0, 1) = 0.2;
```

```
[gd_resource type="ShaderMaterial" load_steps=2 format=2]

[ext_resource path="res://Source/Shaders/DaisyShader2.shader" type="Shader" id=1]

[resource]
shader = ExtResource( 1 )
shader_param/base_color = null
shader_param/pattern_color = Color( 1, 1, 1, 1 )
shader_param/pattern_size = Vector2( 1, 1 )
shader_param/pattern_offset = null
shader_param/black = Color( 0.06, 0.09, 0.16, 1 )
shader_param/white = Color( 1, 0.91, 0.83, 1 )
shader_param/shadeless = null
shader_param/specular = null
shader_param/spec_softness = 0.01
shader_param/spec_size = 0.01
shader_param/threshold = 0.0
shader_param/softness = 0.2
```

As seen above, many params are saved as null, when they should be colors, vectors or booleans.  In the editor, these always default to, e.g. black, Vector2(0, 0), and false.

This works up until the point where you attempt to access this param in code later in, e.g. `(bool)shaderMat.GetShaderParam("specular")`, in which case you get a game crash and a confusing error about something somewhere being null; your first thought is to wonder if the shader material itself is null, but it doesn't seem to be, and you would hardly guess it's due to a value type being null.

In an ideal Godot, ShaderMaterial resources would be saved with sensible defaults for its value types; it makes sense for a sampler2d to be possibly null, but checking for a null bool is not intuitive, and checking every param you access for null is tedious.
Repository: rust
Issue: Tracking issue for future-incompatibility lint `conflicting_repr_hints`
Labels: A-attributes,A-lints,T-compiler,C-future-incompatibility,C-tracking-issue

This is the **summary issue** for a bug fix related to `repr(...)` hints. The goal of this page is describe why this change was made and how you can fix code that is affected by it. It also provides a place to ask questions or register a complaint if you feel the change should not be made. For more information on the policy around future-compatibility warnings, see our [breaking change policy guidelines][guidelines].

[guidelines]: https://forge.rust-lang.org/rustc-bug-fix-procedure.html

### What is the warning for?

The compiler incorrectly accepts `#[repr(...)]` hints on data types where the hints are incompatible and have conflicts. Examples of this includes:

```rust
// from `src/test/ui/conflicting-repr-hints.rs

#[repr(u32, u64)] //~ ERROR conflicting representation hints
enum D {
    D,
}
```

We are presently issuing a deny-by-default lint when conflicting representation hints are used together but we expect to transition the lint to hard **errors** in the future.

### How can you fix your code?

Generally speaking, the conflict should be fixed by more clearly expressing your intent so that the conflict is resolved.
Repository: go
Issue: x/crypto/acme/autocert: add hooks for transaction locks
Labels: NeedsDecision,FeatureRequest

The `Manager.createCert` method has a lock around the ACME transaction so that multiple goroutines can safely call this method concurrently. This does not protect against multiple processes (possibly on different machines) doing this concurrently.

If transaction hooks were added, then a caller could provide a custom `Cache` which uses remote storage, allowing multiple servers to safely request certificate generation/renewal and share the certificates.

If this approach is acceptable, I can start work on a PR.
Repository: TypeScript
Issue: Auto-format incorrectly formats multi-line arrays
Labels: Bug,Domain: Formatter

*TS Template added by @mjbvz*

**TypeScript Version**: 3.8.0-dev.20200125

**Search Terms**
- format 
- array
- multiline

---

Version: 1.41.0 (system setup)
Commit: 9579eda04fdb3a9bba2750f15193e5fafe16b959
Date: 2019-12-11T18:37:42.077Z
Electron: 6.1.5
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Windows_NT x64 10.0.17763

Steps to Reproduce:

1. Paste the following code into a TypeScript file:
```
      const array0 = ["banana",
        "apple",
        "pear",
        "peach"
      ];
      const array1 = [String("banana"),
        String("apple"),
        String("pear"),
        String("peach")
      ];
      const array2 = [
        String("banana"),
        String("apple"),
        String("pear"),
        String("peach")
      ];
      const peach = String("peach");
      const array3 = [String("banana"),
        String("apple"),
        "pear",
        peach
      ];
```
2. Save with auto format on save enabled.
3. The code array entries will be inconsistently indented as shown below:
```
      const array0 = ["banana",
        "apple",
        "pear",
        "peach"
      ];
      const array1 = [String("banana"),
      String("apple"),
      String("pear"),
      String("peach")
      ];
      const array2 = [
        String("banana"),
        String("apple"),
        String("pear"),
        String("peach")
      ];
      const peach = String("peach");
      const array3 = [String("banana"),
      String("apple"),
        "pear",
        peach
      ];
```
Primitives and variables are indented but method calls and constructors are not indented.  This only happens if the first entry in the array is on the same line as the opening bracket.  I would expect the text to be formatted as shown in step 1.
Repository: rust
Issue: casting trait methods to FnOnce(&mut dyn Trait) is not ergonomic
Labels: C-enhancement,A-diagnostics,T-compiler

In the following code, I'm trying to cast `Trait::f` to `FnOnce(&mut dyn Trait)` which should be possible, but the obvious method doesn't work. None of the combinations I tried got it to work (I could just use a lambda that called `f`, but that defeats the purpose).

```rust
trait Trait {
    fn f(&mut self);
}

fn g<F: FnOnce(&mut dyn Trait)>(f: F) {}

fn f() {
    g(Trait::f)
}
```

([Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=def622e8ed38388cb543e450467bdc00))

Errors:

```
   Compiling playground v0.0.1 (/playground)
error[E0631]: type mismatch in function arguments
 --> src/lib.rs:8:7
  |
2 |     fn f(&mut self);
  |     ---------------- found signature of `for<'r> fn(&'r mut _) -> _`
...
5 | fn g<F: FnOnce(&mut dyn Trait)>(f: F) {}
  |    -    ---------------------- required by this bound in `g`
...
8 |     g(Trait::f)
  |       ^^^^^^^^ expected signature of `for<'r> fn(&'r mut (dyn Trait + 'r)) -> _`

error[E0271]: type mismatch resolving `for<'r> <for<'s> fn(&'s mut _) {<_ as Trait>::f} as std::ops::FnOnce<(&'r mut (dyn Trait + 'r),)>>::Output == ()`
 --> src/lib.rs:8:5
  |
5 | fn g<F: FnOnce(&mut dyn Trait)>(f: F) {}
  |    -    ---------------------- required by this bound in `g`
...
8 |     g(Trait::f)
  |     ^ expected bound lifetime parameter, found concrete lifetime

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0271`.
error: could not compile `playground`.

To learn more, run the command again with --verbose.

```
Repository: pytorch
Issue: Building PyTorch ignores my current Python version
Labels: module: build,triaged

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->
I am trying to build PyTorch on my Raspberry Pi 4(Raspbian Buster) with Python 3.6.9(virtual env), but it keeps using Python 3.7

## To Reproduce

Steps to reproduce the behavior:

1. git clone https://github.com/pytorch/pytorch.git
2. git checkout v1.3.1
3. sudo python setup.py build

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->
![image](https://user-images.githubusercontent.com/5151146/73223302-c0587800-41b9-11ea-8973-a611a9935ed2.png)

## Expected behavior

<!-- A clear and concise description of what you expected to happen. -->
I am expecting it copys files from python 3.6.9 virtual environment.

## Environment

> Collecting environment information...
> PyTorch version: N/A
> Is debug build: N/A
> CUDA used to build PyTorch: N/A
> 
> OS: Raspbian GNU/Linux 10 (buster)
> GCC version: (Raspbian 8.3.0-6+rpi1) 8.3.0
> CMake version: version 3.13.4
> 
> Python version: 3.6
> Is CUDA available: N/A
> CUDA runtime version: Could not collect
> GPU models and configuration: Could not collect
> Nvidia driver version: Could not collect
> cuDNN version: Could not collect
> 
> Versions of relevant libraries:
> [pip] Could not collect
> [conda] Could not collect
> 



## Additional context

<!-- Add any other context about the problem here. -->
Repository: vscode
Issue: Rename refactoring context actions work on the entire input
Labels: ux,under-discussion,workspace-edit

Testing https://github.com/microsoft/vscode/issues/89331

![image](https://user-images.githubusercontent.com/22350/73253459-e16e9800-41bc-11ea-9612-fa36136ab872.png)

1. Right click a refactor row and choose `Apply Refactoring`

All the checked changes will be applied and the view will disappear. I would expect only the refactoring I've right clicked on would be applied.
Repository: pytorch
Issue: How to customize build torchscript model to be used in end devices codebase
Labels: oncall: jit,triaged,oncall: mobile

## 🚀 Feature
I want to compile my model to be executed in the Python/C script running on our customers computers/end devices, without the need to load the entire torch/libtorch package, but only what is needed based on the model operations.

## Motivation
Currently, the size of my ResNet model (for example) is ~100MB but it needs torch/libtorch, which requires ~1.5GB of space.
End devices (smart cameras, robots, etc.) are low in resources. R&D efforts for deployment on end devices includes a large efforts to optimize the model and reduce its size to minimum. Having my model accompanied by torch/libtorch is a difficult restriction. I am aware that the mobile community is leading the attention for similar features. However, considering modern smartphones resources, there is even a greater need for such a solution for other end devices.

## Current status
Currently i am doing this series of commands:
`model = torchvision.models.resnet50(pretrained=True)`
`model.eval()`
`example = torch.ones(1, 3, 224, 224)`
`traced_model = torch.jit.trace(model, example)`
`ops = torch.jit.export_opnames(model)`
`traced_model.save('traced_model.pt')`
`with open('model_ops.yaml', 'w') as output:`
`   yaml.dump(ops, output)`
The request is to enable building a model i can use in another python/c script without the need to load the entire torch or libtorch packages, but only what is needed based on the model operations.

## Alternatives
I am not aware of such alternatives. Will be happy to hear about them, if there are any.



cc @suo
Repository: pytorch
Issue: ninja: build stopped: subcommand failed.
Labels: module: build,triaged

## 🐛 Bug
Does anyone have a recipe that is known to work?

<!-- A clear and concise description of what the bug is. -->
[426/3392] Building CXX object third_party/ideep/m...nn/src/CMakeFiles/mkldnn.dir/cpu/cpu_reorder.cpp.o
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "setup.py", line 737, in <module>
    build_deps()
  File "setup.py", line 316, in build_deps
    cmake=cmake)
  File "/home/developer/pytorch/tools/build_pytorch_libs.py", line 62, in build_caffe2
    cmake.build(my_env)
  File "/home/developer/pytorch/tools/setup_helpers/cmake.py", line 339, in build
    self.run(build_args, my_env)
  File "/home/developer/pytorch/tools/setup_helpers/cmake.py", line 141, in run
    check_call(command, cwd=self.build_dir, env=env)
  File "/home/developer/anaconda3/envs/pytorch/lib/python3.7/subprocess.py", line 363, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '32']' returned non-zero exit status 1.

## To Reproduce

Steps to reproduce the behavior:

python setup.py clean
python setup..py install

1.
1.
1.

<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->

## Expected behavior

builds successfully

<!-- A clear and concise description of what you expected to happen. -->

## Environment

Ubuntu 14.04 with Xenial kernel 4.4.0 generic
Anaconda, Python 3.7
Tried C++ 4.9, 5.5, 7, 9
CUDA 10.1, cdnn 7.5.6

Please copy and paste the output from our
[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)
(or fill out the checklist below manually).

You can get the script and run it with:
```
wget https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py
# For security purposes, please check the contents of collect_env.py before running it.
python collect_env.py
```

 - PyTorch Version (e.g., 1.0):
 - OS (e.g., Linux):
 - How you installed PyTorch (`conda`, `pip`, source):
 - Build command you used (if compiling from source):
 - Python version:
 - CUDA/cuDNN version:
 - GPU models and configuration:
 - Any other relevant information:

## Additional context

<!-- Add any other context about the problem here. -->
Repository: pytorch
Issue: torch.tensordot has inconsistent signature with torch script
Labels: oncall: jit,triaged

## 🐛 Bug

<!-- A clear and concise description of what the bug is. -->
Inconsistent API across torch script and no script


## To Reproduce

Steps to reproduce the behavior:

Working samples
```python
def my_tensordot(a, b):
    return torch.tensordot(a, b, [[1], [1]])
```

```python
@torch.jit.script
def my_tensordot(a, b):
    return torch.tensordot(a, b, [1], [1])
```

Broken one (using same API as in python)
```python
@torch.jit.script
def my_tensordot(a, b):
    return torch.tensordot(a, b, [[1], [1]])
```
I get

```
aten::tensordot(Tensor self, Tensor other, int[] dims_self, int[] dims_other) -> (Tensor):
Expected a value of type 'List[int]' for argument 'dims_self' but instead found type 'List[List[int]]'.
```

Removing jit decorator from working jit example does not help


```python
def my_tensordot(a, b):
    return torch.tensordot(a, b, [1], [1])
```
```
TypeError: tensordot() takes from 2 to 3 positional arguments but 4 were given
```


<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->


## Expected behavior

Same API should work in jit and non jit mode, like here
```python
@torch.jit.script
def my_tensordot(a, b):
    return torch.tensordot(a, b, [[1], [1]])
```

## Environment

Please copy and paste the output from our
[environment collection script](https://raw.githubusercontent.com/pytorch/pytorch/master/torch/utils/collect_env.py)
(or fill out the checklist below manually).

You can get the script and run it with:
```
PyTorch version: 1.3.1
Is debug build: No
CUDA used to build PyTorch: 10.1.243

OS: Ubuntu 16.04.6 LTS
GCC version: (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
CMake version: Could not collect

Python version: 3.6
Is CUDA available: No
CUDA runtime version: Could not collect
GPU models and configuration: GPU 0: GeForce GTX 950M
Nvidia driver version: 384.130
cuDNN version: Could not collect

Versions of relevant libraries:
[pip3] numpy==1.17.1
[pip3] torch==1.3.1
[pip3] torch-cluster==1.4.5
[pip3] torch-geometric==1.3.2
[pip3] torch-scatter==1.4.0
[pip3] torch-sparse==0.4.3
[pip3] torch-spline-conv==1.1.1
[pip3] torchvision==0.4.2
[conda] Could not collect

```

## Additional context

I found this running python with `PYTORCH_JIT=false`

## Possible Solutions
1. Overload both functions to handle both cases. No user code change required, errors dissapear
2. Jit supports python API variant: few users are affected. pytorch version should be checked at import time
2. Python function supports jit API variant: a lot of users are affected. pytorch version should be checked at import time

cc @suo
Repository: pytorch
Issue: Add Julia Bindings to Torch backend 
Labels: feature,low priority,triaged,module: language binding

## 🚀 Feature
Usage of Julia to access Torch backend api’s. 

## Motivation

Array Programming is a paradigm, just like saying “Object Orientated Programming” or “Functional Programming”, along w/ a compiler that can handle Dispatch and mathematical types makes it a language perfect for deep learning 

## Pitch

Create Julia bindings to access torch backend while leveraging the capabilities of the Julia language itself. 

## Additional context

Include GPU support for NVIDIA/CUDA. (Julia has this)
Repository: TypeScript
Issue: Catch when callbacks are missing a return.
Labels: Suggestion,Needs Proposal

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker.

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ, especially the "Common Feature Requests" section: https://github.com/Microsoft/TypeScript/wiki/FAQ

-->

## Search Terms

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->

- array callback return
- eslint array-callback-return
- catch missing return for callbacks

## Suggestion

TypeScript does not recognise this as an error even though it clearly is - `findIndex` takes a callback which should return a boolean, returning an (implicit) `undefined` is IMO in 99% of cases a mistake.

```ts
[1,2,3].findIndex(e => {
  e === 1
})
```

I also think that if there is an *explicit return* of a falsey value such as `null` or `undefined`, then that should be fine. It's the lack of any return at all which should trigger an error, in my eyes.

I'm aware that ESLint can do this but not everyone uses ESLint, also ESLint can be a huge pain to configure sometimes, especially when Prettier, TypeScript and other things are involved.

## Use Cases

It will definitely catch errors, IMHO, for people who don't use ESLint or do not have the rule `array-callback-return`.

## Examples

No error:
```ts
[1,2,3].findIndex(e => 
  e === 1
)
```

No error:
```ts
[1,2,3].findIndex(e => e === 1)
```

A warning/errror: "Did you forget a return?"
```ts
[1,2,3].findIndex(e => {
  e === 1
})
```

## 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. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Repository: material-ui
Issue: [Modal] aria-hidden should not be applied on non-portal modals
Labels: accessibility,component: modal

<!-- Provide a general summary of the issue in the Title above -->

`aria-hidden=true` gets applied on top level container when a modal is opened. But if `disablePortal` is used, `aria-hidden` should not be set on that top level container as the modal will be created inline and most likely within that top level container

Running axe on the opened modal yields the following error:
> "ARIA hidden element must not contain focusable elements (aria-hidden-focus)"
>
> Fix all of the following:
      Focusable content should have tabindex='-1' or be removed from the DOM

You can find more information on this issue here: 
https://dequeuniversity.com/rules/axe/3.3/aria-hidden-focus?application=axeAPI

https://www.w3.org/TR/wai-aria-practices/examples/dialog-modal/dialog.html
> The dialog element is not a descendant of any element that has aria-hidden set to true.

<!--
  Thank you very much for contributing to Material-UI by creating an issue! ❤️
  To avoid duplicate issues we ask you to check off the following list.
-->

<!-- Checked checkbox should look like this: [x] -->

- [x] The issue is present in the latest release.
- [x] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate.

## Current Behavior 😯

1. Modal with `disablePortal` prop is opened and `aria-hidden` is set to true on top level html node

## Expected Behavior 🤔

1. Modal with `disablePortal` prop is opened and `aria-hidden` is _not_ set to true on top level html node
2. Modal _without_ `disablePortal` prop is opened and `aria-hidden` is set to true on top level html node

## Steps to Reproduce 🕹

https://codesandbox.io/s/material-mui-demo-9oddt?fontsize=14&hidenavigation=1&theme=dark

## Context 🔦

<!--
  What are you trying to accomplish? How has this issue affected you?
  Providing context helps us come up with a solution that is most useful in the real world.
-->

## Your Environment 🌎

<!--
  Include as many relevant details about the environment with which you experienced the bug.
  If you encounter issues with typescript please include version and tsconfig.
-->

| Tech        | Version |
| ----------- | ------- |
| Material-UI | v4.9.0  |
| React       |   v16.12.0      |
| Browser     |         |
| TypeScript  |  v3.8.0-dev.20200125       |
| etc.        |         |
Repository: godot
Issue: is_rel_path returns true for an empty string
Labels: discussion,topic:core

**Godot version:** 505fee0b6db806c9fc83acd3a074f40ac57a83e2

**Issue description:**

`"".is_rel_path()` returns `True`

I don't believe "" should be considered a relative path...

**Minimal reproduction project:**
[test.zip](https://github.com/godotengine/godot/files/4122887/test.zip)
Repository: vscode
Issue: CodeIcon: in documentation hover could get some polish
Labels: ux,polish,suggest,workbench-hover

Refs: https://github.com/microsoft/vscode/issues/89328

I think once a codicon is in the text, we need to adjust the lineheight or some other styling to make it look nicer: 
![image](https://user-images.githubusercontent.com/900690/73275539-8ef6a100-41e7-11ea-8862-7f8df2c33ab9.png)