sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: cmd/go: include source dir in cache key when ${SRCDIR} is present in cgo header
Labels: NeedsFix,GoCommand

What I did:

* have a project including cgo headers using `${SRCDIR}`
* move that project to a new directory
* build

Result:

`ld: warning: directory not found for option '-L/Users/josh/...redacted...`

The redacted directory is the previous directory pointed to by the `${SRCDIR}` directive in the cgo sources.

After a `go clean -cache`, the error disappeared.

I suspect that cmd/go's caching may be too effective here. It probably doesn't take into account the absolute path containing the project, but it may need to when the `${SRCDIR}` cgo directive is present.

cc @bcmills @jayconrod
Repository: tensorflow
Issue: Define variable shape at restore/load, allow direct restoring of variables prior to calling __build__ (non-lazy variable loading from checkpoint)
Labels: stat:awaiting tensorflower,type:feature,comp:ops

<em>Please make sure that this is a feature request. As per our [GitHub Policy](https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md), we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:feature_template</em>


**System information**
- TensorFlow version (you are using): 2.0
- Are you willing to contribute it (Yes/No): Yes (if necessary)



**Describe the feature and the current behavior/state.**

Typically for RL, I use tensorflow in combination with Ray, where a remote agent collects data using a policy model, and the episodes are fed to a tf-agents EpisodicReplayBuffer in a second train-loop process. A tf.dataset is used to feed the main model training on this thread, which is then serialized via get_weights and sent back to the remote actor via a ray remote call to set_weights.

Currently I use tf.Checkpoint.restore.expect_partial() to restore my subclassed tf.keras.Model. In practice, this is extremely convoluted on initialization:
* I make a forward pass through my remote Agent on random policy (since I have not initialized the weights), retrieve this forward pass, and send it to the train loop
* I make a second forward pass through my train loop (again, randomly initialized network still), this has the side effect of initializing the network, allowing my checkpoint to restore the variables in this model
* I call get_weights on the train_loop model, and pass the weights to my remote model via set_weights.
* I can now collect a full replay buffer with my Agent on policy
* I can now run the train loop

Maybe I'm missing something, but most of my labmates are also confused by what the best practice for this currently is.

**Will this change the current api? How?**
I'm not sure what the best approach is. Some ideas for discussion? 

* Allow set_weights to define the shapes and names of tf.Variables, such that calls to __build__ in the tf.keras.Model on first run will align with the initialized tf.Variables.
* Allow tf.keras.model.load_weights() to set the weights immediately rather than waiting for first call to build()

**Who will benefit with this feature?**
RL community 
**Any Other info.**
Repository: pytorch
Issue: Reuse spawned subprocesses in RPC tests
Labels: triaged,better-engineering,module: rpc

## 🚀 Enhancement
Investigating the possibility to reuse spawned subprocesses for `test_rpc_spawn.py` would be super helpful. The current test suite takes > 5 mins to complete, while the `test_rpc_fork` that we removed in https://github.com/pytorch/pytorch/pull/29827 completed much faster. I'm thus assuming that the reason for this time difference is due to spawning subprocesses in each test run.

It seems like it'd help developer productivity quite a bit if we were able to reuse these processes somehow across runs. Though we'd need to be careful to ensure that this does not introduce extra flakiness.

## Alternatives

Continue with per-test spawning.


cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @gqchen @aazzolini @rohan-varma @xush6528 @jjlilley
Repository: flutter
Issue: Hero Animations with Popup Route
Labels: c: new feature,framework,a: animation,f: routes,P3,team-framework,triaged-framework


## Steps to Reproduce

Created a custom page route to act / create a bottom sheet, doing this leads to Hero widget not working at all.

Created a dartPad example to showoff the problem ==> https://dartpad.dev/e79bd9adf6845857e0829ec6fe5a4a55

**Target Platform:** All


## Logs


<!-- Finally, paste the output of running `flutter doctor -v` here. -->

```
[√] Flutter (Channel master, v1.13.6-pre.16, on Microsoft Windows [Version 10.0.18363.535], locale en-US)
    • Flutter version 1.13.6-pre.16 at C:\src\flutter
    • Framework revision fcaf9c4070 (3 weeks ago), 2019-12-21 14:03:01 -0800
    • Engine revision 33813929e3
    • Dart version 2.8.0 (build 2.8.0-dev.0.0 886615d0f9)


[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\Users\Dell\AppData\Local\Android\sdk
    • Platform android-29, build-tools 29.0.2
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Community 2019 16.4.0)
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\Community
    • Visual Studio Community 2019 version 16.4.29519.181

[√] Android Studio (version 3.5)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 39.0.3
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] Connected device (4 available)
    • Android SDK built for x86 • emulator-5554 • android-x86    • Android 10 (API 29) (emulator)
    • Windows                   • Windows       • windows-x64    • Microsoft Windows [Version 10.0.18363.535]
    • Chrome                    • chrome        • web-javascript • Google Chrome 78.0.3904.108
    • Web Server                • web-server    • web-javascript • Flutter Tools

• No issues found!
PS C:\Users\Dell> flutter doctor -v
[√] Flutter (Channel master, v1.13.6-pre.16, on Microsoft Windows [Version 10.0.18363.535], locale en-US)
    • Flutter version 1.13.6-pre.16 at C:\src\flutter
    • Framework revision fcaf9c4070 (3 weeks ago), 2019-12-21 14:03:01 -0800
    • Engine revision 33813929e3
    • Dart version 2.8.0 (build 2.8.0-dev.0.0 886615d0f9)

```
Repository: rust
Issue: TcpStream bind before connect
Labels: T-libs-api,C-feature-request

We now have `TcpStream::connect` and `TcpStream::connect_timeout` to create a `TcpStream`.

But there is no option for us to do before calling `connect()`, in particular, `bind()` to the source address.

Proposal:

```rust
fn connect_with<A>(bind_addr: &SocketAddr, A: addr) -> io::Result<TcpStream>
    where A: ToSocketAddrs
{
    // ...
}

fn connect_with_timeout(bind_addr: &SocketAddr,
                        addr: &SocketAddr,
                        timeout: Duration)
                        -> io::Result<TcpStream>
{
    // ...
}
```
Repository: godot
Issue: LineEdit last characters disappear with text align=right and using a Dynamic font with char_space>0
Labels: bug,confirmed,topic:gui

**Godot version:**
Godot  3.1 release / 3.2-beta 5

**OS/device including version:**
Windows 10 / GTX 1060

**Issue description:**
I have used a DynamicFont with char_space=2 in a LineEdit. 
If you set the alignment to left, center, or fill everything works fine, but after changing the aligment of the LineEdit text to right aligned the last characters of the text disappear.
After setting the char_space of the font back to 0 the full text of the LineEdit visible using right alignment.


**Steps to reproduce:**
Create a LineEdit control which has the text right aligned. 
Add a DynamicFont to the LineEdit and change the char_space to any value bigger zero. 


**Minimal reproduction project:**
[LineEditCharSpaceBug.zip](https://github.com/godotengine/godot/files/4040331/LineEditCharSpaceBug.zip)
Repository: TypeScript
Issue: Narrow number literal types with comparison
Labels: Suggestion,In Discussion

## Search Terms

constant number literals narrowing comparison

## Suggestion

Narrow number literal type not only with (non)equality, but also with less-than etc.
This request is only about throwing away non-matching literals, and not about full-blown `number` narrowing.

## Use Cases

This could be used to direct narrowing with tuple unions.

## Examples

With literals 
```ts
type X = 0 | 1 | 2 | 3;
function f(): X {
    return 1;
}
function g(x: 0 | 3) { 
    console.log(x);
}
let x: X = f();
g(x); // Error, 1 | 2 is unexpected
if (x > 2) { 
    g(x); // Same error, but should be safe
}
if (x != 1 && x != 2) { 
    g(x); // Ok
}
```

With tuples
```ts
type X = [] | [string, string];
function f(): X { return [];}
function g(x: string) { 
    console.log(x);
}
let x: X = f();
g(x[0]); // Error, undefined is unexpected
if (x.length > 0) { 
    g(x[0]); // Error, but should be ok
}
if (x.length == 2) { 
    g(x[0]); // Ok
}
```

## 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: vscode
Issue: Git - 'Revert selected ranges' should work on individual lines, not hunks
Labels: bug,help wanted,git

- VS Code version: Code 1.41.1 (26076a4de974ead31f97692a0d32f90d735645c0, 2019-12-18T15:04:31.999Z)
- OS version: Linux x64 4.15.0-72-generic (Ubuntu 16)
- Does this issue occur when all extensions are disabled?: Yes


`Revert selected ranges` reverts any hunks in which there is a cursor. This is annoying when one wants more fine-grained control. Especially seeing as it is already easy to revert by hunk through other features.

Note that this is contrary to `Stage selected ranges`, which correctly stages only the selected lines
Repository: PowerToys
Issue: The ProjectTemplate doesn't show up when using the search box in VS
Labels: Issue-Bug,Area-Project Template

It's also missing the required tags:
```
    <LanguageTag>C++</LanguageTag>
    <PlatformTag>windows</PlatformTag>
    <ProjectTypeTag>extension</ProjectTypeTag>
```
Repository: pytorch
Issue: Trying to disable cuda to run torch on OSX run it on CPU
Labels: module: build,module: cuda,triaged


```
anaconda3/envs/meshcnn/lib/python3.6/site-packages/torch/cuda/__init__.py", line 95, in _check_driver
    raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
```

Seems this is where I need to tell it to use the CPU but kinda stuck
in this file
lib/python3.6/site-packages/torch/cuda/__init__.py

```
def _check_driver():
    if not hasattr(torch._C, '_cuda_isDriverSufficient'):
        raise AssertionError("Torch not compiled with CUDA enabled")
    if not torch._C._cuda_isDriverSufficient():
        if torch._C._cuda_getDriverVersion() == 0:
            # found no NVIDIA driver on the system
            raise AssertionError("""
Found no NVIDIA driver on your system. Please check that you
have an NVIDIA GPU and installed a driver from
http://www.nvidia.com/Download/index.aspx""")
        else:
            # TODO: directly link to the alternative bin that needs install
            raise AssertionError("""
The NVIDIA driver on your system is too old (found version {}).
Please update your GPU driver by downloading and installing a new
version from the URL: http://www.nvidia.com/Download/index.aspx
Alternatively, go to: https://pytorch.org to install
a PyTorch version that has been compiled with your version
of the CUDA driver.""".format(str(torch._C._cuda_getDriverVersion())))
```

Any guidance?

cc @ngimel
Repository: rust
Issue: Unhelpful highlighting in type inference error
Labels: C-enhancement,A-diagnostics,T-compiler,A-inference,D-confusing

MWE of a type inference error that came up in a real project:
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=cd3198d1a30439a01ca2cfa3a78b1124

The user should fix this error by adding an explicit type for the {integer} literal `1` (i.e. 1u32 or 1u64), since these could do completely different things for the generic type `T`. The compiler catches this, but the highlighting seems to imply that it can't infer the type of the entire expression `!(number >> 1)`, when in reality the problem is with the `1`: no matter what type `1` takes, the full expression is always type `T`. This is pretty confusing
Repository: flutter
Issue: Support data: URIs in Image.network
Labels: a: tests,c: new feature,framework,customer: dream (g3),a: images,P3,team-framework,triaged-framework

## Use case

For testing purposes, we produce data samples which contain data URIs for pre-loaded image URLs. This ensures that the tests are fast and hermetic.

We'd like to transparently pass these data URIs to Image.network as this means we don't have to modify the production code just for testing purposes (and try to find all the occurrences of Image.network is not a trivial task).

## Proposal

Detect data URIs in Image.network, decode them and transparently call Image.memory instead.
Repository: rust
Issue: Type inference can't resolve type of output of `dyn Future` inside of `impl Fn` inside of Vec
Labels: T-lang,T-compiler,A-inference,A-impl-trait,C-bug

This code ([Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=2fb9d4046178e9fd1d5f61c2ec80b034))
```rust
fn get_closure_vec(length: usize) -> Vec<impl Fn() -> Box<dyn std::future::Future<Output = usize>>> {
    vec![|| Box::new(async { 5 }) as Box<_>; length]
}
```
gives error
```
error[E0271]: type mismatch resolving `<impl std::future::Future as std::future::Future>::Output == usize`
 --> src/lib.rs:2:13
  |
2 |     vec![|| Box::new(async { 5 }) as Box<_>; width]
  |             ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected usize, found i32
  |
  = note: required for the cast to the object type `dyn std::future::Future<Output = usize>`
```
and this code ([Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=990b46471a01fa442ea6106ca6853be8))
```rust
fn get_closure_vec(length: usize) -> Vec<impl Fn() -> Box<dyn std::future::Future<Output = usize>>> {
    vec![|| Box::new(async { 5 }); length]
}
```
also gives error
```
error[E0271]: type mismatch resolving `<[closure@src/lib.rs:2:10: 2:39] as std::ops::FnOnce<()>>::Output == std::boxed::Box<(dyn std::future::Future<Output = usize> + 'static)>`
 --> src/lib.rs:1:41
  |
1 | fn get_closure_vec(width: usize) -> Vec<impl Fn() -> Box<dyn std::future::Future<Output = usize>>> {
  |                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected opaque type, found trait std::future::Future
  |
  = note: expected type `std::boxed::Box<impl std::future::Future>`
             found type `std::boxed::Box<(dyn std::future::Future<Output = usize> + 'static)>`
  = note: the return type of a function must have a statically known size
```

while this one works fine ([Playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=6815a4f55394544fd78a18b446099d89))
```rust
fn get_closure() -> impl Fn() -> Box<dyn std::future::Future<Output = usize>> {
    || Box::new(async { 5 })
}
```
Repository: rust
Issue: `repr(C)` is not respected for enums with uninhabited variants
Labels: T-compiler,C-bug,T-opsem,A-repr

Uninhabited `repr(C)` enums are size zero, _not_ the size of their discriminant. [For instance](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=ab603e5a7bb2d0894ea22595bfdf599e):

```rust
enum Never {}

#[repr(C, u64)]
enum E {
    _X(Never),
    _Y(Never),
}

fn main (){
    use core::mem::size_of;

    let never_size = size_of::<Never>();
    assert_eq!(0, never_size);
    
    let disr_size = size_of::<u64>();
    assert_eq!(8, disr_size);
    
    let expected_enum_size = disr_size + never_size;
    let actual_enum_size = size_of::<E>();
    
    assert_eq!(expected_enum_size, actual_enum_size); // FAIL! 8 != 0
}
```

At best, this leads to nonsensical errors. For instance, [this][infinite-size]:
```rust
enum Never {}

#[repr(C, u64)]
enum E {
    _X(Never),
    _Y(E),
}
```
[produces this error message](infinite-size):
```
error[E0072]: recursive type `E` has infinite size
 --> src/lib.rs:4:1
  |
4 | enum E {
  | ^^^^^^ recursive type has infinite size
5 |     _X(Never),
6 |     _Y(E),
  |        - recursive without indirection
  |
  = help: insert indirection (e.g., a `Box`, `Rc`, or `&`) at some point to make `E` representable
```

[infinite-size]: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=ef95b35c6f9951ee82edfda0ab6e8f6a

At worst, it violates the specification of [RFC2195: _Really Tagged Unions_](https://rust-lang.github.io/rfcs/2195-really-tagged-unions.html), which dictates [that `E` should be layout-compatible to the `union` of its variants](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=86bf6b539516cc82280ddedb15730c45):
```rust
use core::mem::size_of;

#[derive(Copy, Clone)]
enum Never {}
// This:

#[repr(C, u64)]
enum E {
    _X(Never),
    _Y(Never),
}

// ...should have the same layout as `ERepr`:

#[derive(Copy, Clone)]
#[repr(C)]
union ERepr {
    A: EX,
    B: EY,
}

type ETag = u64;

#[derive(Copy, Clone)] struct EX(ETag, Never);
#[derive(Copy, Clone)] struct EY(ETag, Never);

// ...but it doesn't:

fn main() {
    assert_eq!(size_of::<E>(), size_of::<ERepr>()); // FAIL: 0 != 8
}
```
Repository: svelte
Issue: Portal in examples section
Labels: temp-stale,documentation

Can we add this Portal repl in the examples section?

https://github.com/sveltejs/svelte/issues/3088#issuecomment-505785516

```svelte
<script>
// src/components/Portal.svelte
import { onMount, onDestroy } from 'svelte'
let ref
let portal

onMount(() => {
  portal = document.createElement('div')
  portal.className = 'portal'
  document.body.appendChild(portal)
  portal.appendChild(ref)
})

onDestroy(() => {
  document.body.removeChild(portal)
})

</script>

<div class="portal-clone">
  <div bind:this={ref}>
    <slot></slot>
  </div>
</div>
<style>
  .portal-clone { display: none; }
</style>
```

Copyright @ThomasJuster.
Repository: godot
Issue: `ResourceSaver.save` error in tool script: `get_multiple_md5: Condition ' !f ' is true.`
Labels: bug,topic:core,confirmed,crash

**Godot version:**

Godot Engine v3.1.2.stable.official

**OS/device including version:**

Mac OS 10.14.6

**Issue description:**

Usage of `ResourceSaver.save(name, texture)` produce sometime the following error :
`
ERROR: get_multiple_md5: Condition ' !f ' is true. Continuing..:
   At: core/os/file_access.cpp:622.
`

Which crash Godot (freeze)

**Steps to reproduce:**

1 - Unzip test project
2 - Start from command line
3 - Freeze of Godot, error in the terminal

Look into addons/codeandweb.texturepacker/texturepacker_import_spritesheet.gd line 115, it's where the method call is.
You can also see the that file here : [file on github](https://github.com/CodeAndWeb/texturepacker-godot-plugin/blob/master/addons/codeandweb.texturepacker/texturepacker_import_spritesheet.gd#L115)

**Minimal reproduction project:**
[importBug.zip](https://github.com/godotengine/godot/files/4041854/importBug.zip)

To be noted that I've already spent 3 hours with the plugin author to try to debug the issue, but our conclusion is that it's a bug inside Godot and we are a bit clueless on how to move forward to fix that :D

It doesn't seems to be an issue with the plugin itself, but if so please let met know where.

Thanks !
Repository: terminal
Issue: Investigate independent input source for Swap Chain Panel
Labels: Help Wanted,Area-Rendering,Product-Terminal,Issue-Task

While reading some background documentation on how this whole co* stuff worked, I noticed that `SwapChainPanel` apparently has a provision to let background threads potentially mess with the chain instead of having to jump to the UI thread to do so:

https://docs.microsoft.com/en-us/uwp/api/windows.ui.xaml.controls.swapchainpanel.createcoreindependentinputsource#Windows_UI_Xaml_Controls_SwapChainPanel_CreateCoreIndependentInputSource_Windows_UI_Core_CoreInputDeviceTypes_

It's probably not easily/instantly applicable here. But I want to leave the note because I thought of it and @DHowett-MSFT and @zadjii-msft might have an opinion on whether that would be a decent follow-on task to generate from this comment.

_Originally posted by @miniksa in https://github.com/microsoft/terminal/pull/4051/threads/MDIzOlB1bGxSZXF1ZXN0UmV2aWV3VGhyZWFkMjIzNTY3ODg3OnYy/unresolve_


This represents investigating whether using this is a good idea or not.
Repository: opencv
Issue: CV_Assert does not properly use global namespace lookups
Labels: bug,priority: low,category: build/install

If a user does something like this:
```c++
namespace X
{
namespace cv
{
auto
my_function(::cv::InputArray img) -> ::cv::Mat_<uchar>
{
  CV_Assert(img.channels() == 3);
}
}
}
```
,
the code will fail to compile with failed lookup of `cv::Error`.

```bash
error: no member named 'Error' in namespace 'X::cv'; did you mean '::cv::Error'?
 CV_Assert(img.channels() == 3);
```

This is because of how the macro expands out by using `cv` without global scope resolution via `::cv`.
Repository: flutter
Issue: PaginatedDataTable footer likely won't handle text zoom correctly
Labels: framework,f: material design,team-design,triaged-design

As pointed out by @Hixie [here](https://github.com/flutter/flutter/pull/47555/files/b3deb9139d0df48a7df442afcf03c94dedb3b487#diff-243d50d685c9399394efa4693f2ac703R488), the footer for a `PaginatedDataTable` likely won't handle text zoom correctly.