id
int64 393k
2.82B
| repo
stringclasses 68
values | title
stringlengths 1
936
| body
stringlengths 0
256k
⌀ | labels
stringlengths 2
508
| priority
stringclasses 3
values | severity
stringclasses 3
values |
---|---|---|---|---|---|---|
306,221,578 | go | flag: Value description is inaccurate about zero-values | ```
// The flag package may call the String method with a zero-valued receiver,
// such as a nil pointer.
type Value interface {
String() string
Set(string) error
}
```
But in the example we have:
```
// String is the method to format the flag's value, part of the flag.Value interface.
// The String method's output will be used in diagnostics.
func (i *interval) String() string {
return fmt.Sprint(*i)
}
```
Which would panic if called with a nil pointer receiver.
Actually that code should be fine because String is never called with a nil pointer receiver (flag.isZeroValue uses reflect.New if the receiver is a pointer), but it is still contradictory.
In fact, from the current phrasing you could assume that doing something like this is fine, which is not:
```
func (x *mytype) String() string {
if x == nil { // guard for flag.Value requirement
return "foo"
}
return *x.ptr // my constructor guarantees this is fine
}
```
Moreover from the flag.Value description it is not outright clear why the caller has to prepare to handle a value that he never produced.
Yes, the flag.PrintDefaults description answers that, but maybe it would be helpful to mention in the flag.Value description too, that the zero-value string representation is just used to turn off displaying the default (either because it is an unused value meaning *off*, or because it is an *obvious default*).
For instance if someone writes a flag.Value implementation whose zero-value (not the nil pointer) represents an inconsistent state (like I did), he would have to figure out what his String method is supposed to return in such a case and why it matters. | NeedsFix | low | Critical |
306,272,261 | TypeScript | Missing error if ClassDeclaration is used in Statement position | <!-- 🚨 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 CONTRIBUTING guidelines: https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md
* Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ
-->
<!-- If you have a QUESTION:
THIS IS NOT A FORUM FOR QUESTIONS.
Ask questions at http://stackoverflow.com/questions/tagged/typescript
or https://gitter.im/Microsoft/TypeScript
-->
<!-- If you have a SUGGESTION:
Most suggestion reports are duplicates, please search extra hard before logging a new suggestion.
See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md
-->
<!-- If you have a BUG:
Please fill in the *entire* template below.
-->
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:** 2.8.0-dev.20180318
<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** class statement
**Code**
```ts
let codition = false as boolean;
if (condition)
class C {} // runtime error if transpiled to ES2015 or above: Unexpected token class
if (condition)
enum E { Foo } // should probably be an error?
new C(); // runtime error if transpiled to ES5, because 'C' is undefined
E.Foo; // runtime error: cannot read property 'Foo' of 'E'
```
**Expected behavior:**
Expected a compile error on `class C` and maybe on `enum E`
**Actual behavior:**
no error for these declarations, instead I get a runtime error when targeting ES2015 or above.
**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->
**Related Issues:**
| Bug,Help Wanted,Effort: Casual | low | Critical |
306,288,152 | rust | unused variable: warn about std::collections that are pushed to but not used afterwards | ````rust
fn main() {
let mut var: Vec<i64> = Vec::new();
var.push(1);
}
````
I would expect a warning here that ````var```` is unused.
I get that it is "used" in the sense that we push to it, however the *resulting* vector is still not done anything with.
Some kind of dead-store warning about the collection being unused/never queried after receiving an item might be helpful. | C-enhancement,A-lints,A-collections,T-compiler | low | Major |
306,291,262 | node | child_process: 'close' not emitted after .disconnect() in parent process | * **Version**: v9.8.0
* **Platform**: Linux 64bit
* **Subsystem**: child_process
When calling ``child.disconnect()`` from a parent process (not in cluster mode), the child process object does not emit a ``close`` event after the ``exit`` event.
If however the child process itself calls ``process.disconnect()`` it works as expected.
**Example:**
```js
// parent.js
const child_process = require('child_process');
const child = child_process.fork('./child.js', {
stdio: ['pipe', 'pipe', 'pipe', 'ipc']
});
setTimeout(() => {
child.disconnect();
}, 1000);
child.on('exit', () => {
console.log('exit');
});
child.on('close', () => {
console.log('close');
});
child.stderr.pipe(process.stderr);
child.stdout.pipe(process.stdout);
```
```js
// child.js
process.on('disconnect', () => {
console.log('cya');
});
```
**Output:**
```
cya
exit
```
**Expected Output:**
```
cya
exit
close
``` | help wanted,child_process | low | Minor |
306,334,041 | flutter | Update flutter_driver.CommonFinders docs to mention why find.byIcon etc aren't there and how to work around that | In common finders class there are many methods for finding a widget by using ancestor, byElementPredicate, byElementType, byicon etc for QA in order to write test scripts using flutterDriver.
Logs
The application runs fine with flutter run. I am trying to automated the testing.
```
Flutter Doctor
[√] Flutter (Channel beta, v0.1.5, on Microsoft Windows [Version 6.1.7601], locale en-US)
• Flutter version 0.1.5 at C:\Users\biswajeet\Documents\Flutter\flutter
• Framework revision 3ea4d06 (3 weeks ago), 2018-02-22 11:12:39 -0800
• Engine revision ead227f
• Dart version 2.0.0-dev.28.0.flutter-0b4f01f759
[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at D:\sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.3
• ANDROID_HOME = D:\sdk
• Java binary at: C:\Program Files\Android\Android Studio1\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
[!] Android Studio (version 2.3)
• Android Studio at C:\Program Files\Android\Android Studio
X Unable to find bundled Java version.
• Try updating or re-installing Android Studio.
[√] Android Studio (version 3.0)
• Android Studio at C:\Program Files\Android\Android Studio1
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
[√] VS Code (version 1.21.0)
• VS Code at C:\Program Files (x86)\Microsoft VS Code
• Dart Code extension version 2.10.0
[√] Connected devices (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 7.1.1 (API 25) (emulator)
! Doctor found issues in 1 category.
``` | tool,d: api docs,t: flutter driver,P2,team-tool,triaged-tool | low | Minor |
306,340,734 | go | x/build/maintner: Support additional label details | Right now, [`maintner.GitHubLabel`](https://godoc.org/golang.org/x/build/maintner#GitHubLabel) contains only the bare minimal information about labels: its id and name. Labels on GitHub have [additional useful information](https://github.com/golang/go/labels), including:
- color
- description
Is it in scope of `maintner.Corpus` to add support for tracking that additional information?
If this is chosen to be done, it should be a tiny increase of file size and memory requirements, compared to what's needed fetching all the issues already. Labels change very little. This is assuming it is implemented efficiently, where each issue only contains the label ids, but the label details are stored in a separate map. I.e., you probably wouldn't want copies of "Used by googlebot to label PRs as having a valid CLA. The text of this label should not change." label description text to be stored alongside with each issue that has the `cla: yes` label applied.
I'm not yet closely familiar with how data is stored, so I don't know if the efficient implementation can be attained while modifying `maintner.GitHubLabel` to contain the extra fields (it'd be more friendly API if so), or if they'd have to be stored in a separate map and looked up by id by the user. But either way is okay.
(/cc @bradfitz @andybons This is `maintner`-related.) | Builders | low | Minor |
306,347,751 | flutter | Should support to add an icon in the SnackBarAction | Now only support a String .
why not use a widget? | c: new feature,framework,f: material design,P3,team-design,triaged-design | low | Major |
306,410,515 | scrcpy | Add the possibility to record inputs | Thank you again for your project.
Can we add the possibility to record the input ? The goal here is too use it with monkeyrunner or some functionnal testing tools :) | feature request | low | Minor |
306,428,608 | TypeScript | Bug: Incorrect module resolution for "valid" ES2015 specifiers with hashes and/or search parameters | **TypeScript Version:** 2.8.0-dev.20180315
**Search Terms:** moduleResolution "module path" hash
**Code**
```ts
import { x as x1 } from './x.m.js'; // Typed correctly on hover
import { x as x2 } from './x.m.js#esm' // Typed as "import x…" on hover
```
**Expected behavior:**
Since module specifiers are now standardized, whereby if given an absolute specifier (or a relative specifier and the absolute referrer) should always result in a validly constructed `new URL(specifier, referrer)` it is expected that when a specifier includes suffix aspects like hash and search, that those aspects would be excluded from the pathname that is being resolved.
The implications of hash and search in runtime is beyond the scope of TypeScript and should remain so unless somehow the environment is customized to behave different (plugins maybe). However, if at all relevant, the specs have stated that at runtime each unique "resolved" URL (including hash and search) evaluates to a single unique instance of the respective module. It is not expected that TypeScript would need to determine if and when a module is a specific unique instance. It is however expected that when suffix aspects are included in the specifier that TypeScript would still resolve it's types identically as it does for the pathname sans hash and search.
Sorry for the long text!
**Actual behavior:**
TypeScript does not resolve pathnames with hash or search parameters. | Suggestion,Awaiting More Feedback,Domain: ES Modules | low | Critical |
306,465,311 | go | gccgo: improperly ordered evaluation of "x, z := f(&x), f(&x)" | This is an issue separated from https://github.com/golang/go/issues/23188.
### What version of Go are you using (`go version`)?
go version go1.10 linux/amd64
### Does this issue reproduce with the latest release?
yes
### Description
sorry, this issue is a little complex, so I don't use the issue report template.
First, the behaviors of gc and gccgo are different for the following program.
```golang
package main
import "fmt"
func f(p *int) int {
*p = 123
return *p
}
func main() {
var x int
y, z := x, f(&x)
fmt.Println(y, z) // gc: 123 123. gccgo: 0 123
}
```
But, the behaviors of the two compiler are the same for the following modified version.
I think here gccgo is inconsistent with itself.
```golang
package main
import "fmt"
func f(p *int) int {
*p = 123
return *p
}
func main() {
var x int
x, z := x, f(&x)
fmt.Println(x, z)// both: 123 123
}
```
There is certainly a bug in gccgo (may be also not, as spec really doesn't specify the order).
Whether or not it is a bug for gc is not specified in Go spec.
However, I think, it is best to specify the order in Go spec (if it is possible).
| NeedsFix | low | Critical |
306,466,179 | rust | Value assigned is never read | I have the following simple code:
```
fn main() {
let mut foo = String::new();
foo = "Hi!".to_string();
println!("{}", foo);
}
```
The compiler gives me the following warning:
```
warning: value assigned to `foo` is never read
--> src\main.rs:2:6
|
2 | let mut foo = String::new();
| ^^^^^^^
|
= note: #[warn(unused_assignments)] on by default
```
This warning seems to be wrong to me. The assignment `foo` has been used in the println! macro. So I should not get this error. When I remove the mutable assignment as follows, I get no warning as expected:
```
fn main() {
let foo = "Hi!".to_string();
println!("{}", foo);
}
```
I am using rustc 1.24.1 (d3ae9a9e0 2018-02-27) on Windows 7. | C-enhancement,A-lints,T-compiler,A-suggestion-diagnostics | medium | Critical |
306,477,764 | flutter | flutter test --machine differs from pub test protocol (debug/observatory event) | @devoncarew suggested these should be the same (and I hope they are, so I can re-use this same debug adapter for Dart and Flutter in future).
Mostly they seem the same, but the [json spec](https://github.com/dart-lang/test/blob/master/doc/json_reporter.md) for the `test` package says this that there is a debug event with `type=debug`, however it actually comes through in a very different format to the other messages (it's bracketed, called `test.startedProcess` and in the format of other Flutter message, not the format of these other test messages):
```text
[13:53:41]: <== {"suite":{"id":0,"platform":"vm","path":"m:\\Coding\\Applications\\Dart-Code\\test\\test_projects\\flutter_hello_world\\test\\hello_test.dart"},"type":"suite","time":0}
[13:53:41]: <== {"test":{"id":1,"name":"loading m:\\Coding\\Applications\\Dart-Code\\test\\test_projects\\flutter_hello_world\\test\\hello_test.dart","suiteID":0,"groupIDs":[],"metadata":{"skip":false,"skipReason":null},"line":null,"column":null,"url":null},"type":"testStart","time":1}
[13:53:41]: <== [{"event":"test.startedProcess","params":{"observatoryUri":"http://127.0.0.1:10284/"}}]
[13:53:43]: <== {"testID":1,"result":"success","skipped":false,"hidden":true,"type":"testDone","time":2141}
[13:53:43]: <== {"group":{"id":2,"suiteID":0,"parentID":null,"name":null,"metadata":{"skip":false,"skipReason":null},"testCount":1,"line":null,"column":null,"url":null},"type":"group","time":2147}
```
| a: tests,tool,P3,team-tool,triaged-tool | low | Critical |
306,547,395 | node | win, cluster: no callback called after write | <!--
Thank you for reporting an issue.
This issue tracker is for bugs and issues found within Node.js core.
If you require more general support please file an issue on our help
repo. https://github.com/nodejs/help
Please fill in as much of the template below as you're able.
Version: output of `node -v`
Platform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows)
Subsystem: if known, please specify affected core module name
If possible, please provide code that demonstrates the problem, keeping it as
simple and free of external dependencies as you are able.
-->
* **Version**: 9.6.0
* **Platform**: Windows
* **Subsystem**: cluster
On Windows, after calling `process.disconnect` callbacks for previous `process.send` calls are not called. Example:
```javascript
'use strict';
const cluster = require('cluster');
if (cluster.isMaster) {
cluster.fork().on('message', (msg) => {
console.log(msg.msg);
});
} else {
process.send({msg: 'hello'}, () => {
console.log('cb!');
});
process.disconnect();
}
```
On Windows this will print:
```
hello
```
whereas on Linux it will print
```
hello
cb!
```
This was reported in https://github.com/libuv/libuv/issues/1729, but it looks like some issue with cluster module. Callbacks are called on both platforms in the following code, which uses bare IPC pipe:
```javascript
const cp = require('child_process');
if (process.argv[2] === 'child') {
process.send({msg: 'hello'}, () => {
console.log('cb!');
});
process.disconnect();
} else {
const child = cp.spawn(process.argv0, [__filename, 'child'], {
stdio: ['inherit', 'inherit', 'inherit', 'ipc']
});
child.on('message', (msg) => {
console.log(msg.msg);
})
}
```
On Windows this will print:
```
hello
cb!
```
and on Linux:
```
cb!
hello
```
/cc @nodejs/platform-windows @nodejs/cluster | help wanted,cluster,windows | low | Critical |
306,645,710 | neovim | please document E903 (and other similar errors) | <!-- Before reporting: search existing issues and check the FAQ. -->
- `nvim --version`: v0.2.3-874-g739fb93a9 (nvim.appimage nightly build)
- Vim (version: ) behaves differently? N/A
- Operating system/version: linux
- Terminal name/version: putty
- `$TERM`:tmux-256colors
I got a bug [report about a failing `jobstart()`](https://github.com/vim-airline/vim-airline/issues/1692) in vim-airline. It seems that jobstart() fails, because of a invalid CWD (directory without x bit). Now I wondered whether this error happens, because I was missing a `on_stderr` message or whether I should simply try/catch that error to silence it.
However I cannot find any documentation on what E903 actually means? Vim allows usually to `:h EXXX` to get more information, however it seems like this is not really documented for neovim. | documentation | low | Critical |
306,651,777 | flutter | Commands that have --offline as an option should recommend it when unable to connect. | `flutter create` and `flutter packages get` (and others?) have an `--offline` flag that allows them to work offline if the pub cache is sufficiently full. We should have those commands recommend using `--offline` if they fail to connect to the server.
Alternatively, we could just go ahead and try to run offline automatically (with a great big warning that we've done so) if we can't connect. | c: new feature,tool,P3,team-tool,triaged-tool | low | Major |
306,682,371 | flutter | Document how to use GlobalKey with TextField and OrientationBuilder | ## Steps to Reproduce
1. Pull down https://github.com/flutter/udacity-course/pull/80
2. Build the app - note that tapping on the TextField input causes the keyboard to appear, but immediately disappear.
3a. Wrap the widget in converter_route's build function with a SingleChildScrollView. This resolves the issue. But then in landscape mode, the width of the widget (450.0) is ignored.
3b. Wrap only the Orientation.portrait return widget with a SingleChildScrollView. This doesn't resolve the keyboard disappearing issue.
@HansMuller | framework,d: api docs,P2,team-framework,triaged-framework | low | Major |
306,697,833 | go | x/website: addressing inaccessible links on CN site | Many of the external links on [golang.google.cn](https://golang.google.cn) are inaccessible from Mainland China (e.g. `*.golang.org`, `*.blogspot.com`, `*.googlesource.com`), which might cause some troubles for Chinese developers.
Directly removing all inaccessible links would lead to situations like: "For more details, please check out this post" (while there isn't a link, nor is it clear which post it is). Instead, we can keep those links and automatically render a tooltip for blacklisted URLs that is shown if you put your mouse over it (a hover overlay, actually already implemented in the DevSite infrastructure. For instance [tensorflow.google.cn](https://tensorflow.google.cn), put mouse over the Google logo in the company list to test)
The other route we could take is to separate files, like `go_faq.zh.html`, and let them slowly be translated by the community. It would be nice to have Chinese translations in the future. We'd have to remember to add content to both in the future, though.
See the discussion on https://go-review.googlesource.com/c/go/+/89215 for more context.
/cc @chenglu for checking CN site policies @andybons @bradfitz | NeedsInvestigation | low | Major |
306,716,593 | youtube-dl | YouTubeTV does't work | Login to YTTV fails ... the login page is not the same as regular YT, so ytdl can't parse it.
YTTV has a free trial, easy to test, with pretty much any video. Access is only possible by clicking the "Already a Member?" link on the redirected page, then entering your google acct info.
youtube-dl --verbose -F -u <username> -p <password> "https://tv.youtube.com/watch/a43h5AS8ik4?vpp=2AEA"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--verbose', '-F', '-u', 'PRIVATE', '-p', 'PRIVATE', 'https://tv.youtube.com/watch/a43h5AS8ik4?vpp=2AEA']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2018.03.20
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.16299
[debug] exe versions: ffmpeg N-77380-g2dba040
[debug] Proxy map: {}
[generic] a43h5AS8ik4?vpp=2AEA: Requesting header
[redirect] Following redirect to https://tv.youtube.com/welcome/?vpp=2AEA&dst=watch/a43h5AS8ik4
[youtube:user] Downloading login page
[youtube:user] Looking up account info
[youtube:user] Logging in
WARNING: Unable to login: Invalid password
[youtube:user] welcome: Downloading channel page
WARNING: Unable to download webpage: HTTP Error 404: Not Found
[youtube:user] welcome: Downloading page #1
ERROR: Unable to download webpage: HTTP Error 404: Not Found (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpbt_jbnlh\build\youtube_dl\extractor\common.py", line 519, in _request_webpage
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpbt_jbnlh\build\youtube_dl\YoutubeDL.py", line 2199, in urlopen
File "C:\Python\Python34\lib\urllib\request.py", line 470, in open
File "C:\Python\Python34\lib\urllib\request.py", line 580, in http_response
File "C:\Python\Python34\lib\urllib\request.py", line 508, in error
File "C:\Python\Python34\lib\urllib\request.py", line 442, in _call_chain
File "C:\Python\Python34\lib\urllib\request.py", line 588, in http_error_default
| geo-restricted,account-needed | low | Critical |
306,752,804 | rust | miri interpretation of large array initialization is slow | Right now, if you are initializing a large array either manually or with an array repeat expression takes a long time during interpretation.
* [ ] Fixing array repeat expressions requires us to stop filling each element individually and just manually filling up the virtual memory (https://github.com/rust-lang/rust/blob/master/src/librustc_mir/interpret/eval_context.rs#L591)
Arrays with lots of fields that are initialized as
```rust
static FOO: [T; N] = [A, B, C, ....., XX, XY];
```
are turned into the MIR equivalent of
```rust
static FOO: [T; N] = {
let array: [T; N] = mem::uninitialized();
let a = A;
let b = B;
let c = C;
....
let xx = XX;
let xy = XY;
array = [A, B, C, ...., XX, XY];
array
}
```
Which requires twice the memory (once for each variable and once for the array) and twice the instructions (initializing the variables and copying each variable into the array).
* [ ] Instead, we should turn that MIR into
```rust
static FOO: [T; N] = {
let array: [T; N] = mem::uninitialized();
array[0] = A;
array[1] = B;
array[2] = C;
....
array[N-2] = XX;
array[N-1] = XY;
array
}
```
What do you think @eddyb ?
cc @Zoxc @bob_twinkles @rkruppe | I-slow,C-enhancement,I-compiletime,T-compiler,A-MIR,A-const-eval,A-miri,A-mir-opt,C-optimization | low | Major |
306,769,290 | vue | Subscribe to all custom events on a child component | ### What problem does this feature solve?
Would make writing wrapper components easier
### What does the proposed API look like?
When v-on receives a function it should trigger on every custom event emitted by the child
<my-custom-component v-bind="$props" v-on="onAnyEvent"></my-custom-component>
Argument one could be the name of the event
onAnyEvent(eventName, eventArgs) { // do something }
<!-- generated by vue-issues. DO NOT REMOVE --> | feature request | low | Major |
306,816,656 | pytorch | Build Fails on Gentoo with CUDA 9.1, GCC 6.4, Python 3.5 | Hello,
I have been unable to compile the source on my gentoo box. Here are the error messages I'm currently getting:
17%] Building NVCC (Device) object src/ATen/CMakeFiles/ATen.dir/native/cuda/ATen_generated_TensorFactories.cu.o
/tmp/pytorch/aten/src/ATen/native/cuda/Embedding.cu(36): warning: function "__any"
/opt/cuda/include/device_atomic_functions.h(180): here was declared deprecated ("__any() is deprecated in favor of __any_sync() and may be removed in a future release (Use -Wno-deprecated-declarations to suppress this warning).")
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/tuple: In instantiation of ‘static constexpr bool std::_TC<<anonymous>, _Elements>::_MoveConstructibleTuple() [with _UElements = {std::tuple<at::Tensor&, at::Tensor&, at::Tensor&>}; bool <anonymous> = true; _Elements = {at::Tensor&, at::Tensor&, at::Tensor&}]’:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/tuple:626:248: required by substitution of ‘template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor&, at::Tensor&, at::Tensor&>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor&, at::Tensor&, at::Tensor&>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor&, at::Tensor&, at::Tensor&>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type <anonymous> > constexpr std::tuple< <template-parameter-1-1> >::tuple(_UElements&& ...) [with _UElements = {std::tuple<at::Tensor&, at::Tensor&, at::Tensor&>}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor&, at::Tensor&, at::Tensor&>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor&, at::Tensor&, at::Tensor&>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor&, at::Tensor&, at::Tensor&>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type <anonymous> = <missing>]’
/tmp/pytorch/torch/lib/build/aten/src/ATen/ATen/Functions.h:1626:61: required from here
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/tuple:483:67: error: mismatched argument pack lengths while expanding ‘std::is_constructible<_Elements, _UElements&&>’
return __and_<is_constructible<_Elements, _UElements&&>...>::value;
^~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/tuple:484:1: error: body of constexpr function ‘static constexpr bool std::_TC<<anonymous>, _Elements>::_MoveConstructibleTuple() [with _UElements = {std::tuple<at::Tensor&, at::Tensor&, at::Tensor&>}; bool <anonymous> = true; _Elements = {at::Tensor&, at::Tensor&, at::Tensor&}]’ not a return-statement
}
^
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/tuple: In instantiation of ‘static constexpr bool std::_TC<<anonymous>, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {std::tuple<at::Tensor&, at::Tensor&, at::Tensor&>}; bool <anonymous> = true; _Elements = {at::Tensor&, at::Tensor&, at::Tensor&}]’:
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/tuple:626:362: required by substitution of ‘template<class ... _UElements, typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor&, at::Tensor&, at::Tensor&>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor&, at::Tensor&, at::Tensor&>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor&, at::Tensor&, at::Tensor&>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type <anonymous> > constexpr std::tuple< <template-parameter-1-1> >::tuple(_UElements&& ...) [with _UElements = {std::tuple<at::Tensor&, at::Tensor&, at::Tensor&>}; typename std::enable_if<(((std::_TC<(sizeof... (_UElements) == 1), at::Tensor&, at::Tensor&, at::Tensor&>::_NotSameTuple<_UElements ...>() && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor&, at::Tensor&, at::Tensor&>::_MoveConstructibleTuple<_UElements ...>()) && std::_TC<(1ul == sizeof... (_UElements)), at::Tensor&, at::Tensor&, at::Tensor&>::_ImplicitlyMoveConvertibleTuple<_UElements ...>()) && (3ul >= 1)), bool>::type <anonymous> = <missing>]’
/tmp/pytorch/torch/lib/build/aten/src/ATen/ATen/Functions.h:1626:61: required from here
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/tuple:489:65: error: mismatched argument pack lengths while expanding ‘std::is_convertible<_UElements&&, _Elements>’
return __and_<is_convertible<_UElements&&, _Elements>...>::value;
^~~~~
/usr/lib/gcc/x86_64-pc-linux-gnu/6.4.0/include/g++-v6/tuple:490:1: error: body of constexpr function ‘static constexpr bool std::_TC<<anonymous>, _Elements>::_ImplicitlyMoveConvertibleTuple() [with _UElements = {std::tuple<at::Tensor&, at::Tensor&, at::Tensor&>}; bool <anonymous> = true; _Elements = {at::Tensor&, at::Tensor&, at::Tensor&}]’ not a return-statement
}
and then several more pages of this. Any ideas? Please let me know if there's particular information that I'm omitting that would be helpful. | module: build,triaged | low | Critical |
306,844,127 | flutter | DateFormat Crash - Locale data has not been initialized, call initializeDateFormatting(<locale>) | Hey all! Was trying to format Dates with i18n translations. I ran into some interesting issues and wanted to share my journey to see if there's any improvements that can be made in this arena!
## Steps to Reproduce
1. Use a `new DateFormat('d.MMMM y', 'en').format(date);` -- everything works great
2. Use `new DateFormat('d.MMMM y', 'no').format(date);` -- Oh no, errors! Norwegian language not supported.
3. Ok, intl package says I need to call `initializeDateFormatting`. Done. Wait! It actually doesn't do anything, since if you've already initialized some locales, this function will actually be a no-op!
4. Realize the MaterialLocalizations are calling `initializeDateFormattingCustom` version of this function, but with only a sub-set of the languages supported by the i18n package :( :( :(
5. Discover I can call `initializeDateFormattingCustom` myself! However, rather than relying on the `intl` package to do this for me with `initializeDateFormatting` with all supported locales, I need to do this manually for each supported language like this:
```dart
initializeDateFormattingCustom(
locale: 'no',
symbols: dateTimeSymbolMap()['no'],
patterns: dateTimePatternMap(),
);
```
Overall, formatting Dates was pretty rough, and required I dig through the internals of the MaterialLocalizations and intl package to get it working. I tried calling `initializeDateFormatting` myself before the MaterialLocalizations did their thing, but that caused other errors.
## Possible solution
It would be great if i18n date formatting "Just Worked" by instantiating the `initializeDateFormatting` method up front, rather than instantiating a bunch of `initializeDateFormattingCustom` locales in the MaterialLocalizations.
Alternative solution: Could MaterialLocalizations instantiate only the locales in `supportedLocales`? | c: crash,framework,a: internationalization,has reproducible steps,P2,found in release: 3.7,found in release: 3.9,team-framework,triaged-framework | low | Critical |
306,850,840 | rust | Constants can contain references that are not Sync | This compiles ([playground](https://play.rust-lang.org/?gist=fa10d9ae0d7d9992a1c1d48862a417ca&version=nightly)):
```rust
#![feature(negative_impls)]
#[derive(Debug)]
struct Foo {
value: u32,
}
impl !std::marker::Sync for Foo {}
fn inspect() {
let foo: &'static Foo = &Foo { value: 1 };
println!(
"I am in thread {:?}, address: {:p}",
std::thread::current().id(),
foo as *const Foo,
);
}
fn main() {
let handle = std::thread::spawn(inspect);
inspect();
handle.join().unwrap();
}
```
And prints this (addresses vary, but always the same):
```
I am in thread ThreadId(0), address: 0x5590409f7adc
I am in thread ThreadId(1), address: 0x5590409f7adc
```
Which shows that two threads get the same `'static` reference to non-`Sync` struct.
The problem is that promotion to static does not check if the type is `Sync`, while doing it manually does (this does not compile):
```rust
static PROMOTED: Foo = Foo { value: 1 };
let foo = &PROMOTED;
```
Reading the [RFC](https://github.com/rust-lang/rfcs/blob/master/text/1414-rvalue_static_promotion.md), it seems that the relevant condition is about containing `UnsafeCell`, but does not account for other `!Sync` types, which are also not supposed to be shared across treads. | P-medium,T-compiler,I-unsound,C-bug,A-const-eval,F-negative_impls,S-bug-has-test,T-types | high | Critical |
306,930,340 | rust | Inconsistent `Path::file_stem` and `Path::extension` handling of files starting with multiple dots | I've been using the `Path::file_stem` and `Path::extension` functions and while writing some tests for my code I've found an inconsistent handling of filenames which start with more than one dot (for example `..a` or `...a`), as exemplified below. While names like these are atypical, they are however valid file names (which I would say have no extension).
The following code ( https://play.rust-lang.org/?gist=06fc9a031434d53f0c41a34ca5051170 ):
let p = Path::new ("a"); println! ("{:?} -> {:?} + {:?}", p, p.file_stem (), p.extension ());
let p = Path::new (".a"); println! ("{:?} -> {:?} + {:?}", p, p.file_stem (), p.extension ());
let p = Path::new ("..a"); println! ("{:?} -> {:?} + {:?}", p, p.file_stem (), p.extension ());
let p = Path::new ("...a"); println! ("{:?} -> {:?} + {:?}", p, p.file_stem (), p.extension ());
let p = Path::new ("."); println! ("{:?} -> {:?} + {:?}", p, p.file_stem (), p.extension ());
let p = Path::new (".."); println! ("{:?} -> {:?} + {:?}", p, p.file_stem (), p.extension ());
let p = Path::new ("..."); println! ("{:?} -> {:?} + {:?}", p, p.file_stem (), p.extension ());
Prints the following:
"a" -> Some("a") + None
".a" -> Some(".a") + None
!! "..a" -> Some(".") + Some("a")
!! "...a" -> Some("..") + Some("a")
"." -> None + None
".." -> None + None
!! "..." -> Some("..") + Some("")
The issue can be seen in the lines marked with `!!`, where I would expect that the `Path::file_stem` to return the entire name and `Path::extension` to return `None` as there is no "proper" extension in this case. Namely I would expect the output to be:
"..a" -> Some("..a") + None
"...a" -> Some("...a") + None
"..." -> Some("...") + None
| C-enhancement,T-libs-api,A-io | low | Minor |
306,978,113 | go | net/http: WriteTimeout times out writes before they're written | (related to #21389)
### What version of Go are you using (`go version`)?
I checked `go version go1.10 linux/amd64` and `go version go1.9.4 linux/amd64`, which behave the same.
### Does this issue reproduce with the latest release?
Yeah.
### What operating system and processor architecture are you using (`go env`)?
```
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ubuntu/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ubuntu/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-build665138149=/tmp/go-build -gno-record-gcc-switches"
```
### What did you do?
I set `WriteTimeout` to some value, which was smaller than the time handler took to handle the request.
https://gist.github.com/WGH-/90bbfe656e63f6fa457db84f91384c41
```
curl '18.196.145.219:8080/foo?t=1.5s' -v
```
### What did you expect to see?
Well, the documentation clearly states "It is reset whenever a new request's header is read.", after all. So strictly speaking, everything is working as intended.
However, I expected that `WriteTimeout` would only timeout write calls that're taking too long, or at least that it would start ticking at the first write. It would make much more sense this way.
### What did you see instead?
As soon as server tries to write anything, even it hasn't written anything before, assuming timeout is passed, it will close the connection.
```
curl: (52) Empty reply from server
``` | Documentation,help wanted,NeedsFix | low | Critical |
307,024,296 | pytorch | Conv-RNN combination slow in backward pass | Models used for processing audio signals often combine a Conv layer with a GRU/LSTM layer. In pytorch, this kind of combination seems to yield an unexpectedly long backward pass. Here is a minimal model of this kind:
```python
class PyTorchModel(nn.Module):
def __init__(self, num_channels, kernel_size):
super().__init__()
self.conv = nn.Conv1d(num_channels, num_channels, kernel_size, padding=int((kernel_size - 1) / 2))
self.gru = nn.GRU(num_channels, num_channels, batch_first=True)
self.fc = nn.Sequential(
nn.Linear(num_channels, 1),
nn.Sigmoid()
)
def forward(self, inp, do_conv=True, do_gru=True):
out = self.conv(inp)
# (batchsize, num_channels, seq_length) -> (batchsize, seq_length, num_channels)
out = out.transpose(1, 2)
out, _ = self.gru(out)
out = self.fc(out)
return out
```
The script provided at the end benchmarks this model and compares the execution times to keras (with tensorflow backend). Here are the benchmark results (obtained on a MacBook Pro with the CPU i7-4980HQ):
```
data for pytorch: X.shape=(32, 128, 2048), Y.shape=(32, 2048, 1)
data for keras: X.shape=(32, 2048, 128), Y.shape=(32, 2048, 1)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Testing Conv and GRU together
pytorch: forward_pass=1.3s backward_pass=40.0s
keras: forward_pass=0.7s backward_pass=2.5s
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Testing Conv only
pytorch: forward_pass=0.5s backward_pass=0.2s
keras: forward_pass=0.3s backward_pass=0.6s
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Testing GRU only
pytorch: forward_pass=0.8s backward_pass=0.9s
keras: forward_pass=0.4s backward_pass=1.8s
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
```
The backward pass for the Conv-GRU model takes 16 times longer in pytorch as compared to keras. There is no such strong difference for a model with only a Conv or a GRU layer. Hence the problems seems to stem from the combination.
An apparent difference between the pytorch and keras implementations is that in pytorch there is a transpose operation between the Conv and the GRU layers. My initial guess was that this is the source of the problem. However, in the benchmark above the cases "Conv only" and "GRU only" also contain a transpose operation (see benchmark script), which doesn't seem to influence the performance negatively.
The results are similar when the GRU is replaced by a LSTM or RNN layer.
Information about the used setup:
- OS: OSX (but tested also on Linux, with similar results)
- PyTorch version: 0.3.1.post2
- How you installed PyTorch: `conda install pytorch -c pytorch `
- Python version: 3.6.3
- CUDA/cuDNN version: no CUDA installed
Script used for benchmarking:
```python
import time
import torch
from torch.autograd import Variable
from torch import nn
import keras.models
from keras.layers import Input, Conv1D, GRU, Dense, TimeDistributed
from keras.optimizers import SGD
batchsize = 32
seq_length = 2048
num_channels = 128
kernel_size = 15
def generate_training_data():
# for pytorch
X = torch.randn((batchsize, num_channels, seq_length))
Y = torch.rand((batchsize, seq_length, 1)).round()
# for keray
Xnp = X.transpose(1, 2).clone().numpy()
Ynp = Y.clone().numpy()
return X, Y, Xnp, Ynp
class PyTorchModel(nn.Module):
def __init__(self):
super().__init__()
self.conv = nn.Conv1d(num_channels, num_channels, kernel_size, padding=int((kernel_size - 1) / 2))
self.gru = nn.GRU(num_channels, num_channels, batch_first=True)
self.fc = nn.Sequential(
nn.Linear(num_channels, 1),
nn.Sigmoid()
)
def forward(self, inp, do_conv=True, do_gru=True):
if do_conv:
out = self.conv(inp)
else:
out = inp
# (batchsize, num_channels, seq_length) -> (batchsize, seq_length, num_channels)
out = out.transpose(1, 2)
if do_gru:
out, _ = self.gru(out)
out = self.fc(out)
return out
def get_keras_model(do_conv, do_gru):
inp = Input((seq_length, num_channels))
out = inp
if do_conv:
out = Conv1D(num_channels, kernel_size, padding="same")(out)
if do_gru:
out = GRU(num_channels, return_sequences=True)(out)
out = TimeDistributed(Dense(1, activation="sigmoid"))(out)
return keras.models.Model(inputs=inp, outputs=out)
def benchmark_pytorch(X, Y, do_conv, do_gru, num_iter=5):
"""
Do the foward and backward pass `num_iter` times and return the average runtime.
"""
loss_fn = nn.BCELoss()
model = PyTorchModel()
forward_time = 0
backward_time = 0
for _ in range(num_iter):
# do forward pass
start = time.time()
out = model(Variable(X), do_gru=do_gru, do_conv=do_conv)
forward_time += time.time() - start
loss = loss_fn(out, Variable(Y))
# do backward pass
start = time.time()
loss.backward()
backward_time += time.time() - start
return forward_time / num_iter, backward_time / num_iter
def benchmark_keras(X, Y, do_conv, do_gru, num_iter=5):
"""
Do the foward and backward pass `num_iter` times and return the average runtime.
"""
forward_time = 0
backward_time = 0
model = get_keras_model(do_conv=do_conv, do_gru=do_gru)
model.compile(loss='binary_crossentropy', optimizer=SGD(lr=0.001))
for _ in range(num_iter):
# do forward pass
start = time.time()
model.predict(X)
forward_time += time.time() - start
# do backward pass
start = time.time()
model.train_on_batch(X, Y)
backward_time += time.time() - start
return forward_time / num_iter, backward_time / num_iter
if __name__ == '__main__':
X, Y, Xnp, Ynp = generate_training_data()
print("")
print("data for pytorch: X.shape={}, Y.shape={}".format(tuple(X.shape), tuple(Y.shape)))
print("data for keras: X.shape={}, Y.shape={}".format(tuple(Xnp.shape), tuple(Ynp.shape)))
parameters = [
(True, True, "Testing Conv and GRU together"),
(True, False, "Testing Conv only"),
(False, True, "Testing GRU only"),
]
for do_conv, do_gru, description in parameters:
print("\n" + ">" * 50)
print(description)
print("pytorch: forward_pass={:.1f}s backward_pass={:.1f}s".format(
*benchmark_pytorch(X, Y, do_conv=do_conv, do_gru=do_gru)
))
print("keras: forward_pass={:.1f}s backward_pass={:.1f}s".format(
*benchmark_keras(Xnp, Ynp, do_conv=do_conv, do_gru=do_gru)
))
print("<" * 50)
``` | module: performance,module: nn,triaged | low | Major |
307,092,672 | kubernetes | hostPath volumes used with subPath volume mounts don't support reconstruction | <!-- This form is for bug reports and feature requests ONLY!
If you're looking for help check [Stack Overflow](https://stackoverflow.com/questions/tagged/kubernetes) and the [troubleshooting guide](https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/).
-->
**Is this a BUG REPORT or FEATURE REQUEST?**:
@kubernetes/sig-storage-bugs
**What happened**:
Normally this isn't a problem, but if you use subpath with hostpath volumes, then that means the subpath mounts will not get cleaned up during the reconstruction window (a pod is force deleted while kubelet is down) | kind/bug,sig/storage,lifecycle/frozen | medium | Critical |
307,155,113 | flutter | Shared flutter runtime | We all know that building a flutter app comes with some overhead in file size.
Is there a plan to ship the flutter core/runtime with the OS so that it can be shared between installed apps?
In the case of Android & Fuchsia it should be possible considering they're both also maintained by Google.
The most important part of that integration would be that the flutter framework can be updated Independent from the OS itself. Similar to how Google Play Services are working on Android. | c: new feature,engine,c: proposal,P3,team-engine,triaged-engine | low | Major |
307,233,702 | go | cmd/gofmt: not idempotent on line with multiple comments | ```
$ gotip version
go version devel +5f0a9ba134 Tue Mar 20 22:46:00 2018 +0000 linux/amd64
```
Note as the second `gofmt` invocation changes the code again:
```
$ cat test.go
package p
func f() {
foo(); /* one */ fooooo(); /* two */
}
$ cat test.go | gofmt
package p
func f() {
foo() /* one */
fooooo() /* two */
}
$ cat test.go | gofmt | gofmt
package p
func f() {
foo() /* one */
fooooo() /* two */
``` | NeedsInvestigation | low | Minor |
307,295,760 | rust | Need more helpful warning when "pub extern" function is not exported via "pub use" | I'm creating a bunch of `#[no_mangle] pub extern fn` that will be callable from C code. Sometimes I forget to put them in my toplevel `lib.rs` as `pub use`. This is the warning I get:
```
warning: function is marked #[no_mangle], but not exported
--> src/state.rs:436:1
|
436 | pub extern "C" fn rsvg_state_rust_parse_style_pair(
| ^
| |
| _help: try making it public: `pub `
```
At first sight, that function is already `pub`! The warning should say that I need to export it from the crate via `pub use`. | C-enhancement,A-diagnostics,T-compiler | low | Major |
307,312,101 | flutter | Add a flag to flutter doctor to let it automatically fix/install things? | I'm currently setting flutter up on a new Mac and for the last 30-60 minutes it's pretty much been:
- run `flutter doctor`
- copy a command from the output, paste it and run
- do something productive on another machine and check back in 10 minutes
It's really great that `doctor` gives the exact commands for many things, but I help but think that if it just did these things for me (stopping if there's a non-zero exit code on anything) it'd save me a bunch of time/babysitting.
(I may have raised this before - it sounds like the sort of thing I would do, but if I did I can't find it now) | tool,t: flutter doctor,P3,team-tool,triaged-tool | low | Major |
307,355,748 | pytorch | Install doesn't work with spaces in directory | PyTorch GitHub Issues Guidelines
--------------------------------
We like to limit our issues to bug reports and feature requests. If you have a question or would like help and support, please visit our forums: https://discuss.pytorch.org/
If you are submitting a feature request, please preface the title with [feature request].
When submitting a bug report, please include the following information (where relevant):
- OS: macOS Sierra version 10.12.4
- PyTorch version:
- master, commit a3bd7b2875a1559cdbea9f6b3d15ac2dfa4655cc
- v0.3.1, downloaded from https://github.com/pytorch/pytorch/releases/tag/v0.3.1
- v0.3.1, via cloning entire repo and typing `git checkout v0.3.1`
- How you installed PyTorch (conda, pip, source): source
- Python version: 3.6.4
- CUDA/cuDNN version:
- GPU models and configuration: Intel HD Graphics 3000 384 MB
- GCC version (if compiling from source): I have CLANG installed, not GCC (Apple XCode installs gcc as a link to clang):
$ gcc -v
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include/c++/4.2.1
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.5.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
In addition, including the following information will also be very helpful for us to diagnose the problem:
- A script to reproduce the bug. Please try to provide as minimal of a test case as possible.
- Error messages and/or stack traces of the bug
- Context around what you are trying to do
I am trying to install Pytorch from source. I get an error from `make` when I try to do so; see below.
```bash
(pyro) dhcp-18-189-61-137:pyro_experiments blake$ export NO_CUDA=1
(pyro) dhcp-18-189-61-137:pyro_experiments blake$ which conda
/Users/blake/anaconda/envs/pyro/bin/conda
(pyro) dhcp-18-189-61-137:pyro_experiments blake$ export CMAKE_PREFIX_PATH=/Users/blake/anaconda/
(pyro) dhcp-18-189-61-137:pyro_experiments blake$ conda install numpy pyyaml setuptools cmake cffi typing
Fetching package metadata .............
Solving package specifications: .
Package plan for installation in environment /Users/blake/anaconda/envs/pyro:
The following NEW packages will be INSTALLED:
bzip2: 1.0.6-hd86a083_4
cffi: 1.11.5-py36h342bebf_0
cmake: 3.9.4-h30c3106_0
curl: 7.58.0-ha441bb4_0
expat: 2.2.5-hb8e80ba_0
intel-openmp: 2018.0.0-h8158457_8
libcurl: 7.58.0-hf30b1f0_0
libgfortran: 3.0.1-h93005f0_2
libssh2: 1.8.0-h322a93b_4
libuv: 1.19.2-hfd94794_0
mkl: 2018.0.1-hfbd8650_4
numpy: 1.14.2-py36ha9ae307_0
pycparser: 2.18-py36h724b2fc_1
pyyaml: 3.12-py36h2ba1e63_1
rhash: 1.3.5-h3aa0507_1
typing: 3.6.4-py36_0
yaml: 0.1.7-hc338f04_2
Proceed ([y]/n)? y
bzip2-1.0.6-hd 100% |#####################################################| Time: 0:00:00 7.20 MB/s
libuv-1.19.2-h 100% |#####################################################| Time: 0:00:00 8.98 MB/s
rhash-1.3.5-h3 100% |#####################################################| Time: 0:00:00 13.90 MB/s
yaml-0.1.7-hc3 100% |#####################################################| Time: 0:00:00 7.94 MB/s
expat-2.2.5-hb 100% |#####################################################| Time: 0:00:00 13.88 MB/s
libssh2-1.8.0- 100% |#####################################################| Time: 0:00:00 11.75 MB/s
libcurl-7.58.0 100% |#####################################################| Time: 0:00:00 11.30 MB/s
curl-7.58.0-ha 100% |#####################################################| Time: 0:00:00 12.83 MB/s
cmake-3.9.4-h3 100% |#####################################################| Time: 0:00:00 14.24 MB/s
pyyaml-3.12-py 100% |#####################################################| Time: 0:00:00 21.67 MB/s
typing-3.6.4-p 100% |#####################################################| Time: 0:00:00 19.86 MB/s
(pyro) dhcp-18-189-61-137:pyro_experiments blake$ git clone --recursive https://github.com/pytorch/pytorch
Cloning into 'pytorch'...
remote: Counting objects: 57316, done.
remote: Compressing objects: 100% (38/38), done.
remote: Total 57316 (delta 16), reused 5 (delta 2), pack-reused 57276
Receiving objects: 100% (57316/57316), 24.55 MiB | 12.95 MiB/s, done.
Resolving deltas: 100% (43708/43708), done.
Checking out files: 100% (1833/1833), done.
Submodule 'aten/src/ATen/cpu/cpuinfo' (https://github.com/Maratyszcza/cpuinfo) registered for path 'aten/src/ATen/cpu/cpuinfo'
Submodule 'aten/src/ATen/cpu/tbb/tbb_remote' (https://github.com/01org/tbb) registered for path 'aten/src/ATen/cpu/tbb/tbb_remote'
Submodule 'aten/src/ATen/utils/catch' (https://github.com/catchorg/Catch2.git) registered for path 'aten/src/ATen/utils/catch'
Submodule 'torch/lib/gloo' (https://github.com/facebookincubator/gloo) registered for path 'torch/lib/gloo'
Submodule 'torch/lib/nanopb' (https://github.com/nanopb/nanopb.git) registered for path 'torch/lib/nanopb'
Submodule 'torch/lib/pybind11' (https://github.com/pybind/pybind11) registered for path 'torch/lib/pybind11'
Cloning into '/Users/blake/Dropbox (Personal)/projects/pyro_experiments/pytorch/aten/src/ATen/cpu/cpuinfo'...
remote: Counting objects: 4121, done.
remote: Compressing objects: 100% (282/282), done.
remote: Total 4121 (delta 411), reused 366 (delta 260), pack-reused 3575
Receiving objects: 100% (4121/4121), 4.14 MiB | 0 bytes/s, done.
Resolving deltas: 100% (3051/3051), done.
Cloning into '/Users/blake/Dropbox (Personal)/projects/pyro_experiments/pytorch/aten/src/ATen/cpu/tbb/tbb_remote'...
remote: Counting objects: 9934, done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 9934 (delta 1), reused 8 (delta 0), pack-reused 9921
Receiving objects: 100% (9934/9934), 31.35 MiB | 17.23 MiB/s, done.
Resolving deltas: 100% (8105/8105), done.
Cloning into '/Users/blake/Dropbox (Personal)/projects/pyro_experiments/pytorch/aten/src/ATen/utils/catch'...
remote: Counting objects: 19637, done.
remote: Compressing objects: 100% (38/38), done.
remote: Total 19637 (delta 17), reused 23 (delta 11), pack-reused 19586
Receiving objects: 100% (19637/19637), 9.41 MiB | 9.99 MiB/s, done.
Resolving deltas: 100% (13213/13213), done.
Cloning into '/Users/blake/Dropbox (Personal)/projects/pyro_experiments/pytorch/torch/lib/gloo'...
remote: Counting objects: 2074, done.
remote: Compressing objects: 100% (17/17), done.
remote: Total 2074 (delta 3), reused 2 (delta 0), pack-reused 2057
Receiving objects: 100% (2074/2074), 623.03 KiB | 0 bytes/s, done.
Resolving deltas: 100% (1554/1554), done.
Cloning into '/Users/blake/Dropbox (Personal)/projects/pyro_experiments/pytorch/torch/lib/nanopb'...
remote: Counting objects: 4530, done.
remote: Compressing objects: 100% (31/31), done.
remote: Total 4530 (delta 10), reused 13 (delta 3), pack-reused 4494
Receiving objects: 100% (4530/4530), 1.09 MiB | 0 bytes/s, done.
Resolving deltas: 100% (2953/2953), done.
Cloning into '/Users/blake/Dropbox (Personal)/projects/pyro_experiments/pytorch/torch/lib/pybind11'...
remote: Counting objects: 9835, done.
remote: Total 9835 (delta 0), reused 0 (delta 0), pack-reused 9834
Receiving objects: 100% (9835/9835), 3.45 MiB | 0 bytes/s, done.
Resolving deltas: 100% (6643/6643), done.
Submodule path 'aten/src/ATen/cpu/cpuinfo': checked out '7b5e4d542409989c8759890208202000a0306764'
Submodule path 'aten/src/ATen/cpu/tbb/tbb_remote': checked out '4c73c3b5d7f78c40f69e0c04fd4afb9f48add1e6'
Submodule path 'aten/src/ATen/utils/catch': checked out '0a34cc201ef28bf25c88b0062f331369596cb7b7'
Submodule path 'torch/lib/gloo': checked out '9b2c046e5f7d4a8ec61598d382838a8f6867a1d4'
Submodule 'third-party/googletest' (https://github.com/google/googletest.git) registered for path 'torch/lib/gloo/third-party/googletest'
Cloning into '/Users/blake/Dropbox (Personal)/projects/pyro_experiments/pytorch/torch/lib/gloo/third-party/googletest'...
remote: Counting objects: 10776, done.
remote: Compressing objects: 100% (42/42), done.
remote: Total 10776 (delta 58), reused 79 (delta 53), pack-reused 10670
Receiving objects: 100% (10776/10776), 3.40 MiB | 0 bytes/s, done.
Resolving deltas: 100% (7921/7921), done.
Submodule path 'torch/lib/gloo/third-party/googletest': checked out 'ec44c6c1675c25b9827aacd08c02433cccde7780'
Submodule path 'torch/lib/nanopb': checked out '14efb1a47a496652ab08b1ebcefb0ea24ae4a5e4'
Submodule path 'torch/lib/pybind11': checked out 'add56ccdcac23a6c522a2c1174a866e293c61dab'
Submodule 'tools/clang' (https://github.com/wjakob/clang-cindex-python3) registered for path 'torch/lib/pybind11/tools/clang'
Cloning into '/Users/blake/Dropbox (Personal)/projects/pyro_experiments/pytorch/torch/lib/pybind11/tools/clang'...
remote: Counting objects: 353, done.
remote: Total 353 (delta 0), reused 0 (delta 0), pack-reused 353
Receiving objects: 100% (353/353), 119.74 KiB | 0 bytes/s, done.
Resolving deltas: 100% (149/149), done.
Submodule path 'torch/lib/pybind11/tools/clang': checked out '6a00cbc4a9b8e68b71caf7f774b3f9c753ae84d5'
(pyro) dhcp-18-189-61-137:pyro_experiments blake$ cd pytorch/
(pyro) dhcp-18-189-61-137:pytorch blake$ ls
CONTRIBUTING.md aten mypy-files.txt test
Dockerfile cmake mypy.ini tools
LICENSE docs requirements.txt torch
README.md mypy-README.md setup.py tox.ini
(pyro) dhcp-18-189-61-137:pytorch blake$ MACOSX_DEPLOYMENT_TARGET=10.9 CC=clang CXX=clang++ python setup.py install
running install
running build_deps
-- The C compiler identification is AppleClang 8.1.0.8020042
-- The CXX compiler identification is AppleClang 8.1.0.8020042
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -- broken
CMake Error at /Users/blake/anaconda/envs/pyro/share/cmake-3.9/Modules/CMakeTestCCompiler.cmake:51 (message):
The C compiler
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
is not able to compile a simple test program.
It fails with the following output:
Change Dir: /Users/blake/Dropbox (Personal)/projects/pyro_experiments/pytorch/torch/lib/build/TH/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_c8054/fast"
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f
CMakeFiles/cmTC_c8054.dir/build.make CMakeFiles/cmTC_c8054.dir/build
Building C object CMakeFiles/cmTC_c8054.dir/testCCompiler.c.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-DTH_INDEX_BASE=0 -I/Users/blake/Dropbox
(Personal)/projects/pyro_experiments/pytorch/torch/lib/tmp_install/include
-I/Users/blake/Dropbox
(Personal)/projects/pyro_experiments/pytorch/torch/lib/tmp_install/include/TH
-I/Users/blake/Dropbox
(Personal)/projects/pyro_experiments/pytorch/torch/lib/tmp_install/include/THC
-I/Users/blake/Dropbox
(Personal)/projects/pyro_experiments/pytorch/torch/lib/tmp_install/include/THS
-I/Users/blake/Dropbox
(Personal)/projects/pyro_experiments/pytorch/torch/lib/tmp_install/include/THCS
-I/Users/blake/Dropbox
(Personal)/projects/pyro_experiments/pytorch/torch/lib/tmp_install/include/THNN
-I/Users/blake/Dropbox
(Personal)/projects/pyro_experiments/pytorch/torch/lib/tmp_install/include/THCUNN
-DOMPI_SKIP_MPICXX=1 -fexceptions -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
-mmacosx-version-min=10.12 -o CMakeFiles/cmTC_c8054.dir/testCCompiler.c.o
-c "/Users/blake/Dropbox
(Personal)/projects/pyro_experiments/pytorch/torch/lib/build/TH/CMakeFiles/CMakeTmp/testCCompiler.c"
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0:
`/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-DTH_INDEX_BASE=0 -I/Users/blake/Dropbox
(Personal)/projects/pyro_experiments/pytorch/torch/lib/tmp_install/include
-I/Users/blake/Dropbox
(Personal)/projects/pyro_experiments/pytorch/torch/lib/tmp_install/include/TH
-I/Users/blake/Dropbox
(Personal)/projects/pyro_experiments/pytorch/torch/lib/tmp_install/include/THC
-I/Users/blake/Dropbox
(Personal)/projects/pyro_experiments/pytorch/torch/lib/tmp_install/include/THS
-I/Users/blake/Dropbox
(Personal)/projects/pyro_experiments/pytorch/torch/lib/tmp_install/include/THCS
-I/Users/blake/Dropbox
(Personal)/projects/pyro_experiments/pytorch/torch/lib/tmp_install/include/THNN
-I/Users/blake/Dropbox
(Personal)/projects/pyro_experiments/pytorch/torch/lib/tmp_install/include/THCUNN
-DOMPI_SKIP_MPICXX=1 -fexceptions -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk
-mmacosx-version-min=10.12 -o CMakeFiles/cmTC_c8054.dir/testCCompiler.c.o
-c "/Users/blake/Dropbox
(Personal)/projects/pyro_experiments/pytorch/torch/lib/build/TH/CMakeFiles/CMakeTmp/testCCompiler.c"'
make[1]: *** [CMakeFiles/cmTC_c8054.dir/testCCompiler.c.o] Error 2
make: *** [cmTC_c8054/fast] Error 2
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt
-- Configuring incomplete, errors occurred!
See also "/Users/blake/Dropbox (Personal)/projects/pyro_experiments/pytorch/torch/lib/build/TH/CMakeFiles/CMakeOutput.log".
See also "/Users/blake/Dropbox (Personal)/projects/pyro_experiments/pytorch/torch/lib/build/TH/CMakeFiles/CMakeError.log".
```
Attached are the two log files that it generated:
[CMakeError.log](https://github.com/pytorch/pytorch/files/1834565/CMakeError.log)
[CMakeOutput.log](https://github.com/pytorch/pytorch/files/1834566/CMakeOutput.log)
cc @malfet @seemethere @walterddr | todo,module: build,triaged,has workaround | low | Critical |
307,366,254 | rust | Add a way to generate function symbols with predictable hashes | To debug one of the issues, I wanted to use `llvm-diff` to diff between old and new LLVM-IR. Alas, the attempt didn’t provide any meaningful outcome and all the diff tool could output was:
```
function @_ZN33_$LT$alloc..arc..Arc$LT$T$GT$$GT$9drop_slow17h14f39cee67cb7a45E exists only in left module
function @_ZN33_$LT$alloc..arc..Arc$LT$T$GT$$GT$9drop_slow17h3a4d1cb4bf1c206cE exists only in right module
...
```
@michaelwoerister, is it possible to make rustc use *less* inputs into its hash algorithm? | C-enhancement,T-compiler,A-CLI | low | Critical |
307,373,486 | go | sync: eliminate global Mutex in Pool operations | In the review for https://golang.org/cl/101715 (“regexp: use sync.Pool to cache regexp.machine objects”), @ianlancetaylor notes:
> A similar change was made in https://golang.org/cl/44150043, by [@bradfitz]. It was rolled back in https://golang.org/cl/48190043. [@dvyukov] said: "The remaining concern is: Are there cases where a program creates lots of local short-lived regexps (one-shot), and it's not possible to replace them with global ones? For this case we've introduced a global contended mutex."
I'm guessing that comment refers to `allPoolsMu` here:
https://github.com/golang/go/blob/2e84dc2596f5ca655fd5716e1c277a801c868566/src/sync/pool.go#L242
----
It strikes me as odd that `sync.Pool` should have a global `Mutex` at all. After all, `sync.Pool` explicitly cooperates with the garbage collector (and will likely cooperate even more after #22950), and the garbage collector will trace all of the live `sync.Pool` instances in the course of a normal garbage collection.
The `allPools` slice appears to exist so that the garbage collector can clear all of the `sync.Pool` instances before tracing them. We have to identify `Pool`s before tracing them so that we don't over-retain pooled objects, but it seems like we could do that without acquiring global locks beyond the usual GC safepoints.
For example, we could add newly-allocated pools to a per-G list, and move that list to the global list only when the thread running that G acquires the scheduler lock.
If we happen to miss a new `Pool` on the current GC cycle (for example, because its goroutine wasn't descheduled until near the end of the cycle), that's ok: we'll just wait until the next GC cycle to clear it.
That could make `sync.Pool` substantially more efficient for objects that tend to be long-lived but are sometimes short-lived too (such as compiled regexps). | Performance,compiler/runtime | low | Major |
307,413,091 | TypeScript | Implement interface should not add optional properties | From https://github.com/Microsoft/vscode/issues/46286
**TypeScript Version:** 2.8.0-dev.20180320
<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
- implement interface
- quick fix
- code action
- optional property
**Code**
```ts
interface IFoo {
x?: number
y: number
}
class Foo implements IFoo {
}
```
Trigger `implement interface` on `Foo`
**Expected behavior:**
Only required properties required:
```ts
interface IFoo {
x?: number
y: number
}
class Foo implements IFoo {
y: number;
}
```
**Actual behavior:**
Both required and optional properties added:
```ts
interface IFoo {
x?: number
y: number
}
class Foo implements IFoo {
x?: number;
y: number;
}
``` | Suggestion,Awaiting More Feedback,Domain: Quick Fixes | low | Major |
307,465,596 | flutter | Exception in AndroidDevice._getProperty: adb not responding | _From @mslavkovski on March 9, 2018 9:5_
## What happened
After system restore from hibernation the android emulator is not visible to the IDE, the app can't run. When starting the app Android Studio gives message "No devices attached" and the adb.exe is crashing in some kind loop. It fills the start menu taskbar. Clicking "Close the program" button only reduces the number of active messages but they keep filling up the taskbar. The only solution is to restart the PC.
## Version information
Android Studio `3.0.1` • Flutter plugin `io.flutter 22.2.1` • Dart plugin `171.4424`
Error getting Flutter sdk information.
## Exception
A Flutter device daemon stopped unexpectedly.
```
Details: Daemon #8 exited. Exit code: 255. Stderr:
Unhandled exception:
Exception: adb not responding
#0 throwToolExit (package:flutter_tools/src/base/common.dart:28)
#1 AndroidDevice._getProperty (package:flutter_tools/src/android/android_device.dart:97)
<asynchronous suspension>
#2 AndroidDevice.targetPlatform (package:flutter_tools/src/android/android_device.dart:128)
<asynchronous suspension>
#3 _deviceToMap (package:flutter_tools/src/commands/daemon.dart:710)
<asynchronous suspension>
#4 DeviceDomain._onDeviceEvent.<anonymous closure>.<anonymous closure> (package:flutter_tools/src/commands/daemon.dart:590)
<asynchronous suspension>
#5 _rootRunUnary (dart:async/zone.dart:1134)
#6 _CustomZone.runUnary (dart:async/zone.dart:1031)
#7 _FutureListener.handleValue (dart:async/future_impl.dart:129)
#8 _Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:633)
#9 _Future._propagateToListeners (dart:async/future_impl.dart:662)
#10 _Future._addListener.<anonymous closure> (dart:async/future_impl.dart:342)
#11 _rootRun (dart:async/zone.dart:1126)
#12 _CustomZone.run (dart:async/zone.dart:1023)
#13 _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:949)
#14 _microtaskLoop (dart:async/schedule_microtask.dart:41)
#15 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50)
#16 _Timer._runTimers (dart:isolate-patch/dart:isolate/timer_impl.dart:391)
#17 _Timer._handleMessage (dart:isolate-patch/dart:isolate/timer_impl.dart:416)
#18 _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165)
```
```
com.intellij.openapi.diagnostic.Logger$EmptyThrowable
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:152)
at io.flutter.run.daemon.DeviceService.daemonStopped(DeviceService.java:189)
at io.flutter.run.daemon.DeviceDaemon$Listener.processTerminated(DeviceDaemon.java:357)
at io.flutter.run.daemon.DaemonApi$1.processTerminated(DaemonApi.java:146)
at sun.reflect.GeneratedMethodAccessor68.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.execution.process.ProcessHandler$4.invoke(ProcessHandler.java:227)
at com.sun.proxy.$Proxy15.processTerminated(Unknown Source)
at com.intellij.execution.process.ProcessHandler$3.run(ProcessHandler.java:184)
at com.intellij.execution.process.ProcessHandler$TasksRunner.execute(ProcessHandler.java:260)
at com.intellij.execution.process.ProcessHandler.notifyTerminated(ProcessHandler.java:165)
at com.intellij.execution.process.ProcessHandler.notifyProcessTerminated(ProcessHandler.java:161)
at com.intellij.execution.process.BaseOSProcessHandler.onOSProcessTerminated(BaseOSProcessHandler.java:187)
at com.intellij.execution.process.OSProcessHandler.onOSProcessTerminated(OSProcessHandler.java:92)
at com.intellij.execution.process.BaseOSProcessHandler$2$1.consume(BaseOSProcessHandler.java:152)
at com.intellij.execution.process.BaseOSProcessHandler$2$1.consume(BaseOSProcessHandler.java:137)
at com.intellij.execution.process.ProcessWaitFor$1.run(ProcessWaitFor.java:60)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
```
_Copied from original issue: flutter/flutter-intellij#1899_ | tool,P2,team-tool,triaged-tool | low | Critical |
307,477,502 | rust | unused_assignments warning: false negative for dead stores in struct fields | code like this causes a proper warning
```` rust
fn main() {
let mut a;
let b = 4;
let c = 5;
a = b;
a = c;
println!("{}", a);
}
````
=>
````
warning: value assigned to `a` is never read
--> src/main.rs:6:5
|
6 | a = b;
| ^
|
= note: #[warn(unused_assignments)] on by default
````
however if a is a struct field, I get no warning at all.
```` rust
struct Foo {
x: i32,
}
fn main() {
let mut strct = Foo {
x: 0, // maybe warn here, too?
};
let b = 4;
let c = 5;
strct.x = b; // please warn!
strct.x = c;
println!("{}", strct.x);
}
````
playground: https://play.rust-lang.org/?gist=c904ff202754b2691e2968977620fd7a&version=nightly
I ran into bugs in my code that could have been prevented by warning about this :( | C-enhancement,A-lints,A-diagnostics,T-compiler,L-unused_assignments | low | Critical |
307,509,017 | TypeScript | transpileModule doesn't emit correct metadata of return type for async function | <!-- 🚨 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 CONTRIBUTING guidelines: https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md
* Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ
-->
<!-- If you have a QUESTION:
THIS IS NOT A FORUM FOR QUESTIONS.
Ask questions at http://stackoverflow.com/questions/tagged/typescript
or https://gitter.im/Microsoft/TypeScript
-->
<!-- If you have a SUGGESTION:
Most suggestion reports are duplicates, please search extra hard before logging a new suggestion.
See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md
-->
<!-- If you have a BUG:
Please fill in the *entire* template below.
-->
I got a problem when using `transpileModule` with `emitDecoratorMetadata` flag on, the result is inconsistent with what I got from command line tsc.
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:** 2.8.0-dev.20180321
<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
experimentalDecorators transpileModule emitDecoratorMetadata
**Code**
```js
'use strict';
const tsc = require("typescript");
const result = tsc.transpileModule(`
class Foo {
@AnyDecorator()
public async foobar(): Promise<void> {
}
}
`, {
compilerOptions: {
emitDecoratorMetadata:true,
experimentalDecorators:true,
lib: ["lib.es2015.d.ts"]
}
});
console.log(result.outputText);
```
**Expected behavior:**
This should decorate the function foobar with the return type `Promise`, like:
```js
__decorate([
AnyDecorator(),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", Promise)
], Foo.prototype, "foobar");
```
**Actual behavior:**
```js
__decorate([
AnyDecorator(),
__metadata("design:type", Function),
__metadata("design:paramtypes", []),
__metadata("design:returntype", Object)
], Foo.prototype, "foobar");
```
However, if I remove the return type from foobar's signature:
```js
'use strict';
const tsc = require("typescript");
const result = tsc.transpileModule(`
class Foo {
@AnyDecorator()
public async foobar() {
}
}
`, {
compilerOptions: {
emitDecoratorMetadata:true,
experimentalDecorators:true,
lib: ["lib.es2015.d.ts"]
}
});
console.log(result.outputText);
```
everything is correct, and return type is `Promise`. | Bug,Help Wanted,Domain: Decorators | low | Critical |
307,608,238 | vscode | Spacing or Horizontal lines in custom VS Code grammar | I just worked into grammar creation with Atom and now VS code and i'm currently developing an own grammar in VS code. In the text file i canot insert extra spacings, but i would like to separate logical blocks with an Bigger spacing or an horizontal line. But i don't now how zto achieve this, because as far as i figured out none of the VS Code templates scopes allows such a style.
Could someone tell me how i can achieve this? As far as i figured out i will need to add a custom scope to each ued template?
Yours sincerely, Markus | feature-request,api | low | Minor |
307,656,305 | vue | <transition-group> and v-show triggers move transition on enter | ### Version
2.5.16
### Reproduction link
[https://jsfiddle.net/chrisvfritz/845Lee66/](https://jsfiddle.net/chrisvfritz/845Lee66/)
### Steps to reproduce
1. Open the fiddle
2. Click the "Toggle" button
3. Watch the `move` transition trigger on enter
### What is expected?
Just like with `v-if`, move transitions should not be triggered on enter (note that it is already _not_ triggered on leave).
### What is actually happening?
I haven't checked in the source yet, but I'm guessing that since elements with `display: none` still technically have coordinates:
```
DOMRect { x: 0, y: 0, width: 0, height: 0, top: 0, right: 0, bottom: 0, left: 0 }
```
The `move` transition is triggered on enter. I'm not sure why it wouldn't also occur on leave though.
---
This may be connected to [#5800](https://github.com/vuejs/vue/issues/5800). Also, special thanks to @rachelnabors for finding this bug!
<!-- generated by vue-issues. DO NOT REMOVE --> | bug,has PR,transition | low | Critical |
307,706,699 | TypeScript | Track expanded support for more multi-location diagnostic messages | We now support related information for diagnostic messages. This issue now tracks, in aggregate, which diagnostics we have extra information for. The following errors are candidates:
MVP
* [x] `_____ used before its declaration.`
* [x] `Property '{0}' is used before being assigned.`
* [x] `Cannot redeclare block-scoped variable '{0}'.`
* [x] `Type '{0}' is not assignable to type '{1}'.`
* [x] `Type '{0}' is not assignable to type '{1}'. Two different types with this name exist, but they are unrelated.`
* [x] `Expected {0} arguments, ___________`
Others
* [x] `Cannot find name '{0}'. Did you mean ______`
* [x] `Duplicate declaration '{0}'.`
* [ ] `_____ has or is using private name '{1}'`
* [x] `Subsequent property declarations must have the same type. Property '{0}' must be of type '{1}', but here has type '{2}'.`
* [ ] `'{0}' are specified twice. The attribute named '{0}' will be overwritten.`
* [ ] `'get' and 'set' accessor must have the same type.`
* [ ] `Accessors must both be abstract or non-abstract.`
* [ ] `Overload signatures must all be ______`
* [x] `Overload signature is not compatible with function implementation.`
* [ ] `Individual declarations in merged declaration '{0}' must be all exported or all local.`
* [x] `Subsequent variable declarations must have the same type. Variable '{0}' must be of type '{1}', but here has type '{2}'.`
* [ ] Subtyping
* [ ] `Class '{0}' incorrectly extends base class '{1}'.`
* [ ] `Class static side '{0}' incorrectly extends base class static side '{1}'.`
* [ ] `Class '{0}' incorrectly implements interface '{1}'.`
* [ ] `Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member accessor.`
* [ ] `Class '{0}' defines instance member function '{1}', but extended class '{2}' defines it as instance member property.`
* [ ] `Class '{0}' defines instance member property '{1}', but extended class '{2}' defines it as instance member function.`
* [ ] `Class '{0}' defines instance member accessor '{1}', but extended class '{2}' defines it as instance member function.`
* [ ] `Interface '{0}' incorrectly extends interface '{1}'.`
* [ ] `Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'.`
* [ ] `Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'.`
* [ ] `All declarations of '{0}' must have identical type parameters.`
* [ ] `In an enum with multiple declarations, only one declaration can omit an initializer for its first enum element.`
* [ ] Namespace merging
* [ ] `A namespace declaration cannot be in a different file from a class or function with which it is merged.`
* [ ] `A namespace declaration cannot be located prior to a class or function with which it is merged.`
* [ ] `Module '{0}' is hidden by a local declaration with the same name.`
* should probably be changed to "namespace"
* [ ] `Types have separate declarations of a private property '{0}'.`
* [ ] `Property '{0}' is protected but type '{1}' is not a class derived from '{2}'.`
* [ ] `Property '{0}' is protected in type '{1}' but public in type '{2}'.`
* [ ] `An AMD module cannot have multiple name assignments.`
* [ ] `Cannot initialize outer scoped variable '{0}' in the same scope as block scoped declaration '{1}'`
* [ ] `Export declaration conflicts with exported declaration of '{0}'.`
* [ ] `Cannot redeclare identifier '{0}' in catch clause.`
* [ ] `Module '{0}' uses 'export =' and cannot be used with 'export *'.`
* [ ] `Base constructors must all have the same return type.`
* [ ] `Overload signatures must all be abstract or non-abstract.`
* [ ] `A module cannot have multiple default exports.`
* [ ] `Type '{0}' has no properties in common with type '{1}'.`
* [ ] `Base class expressions cannot reference class type parameters.`
* [ ] `A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums.`
* [ ] `'{0}' refers to a UMD global, but the current file is a module. Consider adding an import instead.`
* [ ] `All declarations of '{0}' must have identical modifiers.`
Bonus?
* [ ] `A computed property name cannot reference a type parameter from its containing type.`
* [ ] `Type argument candidate '{1}' is not a valid type argument because it is not a supertype of candidate '{0}'.`
Original Post:
> Often a diagnostic message can have additional location information. it is specially helpful in IDE's where clicking on the location can take you there. For instance
- duplicate declaration errors, can have the other locations where the name was re-declared
- type `x` not assignable to type `y`, a reference to where the target symbol's type is defined
- implicit any errors, have a reference to the declaration of the container type
- parameter type/number mismatch, have a reference tot he function declaration
> VSCode is adding support for exposing a list of related diagnostics in https://github.com/Microsoft/vscode/issues/1927.
> We can also expose this in `--pretty`. | Domain: Error Messages,Meta-Issue,Domain: Related Error Spans | low | Critical |
307,718,498 | rust | CI: We should be able to complete a build in 3 hours even without Docker image cache | Our CI builders (except macOS and Windows) use Docker, and we'll cache the Docker repository on Travis. Thanks to the cache, normally the `docker build` command only takes a few seconds to complete. However, when the cache is invalidated for whatever reason, the Docker image will need to be actually built, and this may take a very long time.
Recently this happened with #49246 — the Docker image cache of `dist-x86_64-linux alt` became stale and thus needs to be built from scratch. One of the step involves compiling GCC. The whole `docker build` command thus takes over 40 minutes. Worse, the `alt` builders have assertions enabled, and thus all stage1+ `rustc` invocations are slower than their normal counterpart. Together, it is impossible to complete within 3 hours. Travis will not update the cache unless the build is successful. Therefore, I need to exclude RLS, Rustfmt and Clippy from the distribution, to ensure the job is passing.
I don't think we should entirely rely on Travis's cache for speed. Ideally, the `docker build` command should at most spend 10 minutes, assuming good network speed (~2 MB/s on Travis) and reasonable CPU performance (~2.3 GHz × 4 CPUs on Travis).
In the `dist-x86_64-linux alt` case, if we host the precompiled GCC 4.8.5 for Centos 5, we could have trimmed 32 minutes out of the Docker build time, which allows us to complete the build without removing anything. | C-enhancement,T-bootstrap,T-infra | medium | Major |
307,822,696 | go | cmd/link: document default flags passed to extld | ### What version of Go are you using (`go version`)?
master
### What operating system and processor architecture are you using (`go env`)?
```
GOARCH="amd64"
GOBIN=""
GOCACHE="/localdisk/itocar/gocache/"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/localdisk/itocar/gopath/"
GORACE=""
GOROOT="/localdisk/itocar/golang"
GOTMPDIR=""
GOTOOLDIR="/localdisk/itocar/golang/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-build748215444=/tmp/go-build -gno-record-gcc-switches"
```
### What did you do?
go build -ldflags="-extld=/path/to/ld.hugetlbfs -linkmode=external" foo.go
I was trying to map code section to huge pages.
### What did you expect to see?
Everything works.
### What did you see instead?
Linker didn't recognize -m64 option.
Looks like we pass a bunch of gcc/clang specific flags to any external linker.
I worked around this by passing -extld=gcc -extldflags="-B /path/to/ld.hugetlbfs", to use gcc as a linker that recognizes -m64 and calls ld.hugetlbfs without passing -m64, but this behavior was surprising to me and should be documented somewhere (in extld documentation?)
| Documentation,NeedsInvestigation,compiler/runtime | low | Critical |
307,845,370 | rust | Argument-position `impl Trait` requires a named lifetime | This function produces an "expected lifetime parameter" error:
```rust
fn foo(_: impl Iterator<Item = &u8>) {}
```
This code should instead be accepted and bound the `impl Trait` parameter by the elided lifetime.
cc https://github.com/rust-lang/rust/issues/34511 | C-enhancement,T-compiler,A-impl-trait,D-confusing | low | Critical |
307,848,032 | react-native | iOS: Multiple animations which use "useNativeDriver" do not work if preceded by a delay. | - [x] I have reviewed the [documentation](https://facebook.github.io/react-native)
- [x] I have searched [existing issues](https://github.com/facebook/react-native/issues)
- [x] I am using the [latest React Native version](https://github.com/facebook/react-native/releases)
On iOS, if attempting to animate a text component and a view component in parallel, preceded by an Animated.delay (or setTimeout), the text component will not animate:
```javascript
doAnimate = () => {
Animated.sequence([
// Removing the delay here will fix the issue.
Animated.delay(1000),
Animated.parallel([
Animated.timing(this.squareAnimation, { toValue: 1, useNativeDriver: true, duration: 3000 }),
// If you remove "useNativeDriver" below, the animation works.
Animated.timing(this.textAnimation, { toValue: 1, useNativeDriver: true, duration: 3000 }),
])
]).start();
// This also fails to animate the text component:
// setTimeout(() => {
// Animated.parallel([
// Animated.timing(this.squareAnimation, { toValue: 1, useNativeDriver: true, duration: 3000 }),
// Animated.timing(this.textAnimation, { toValue: 1, useNativeDriver: true, duration: 3000 }),
// ]).start();
// }, 1000);
}
componentDidMount() {
setTimeout(this.doAnimation, 3000);
}
render() {
return (
<View style={styles.container}>
<Animated.Text style={[styles.textContainer, {
opacity: this.textAnimation
}]}>
Welcome to React Native!
</Animated.Text>
<Animated.View style={[styles.squareContainer, {
opacity: this.squareAnimation
}]}>
</Animated.View>
</View>
);
}
```
If you remove "useNativeDriver" from the "textAnimation", the animation works. Also, making the textAnimation interpolate from viewAnimation does not work (that's how my code originally worked, but I broke them out into separate animations to test what was going wrong).
## Environment
Environment:
OS: macOS High Sierra 10.13.3
Node: 8.9.4
Yarn: 1.5.1
npm: 5.6.0
Watchman: Not Found
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
react: ^16.3.0-alpha.1 => 16.3.0-alpha.3
react-native: 0.54.2 => 0.54.2
## Steps to Reproduce
See code snippet above, alternatively you can check out my example repo:
```sh
git clone https://github.com/dannycochran/animationBug
cd animationBug
yarn install
react-native run-ios
```
## Expected Behavior
The animations for both the View and Text component work, as they do on Android.
## Actual Behavior
The text opacity never animates. | Platform: iOS,Help Wanted :octocat:,API: Animated,Priority: Low,Bug | low | Critical |
307,848,948 | rust | `impl Trait` Associated Types Do Not Leak Auto Traits | While auto trait impls of `impl Trait` types leak, the auto trait impls of their associated types do not:
```rust
#![feature(conservative_impl_trait)]
trait Foo {
type Bar;
}
fn require_bar_send<F>(_: F) where F: Foo, F::Bar: Send {}
fn foo() -> impl Foo {
struct Fooey;
impl Foo for Fooey {
type Bar = ();
}
Fooey
}
fn main() {
require_bar_send(foo()); // ERROR
}
```
This can be fixed by writing `impl Foo<Bar=impl Send>`, but this can get annoying quickly: async traits, whose methods each return a separate associated type implementing `Future`, need to have a `Bar=impl Send` for each method:
```rust
trait Foo {
type FooFut: Future<...>;
fn foo(&self) -> Self::FooFut;
type BarFut: Future<...>;
fn bar(&self) -> Self::BarFut;
type BazFut: Future<...>;
fn baz(&self) -> Self::BazFut;
}
fn foo() -> impl Foo<FooFut=impl Send, BarFut=impl Send, BazFut=impl Send> { ... }
```
This isn't a bug, but I'm interested in seeing if there're ways we can improve here-- should associated type auto traits leak? I can see that becoming a huge problem since you'd then want the associated types of associated types auto traits to leak, etc, but there's not an obvious solution to me. I really just want an "everything you care about here is thread-safe" button, but I don't know how to supply that easily. | T-lang,C-feature-request,A-impl-trait | low | Critical |
307,858,326 | go | image/jpeg: Decode is slow | Mac OS Sierra
go version go1.10 darwin/amd64
CPU 3,5 GHz Intel Core i7
I noticed that the use of decode jpeg is very slow.
decode image jpeg 1920x1080
I test github.com/pixiv/go-libjpeg/jpeg and native jpeg
go 1.10 jpeg.decode ≈ 30 ms cpu ≈ 15 %
libjpeg jpeg.decode ≈ 7 ms cpu ≈ 4 %
will it ever go as fast as other libraries?
is it possible that in the next versions the native implementation will become faster?
| Performance,help wanted,NeedsInvestigation | low | Major |
307,862,613 | TypeScript | Abstract classes that implement interfaces shouldn't require method signatures | <!-- 🚨 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 CONTRIBUTING guidelines: https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md
* Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ
-->
<!-- If you have a QUESTION:
THIS IS NOT A FORUM FOR QUESTIONS.
Ask questions at http://stackoverflow.com/questions/tagged/typescript
or https://gitter.im/Microsoft/TypeScript
-->
<!-- If you have a SUGGESTION:
Most suggestion reports are duplicates, please search extra hard before logging a new suggestion.
See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md
-->
<!-- If you have a BUG:
Please fill in the *entire* template below.
-->
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:** 2.7
<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** abstract class implements interface
**Code**
```ts
interface FooFace {
foo();
}
abstract class FooClass implements FooFace {
// ^^^^^^^^
// Class 'FooClass' incorrectly implements interface 'FooFace'.
// Property 'foo' is missing in type 'FooClass'.
//
// unless the following is uncommented:
//abstract foo();
}
// contrast:
abstract class BarClass {
abstract bar();
}
abstract class BarSubClass extends BarClass {
// no `abstract bar();` required
}
```
**Expected behavior:**
Abstract classes that implement interfaces don't need to define abstract type definitions to satisfy interface.
**Actual behavior:**
They do.
[**Playground Link**](http://www.typescriptlang.org/play/#src=interface%20FooFace%20%7B%0D%0A%20%20%20%20foo()%3B%0D%0A%7D%0D%0Aabstract%20class%20FooClass%20implements%20FooFace%20%7B%0D%0A%20%20%20%20%2F%2F%20%20%20%20%20%20%20%20%20%5E%5E%5E%5E%5E%5E%5E%5E%0D%0A%20%20%20%20%2F%2F%20Class%20'FooClass'%20incorrectly%20implements%20interface%20'FooFace'.%0D%0A%20%20%20%20%2F%2F%20%20%20Property%20'foo'%20is%20missing%20in%20type%20'FooClass'.%0D%0A%20%20%20%20%2F%2F%0D%0A%20%20%20%20%2F%2F%20unless%20the%20following%20is%20uncommented%3A%0D%0A%20%20%20%20%2F%2Fabstract%20foo()%3B%0D%0A%7D%0D%0A%0D%0A%2F%2F%20contrast%3A%0D%0Aabstract%20class%20BarClass%20%7B%0D%0A%20%20%20%20abstract%20bar()%3B%0D%0A%7D%0D%0Aabstract%20class%20BarSubClass%20extends%20BarClass%20%7B%0D%0A%20%20%20%20%2F%2F%20no%20%60abstract%20bar()%3B%60%20required%0D%0A%7D)
**Related Issues:**
- #19847, where typescript fails to see that a superclass _does_ implement a method (contrast this ticket, where typescript fails to see that a class _need not_ implement a method) | Suggestion,Needs Proposal | high | Critical |
307,869,445 | pytorch | LBFGS always give nan results, why | I use the LBFGS alogorithm, and found that if maxiter is larger enough, i.e., maxiter >10, the optimizer always give nan results. Why? | needs reproduction,module: numerical-stability,module: optimizer,triaged | medium | Major |
307,889,494 | rust | Diagnostics in MIR passes (arithmetic_overflow, unconditional_panic) are not caught with `cargo check` | I just tried to ran the compile-fail suite without trans, and these tests failed:
```
failures:
[compile-fail] compile-fail/array_const_index-0.rs
[compile-fail] compile-fail/array_const_index-1.rs
[compile-fail] compile-fail/asm-src-loc.rs
[compile-fail] compile-fail/bad-intrinsic-monomorphization.rs
[compile-fail] compile-fail/cdylib-deps-must-be-static.rs
[compile-fail] compile-fail/const-err-early.rs
[compile-fail] compile-fail/const-err-multi.rs
[compile-fail] compile-fail/const-err.rs
[compile-fail] compile-fail/const-err2.rs
[compile-fail] compile-fail/const-err3.rs
[compile-fail] compile-fail/const-eval-overflow2.rs
[compile-fail] compile-fail/const-eval-overflow2b.rs
[compile-fail] compile-fail/const-eval-overflow2c.rs
[compile-fail] compile-fail/const-slice-oob.rs
[compile-fail] compile-fail/dupe-symbols-1.rs
[compile-fail] compile-fail/dupe-symbols-2.rs
[compile-fail] compile-fail/dupe-symbols-3.rs
[compile-fail] compile-fail/dupe-symbols-4.rs
[compile-fail] compile-fail/dupe-symbols-5.rs
[compile-fail] compile-fail/dupe-symbols-6.rs
[compile-fail] compile-fail/dupe-symbols-7.rs
[compile-fail] compile-fail/huge-array.rs
[compile-fail] compile-fail/huge-enum.rs
[compile-fail] compile-fail/huge-struct.rs
[compile-fail] compile-fail/impl-trait/infinite-impl-trait-issue-38064.rs
[compile-fail] compile-fail/infinite-instantiation.rs
[compile-fail] compile-fail/issue-10755.rs
[compile-fail] compile-fail/issue-11154.rs
[compile-fail] compile-fail/issue-15919.rs
[compile-fail] compile-fail/issue-17913.rs
[compile-fail] compile-fail/issue-22638.rs
[compile-fail] compile-fail/issue-26548.rs
[compile-fail] compile-fail/issue-44578.rs
[compile-fail] compile-fail/issue-8460-const.rs
[compile-fail] compile-fail/issue-8727.rs
[compile-fail] compile-fail/linkage2.rs
[compile-fail] compile-fail/linkage3.rs
[compile-fail] compile-fail/lint-exceeding-bitshifts.rs
[compile-fail] compile-fail/lint-exceeding-bitshifts2.rs
[compile-fail] compile-fail/nolink-with-link-args.rs
[compile-fail] compile-fail/non-interger-atomic.rs
[compile-fail] compile-fail/panic-runtime/abort-link-to-unwind-dylib.rs
[compile-fail] compile-fail/panic-runtime/libtest-unwinds.rs
[compile-fail] compile-fail/panic-runtime/transitive-link-a-bunch.rs
[compile-fail] compile-fail/panic-runtime/two-panic-runtimes.rs
[compile-fail] compile-fail/panic-runtime/want-abort-got-unwind.rs
[compile-fail] compile-fail/panic-runtime/want-abort-got-unwind2.rs
[compile-fail] compile-fail/panic-runtime/want-unwind-got-abort.rs
[compile-fail] compile-fail/panic-runtime/want-unwind-got-abort2.rs
[compile-fail] compile-fail/recursion.rs
[compile-fail] compile-fail/required-lang-item.rs
[compile-fail] compile-fail/rmeta_lib.rs
[compile-fail] compile-fail/simd-intrinsic-generic-arithmetic.rs
[compile-fail] compile-fail/simd-intrinsic-generic-cast.rs
[compile-fail] compile-fail/simd-intrinsic-generic-comparison.rs
[compile-fail] compile-fail/simd-intrinsic-generic-elements.rs
[compile-fail] compile-fail/simd-intrinsic-generic-reduction.rs
[compile-fail] compile-fail/simd-type-generic-monomorphisation.rs
[compile-fail] compile-fail/symbol-names/basic.rs
[compile-fail] compile-fail/symbol-names/impl1.rs
[compile-fail] compile-fail/type_length_limit.rs
```
All of those happens somewhere inside librustc_mir, most of them being monomorphization. This corresponds to `translation item collection` pass, which takes nontrivial amount of time.
Though, we should to try to evaluate things like struct layout, symbols even when we're doing `check` to catch all kind of errors. | A-diagnostics,T-compiler,C-bug | low | Critical |
307,895,759 | youtube-dl | Support request for antenna.gr | ### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2018.03.20*.
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2018.03.20**
### Before submitting an *issue* make sure you have:
- [x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
- [x] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser
### What is the purpose of your *issue*?
- [x] Site support request (request for adding support for a new site)
---
### If the purpose of this *issue* is a *bug report*, *site support request* or you are not completely sure provide the full verbose output:
```
youtube-dl.exe -v https://www.antenna.gr/watch/337261/to-kafe-tis-xaras-epeis-86-
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.antenna.gr/watch/337261/to-kafe-tis-xaras-epeis-86-']
[debug] Encodings: locale cp1253, fs mbcs, out cp737, pref cp1253
[debug] youtube-dl version 2018.03.20
[debug] Python version 3.4.4 (CPython) - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-90399-ged0e0fe102, ffprobe N-90399-ged0e0fe102, phantomjs 2.1.1
[debug] Proxy map: {'https': 'https://127.0.0.1:3128', 'http': 'http://127.0.0.1:3128', 'ftp': 'ftp://127.0.0.1:3128'}
[generic] to-kafe-tis-xaras-epeis-86-: Requesting header
WARNING: Falling back on generic information extractor.
[generic] to-kafe-tis-xaras-epeis-86-: Downloading webpage
[generic] to-kafe-tis-xaras-epeis-86-: Extracting information
ERROR: Unsupported URL: https://www.antenna.gr/watch/337261/to-kafe-tis-xaras-epeis-86-
Traceback (most recent call last):
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpbt_jbnlh\build\youtube_dl\YoutubeDL.py", line 785, in extract_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpbt_jbnlh\build\youtube_dl\extractor\common.py", line 440, in extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpbt_jbnlh\build\youtube_dl\extractor\generic.py", line 3161, in _real_extract
youtube_dl.utils.UnsupportedError: Unsupported URL: https://www.antenna.gr/watch/337261/to-kafe-tis-xaras-epeis-86-
```
```
youtube-dl.exe -v https://www.antenna.gr/live
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.antenna.gr/live']
[debug] Encodings: locale cp1253, fs mbcs, out cp737, pref cp1253
[debug] youtube-dl version 2018.03.20
[debug] Python version 3.4.4 (CPython) - Windows-7-6.1.7601-SP1
[debug] exe versions: ffmpeg N-90399-ged0e0fe102, ffprobe N-90399-ged0e0fe102, phantomjs 2.1.1
[debug] Proxy map: {'ftp': 'ftp://127.0.0.1:3128', 'https': 'https://127.0.0.1:3128', 'http': 'http://127.0.0.1:3128'}
[generic] live: Requesting header
WARNING: Falling back on generic information extractor.
[generic] live: Downloading webpage
[generic] live: Extracting information
ERROR: Unsupported URL: https://www.antenna.gr/live
Traceback (most recent call last):
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpbt_jbnlh\build\youtube_dl\YoutubeDL.py", line 785, in extract_info
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpbt_jbnlh\build\youtube_dl\extractor\common.py", line 440, in extract
File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpbt_jbnlh\build\youtube_dl\extractor\generic.py", line 3161, in _real_extract
youtube_dl.utils.UnsupportedError: Unsupported URL: https://www.antenna.gr/live
```
---
### If the purpose of this *issue* is a *site support request* please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**):
- Single video: https://www.antenna.gr/watch/337261/to-kafe-tis-xaras-epeis-86-
- Plenty of similar links: https://www.antenna.gr/tokafetisxaras/videos
- Live stream: https://www.antenna.gr/live
---
Web TV site of Greek TV station Antenna | geo-restricted | low | Critical |
307,908,278 | flutter | flutter_driver's finders should have the equivalent of flutter_test's Finder.evaluate() | ## Steps to Reproduce
Using flutter_driver in the QA environment. Options feels quite limited currently. I am trying to check if an element exists or not, perhaps a function on the like of finder.IsEmpty or something like IfExists in Appium which the skips the element if it doesn't exist and doesn't necessarily throw an exception.
## Logs
Application runs fine. Just looking for more functionalities of flutter driver.
## Flutter Doctor
```
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.1.5, on Microsoft Windows [Version 6.1.7601], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[!] Android Studio (version 2.3)
X Unable to find bundled Java version.
[√] Android Studio (version 3.0)
[√] VS Code (version 1.21.1)
[√] Connected devices (1 available)
! Doctor found issues in 1 category.
``` | a: tests,c: new feature,framework,t: flutter driver,c: proposal,P3,team-framework,triaged-framework | low | Major |
307,993,872 | TypeScript | Can't extend intersection containing constructable type parameter | Lets say we have 2 mixins, like this:
```typescript
type Constructable<T = {}> = new (...args : any[]) => T
export const Mixin1 = <T extends Constructable>(base : T) =>
class Mixin1 extends base {
method1() {
}
}
export const Mixin2 = <T extends Constructable>(base : T) =>
class Mixin2 extends base {
method2 () {
}
}
```
Now we want to declare a `Mixin3` that already includes `Mixin2`:
- First of all this won't work
```typescript
export const Mixin3 = <T extends Constructable>(base : T) =>
class Mixin3 extends Mixin2(base) { // !!! typecheck error here
method3 () {
}
}
```
but this form will work
```typescript
export const Mixin3 = <T extends Constructable>(base : T) =>
class Mixin3 extends Mixin2<Constructable>(base) {
method3 () {
}
}
```
This is generally fine.
Now, we want to declare `Mixin4` which includes `Mixin3` and `Mixin1`:
```typescript
export const Mixin4 = <T extends Constructable>(base : T) =>
class Mixin4 extends Mixin3(Mixin1(base)) {
method4 () {
this.method1() // !!! this method is not "recognized"
this.method2() // !!! this method is recognized
}
}
```
Note, that for `Mixin4` the specification of the form `Mixin2<Constructable>` like we did for `Mixin3` is not needed.
It seems the nested application of the `Mixin1` in the declaration of `Mixin4` was not "picked up". Any help is greatly appreciated.
=======================================================================
All the code from above in one snippet:
```typescript
type Constructable<T = {}> = new (...args : any[]) => T
export const Mixin1 = <T extends Constructable>(base : T) =>
class Mixin1 extends base {
method1() {
}
}
export const Mixin2 = <T extends Constructable>(base : T) =>
class Mixin2 extends base {
method2 () {
}
}
export const Mixin3 = <T extends Constructable>(base : T) =>
class Mixin3 extends Mixin2<Constructable>(base) {
method3 () {
}
}
export const Mixin4 = <T extends Constructable>(base : T) =>
class Mixin4 extends Mixin3(Mixin1(base)) {
method4 () {
this.method1()
this.method2()
}
}
```
| Bug | low | Critical |
308,033,003 | opencv | Implement HoughCircles mode without internal edge detection | Could you implement Hough transform mode without any edge detection for application to the images already containing circles? | feature,category: imgproc | low | Major |
308,034,308 | TypeScript | [2.8.0-rc] Segfault when running compiler with --d or --watch (out of memory) | Hello,
I was using 2.8.0-dev-20180216 and recently switched to 2.8.0-rc. I immediately noticed, that, when launching compiler with `--watch` it started to take a lot longer for the initial compilation. The subsequent compilations on file change were working fine.
But now, after some code refactoring, launching with `--watch` segfaults with out of memory error (after a long wait). Running w/o `--watch` works just fine (and fast enough).
So there's definitely some regression related to the initial compilation of the project in `--watch` mode.
Here's an output from the shell session. Note, how compilation w/o `--watch` worked fine (3rd command):
```shell
nickolay@outpost:~/workspace/Bryntum/SchedulingEngine0.x$ ./node_modules/.bin/tsc --version
Version 2.8.0-rc
nickolay@outpost:~/workspace/Bryntum/SchedulingEngine0.x$ node --version
v8.9.4
nickolay@outpost:~/workspace/Bryntum/SchedulingEngine0.x$ ./node_modules/.bin/tsc
nickolay@outpost:~/workspace/Bryntum/SchedulingEngine0.x$ ./node_modules/.bin/tsc --watch
16:40:41 - Starting compilation in watch mode...
<--- Last few GCs --->
[4089:0x23b2e20] 92678 ms: Mark-sweep 1411.0 (1459.8) -> 1411.0 (1443.8) MB, 1653.6 / 0.5 ms (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 1655 ms) last resort GC in old space requested
[4089:0x23b2e20] 94301 ms: Mark-sweep 1411.0 (1443.8) -> 1411.0 (1443.8) MB, 1622.7 / 0.6 ms last resort GC in old space requested
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x43f5ef25ee1 <JSObject>
1: getTextOfNode(aka getTextOfNode) [/home/nickolay/workspace/Bryntum/SchedulingEngine0.x/node_modules/typescript/lib/tsc.js:~60023] [pc=0xc63f1afcb97](this=0x212ba7e02311 <undefined>,node=0x27070b5c3fd9 <Node map = 0x136dd41e54c1>,includeTrivia=0x212ba7e02421 <false>)
2: emitIdentifier(aka emitIdentifier) [/home/nickolay/workspace/Bryntum/SchedulingEngine0.x/node_modules/typescript/lib/t...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [node]
2: 0x122563c [node]
3: v8::Utils::ReportOOMFailure(char const*, bool) [node]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
5: v8::internal::Factory::NewFixedArray(int, v8::internal::PretenureFlag) [node]
6: v8::internal::LoadIC::LoadFromPrototype(v8::internal::Handle<v8::internal::Map>, v8::internal::Handle<v8::internal::JSObject>, v8::internal::Handle<v8::internal::Name>, v8::internal::Handle<v8::internal::Smi>) [node]
7: v8::internal::LoadIC::GetMapIndependentHandler(v8::internal::LookupIterator*) [node]
8: v8::internal::IC::ComputeHandler(v8::internal::LookupIterator*) [node]
9: v8::internal::LoadIC::UpdateCaches(v8::internal::LookupIterator*) [node]
10: v8::internal::LoadIC::Load(v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Name>) [node]
11: v8::internal::Runtime_LoadIC_Miss(int, v8::internal::Object**, v8::internal::Isolate*) [node]
12: 0xc63f178463d
Aborted (core dumped)
nickolay@outpost:~/workspace/Bryntum/SchedulingEngine0.x$
```
| Bug,Domain: Declaration Emit | medium | Critical |
308,069,851 | react | Dangerous strings can reach browser builtins | <!--
Note: if the issue is about documentation or the website, please file it at:
https://github.com/reactjs/reactjs.org/issues/new
-->
**Do you want to request a *feature* or report a *bug*?**
A bug, but a well known and worked-around one.
**What is the current behavior?**
```jsx
var x = 'javascript:alert(1)';
ReactDOM.render(
(<a href={x}>Link</a>),
document.getElementById('container')
);
```
produces a link that alerts.
**If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:**
* [Load the code above in the codepen REPL](https://jsfiddle.net/Luktwrdm/202/)
* After the REPL loads, click the "Run" button at the top left.
* You should see a blue "link" in the bottom-right pane.
* Click it. An alert will popup.
The alert should not pop up.
A simple string that reaches an `href` attribute should not cause arbitrary code execution even with user interaction.
**What is the expected behavior?**
A string that reaches a browser builtin like the `HTMLAElement.prototype.href` setter should not cause code execution.
**Discussion**
[Polymer Resin](https://docs.google.com/presentation/d/1hepAXMroHSNTM0NV1aGlntjHrw0a0QOM5X5JvfXv_N0/edit#slide=id.g227691820f_0_198) uses hooks in another webcomponents framework to intercept value before they reach browser builtins where they can be vetted. A similar approach could work for React.
It allows values to reach browser builtins when they are innocuous or have a runtime type that indicates that the author intentionally marked them as safe for that kind of browser builtin.
For example, an `instanceof SafeURL` would be allowed to reach `HTMLAElement.prototype.href` as would any string that is a relative URL, or one with a whitelisted protocol in (`http`, `https`, `mailto`, `tel`) but not `javascript:...`.
Many developers know that `<a href={...}>` is risky, but if the link is an implementation detail of a custom React element, then developers don't have the context to know which attributes they need to be careful with. They shouldn't have to either since it is an implementation detail.
**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**
I believe this is widespread across versions.
An earlier REPL I tried showed that it worked on version 16.2.0 from https://unpkg.com/react-dom/umd/react-dom.development.js but I don't know what version the jsfiddle above uses.
| Component: DOM,Type: Discussion | low | Critical |
308,159,313 | go | cmd/link: package versioning for shared libraries is incompatible with linkobj builds | During linkobj builds, __.PKGDEF files are still included in the linker object files, but they're empty stub files that only contain information already present in the .o file, so I'm looking at getting rid of them in that case.
Working on cmd/link, I notice that genhash (used for generating package versions from the __.PKGDEF files for shared library builds) makes two assumptions that are incompatible with this:
1) They assume __.PKGDEF files are the first file in the .a. This is currently true because loadobjfile requires it to be the case, but won't be if we get rid of the __.PKGDEF files from linkobj files (as I intend to do).
2) In linkobj builds, the __.PKGDEF file is largely useless for versioning because it doesn't actually record anything about the package. So the versioning is broken.
My plan here is:
1) Near-term: change cmd/link to not require __.PKGDEF files for non-shared builds, change genhash to error if the archive is missing a __.PKGDEF file, and change cmd/compile to stop producing useless __.PKGDEF files in linkobj files.
This means shared library, linkobj builds will now explicitly fail, whereas before they would work but be subtly incorrect due to useless package version files.
2) Intermediate-term: have cmd/compile compute the package version hash and include it directly in the link object, so that cmd/link doesn't need the __.PKGDEF at all.
/cc @ianlancetaylor @mwhudson | NeedsFix,compiler/runtime | low | Critical |
308,185,553 | go | net/http: automatically add X-Content-Type-Options: nosniff | Some old browsers have an unfortunate mis-feature where they will detect and interpret HTML in responses that have different `Content-Type`. This is commonly referred to as content sniffing, and is a security risk when attacker-controlled content is served, leading to XSS.
The proposal is to automatically include the `X-Content-Type-Options: nosniff` header when `Content-Type` is one of the values known to trigger content sniffing: `text/plain`, `application/octet-stream`, `application/unknown`, `unknown/unknown`, `*/*` or an invalid value without a slash.
It doesn't solve all issues, for example plugins are still a problem, and even older browsers don't support it, but it's almost free and mitigates the issue in IE8, the most used affected browser (according to https://caniuse.com/usage-table, https://blogs.msdn.microsoft.com/ie/2008/07/02/ie8-security-part-v-comprehensive-protection/).
There should probably be a way to disable it for users that care about the header overhead and are unconcerned by content sniffing. Maybe setting it to an empty string? Is there precedent?
See also #13150
/cc @bradfitz @andybons @rsc | Proposal,Proposal-Hold | medium | Critical |
308,195,979 | go | net: different lists of addresses are returned depending on order of multiple aliases in /etc/hosts on Mac OS with CGO | TL;DR - `net.LookupIP` may return a different list of addresses depending on the order of multiple names in an `/etc/hosts` mapping (e.g. `127.0.0.1 my.local localhost`). I don't know if this should be surprising or not; however, I did have a NATS client as well as [an official NATS sample client](https://github.com/nats-io/go-nats/blob/master/examples/nats-sub.go) malfunction on me, and I wondered what the problem might be.
### What version of Go are you using (`go version`)?
go version go1.10 darwin/amd64
### Does this issue reproduce with the latest release?
On latest.
### What operating system and processor architecture are you using (`go env`)?
darwin amd64
### What did you do?
* With the following test code:
```go
package main
import (
"fmt"
"net"
)
func main() {
ips, _ := net.LookupIP("localhost")
fmt.Printf("IPs: %v\n", ips)
}
```
* With the following `/etc/hosts`:
```
127.0.0.1 localhost my.local # This line will be varied in the tests below
255.255.255.255 broadcasthost
::1 localhost
```
* Run the test program four times while varying 1) the resolver and 2) the order of `localhost` and `my.local` in `/etc/hosts`. (After changing `/etc/hosts`, run `sudo killall -HUP mDNSResponder`).
```
# localhost FIRST (`127.0.0.1 localhost my.local`) and pure GO resolver:
$ GODEBUG=netdns=go+1 go run junk.go
go package net: GODEBUG setting forcing use of Go's resolver
IPs: [::1 127.0.0.1]
```
```
# localhost FIRST (`127.0.0.1 localhost my.local`) and CGO resolver:
$ GODEBUG=netdns=1 go run junk.go
go package net: using cgo DNS resolver
IPs: [::1 127.0.0.1]
```
```
# localhost SECOND (`127.0.0.1 my.local localhost`) and pure GO resolver:
$ GODEBUG=netdns=go+1 go run junk.go
go package net: GODEBUG setting forcing use of Go's resolver
IPs: [::1 127.0.0.1]
```
```
# localhost SECOND (`127.0.0.1 my.local localhost`) and CGO resolver:
$ GODEBUG=netdns=1 go run junk.go
go package net: using cgo DNS resolver
IPs: [127.0.0.1] # <---- This is the oddball; no IPv6 address
```
### What did you expect to see?
I expected the returned set of IPs to be the same in all four tests.
### What did you see instead?
The combination of `localhost`-last and `cgo` caused a different set of addresses to be resolved. | NeedsInvestigation | low | Critical |
308,209,303 | flutter | Clearer message when opening Android Studio before running flutter build/run | Opening the gallery in Android Studio by importing the gradle file before `flutter build/run`ing first doesn't create a properly populated local.properties and throws an unclear Flutter SDK not found error in Android Studio. | platform-android,tool,t: gradle,P2,team-android,triaged-android | low | Critical |
308,217,633 | TypeScript | esModuleInterop should work even when compiling to esnext modules | **TypeScript Version:** 2.7.2
**Search Terms:** esModuleInterop, esnext, modules, import, export, default
**Code**
With this type definition:
```ts
declare function fn(): void;
declare module "external" {
export = fn;
}
```
Running with:
```
tsc --esModuleInterop --module esnext
```
Produces these errors when importing:
```ts
import fn1 from 'external'; // error TS1192: Module '"external"' has no default export.
import fn2 = require('external'); // error TS1202: Import assignment cannot be used when targeting ECMAScript modules.
```
But, if you use commonjs modules:
```
tsc --esModuleInterop --module commonjs
```
It works as expected (because of `--esModuleInterop`)
```ts
import fn1 from 'external'; // works
import fn2 = require('external'); // works
```
**Expected behavior:**
It is understandable that the type checker doesn't want to pretend the import is interop'd when it's not compiling in the helpers.
But if you've specified `--esModuleInterop` and `--module esnext` the assumption from the type checker should be that an external system is applying the interop. Otherwise why would you specify `--esModuleInterop`?
**Playground Link:** https://github.com/jamiebuilds/ts-bug | Suggestion,In Discussion,Domain: ES Modules | low | Critical |
308,231,953 | TypeScript | Experiment with trailing comma insertion text for object literal completions | When I'm adding a new property in the middle of an object literal, there's nothing I love more than getting an immediate parse error and then having to add a comma after the body of a nested object literal/method declaration. It'd be nice to see if we can smooth out the experience here. Maybe we can have comma insertion text after these completions (provided the experience doesn't feel annoying).

| Suggestion,Needs Proposal,Domain: Completion Lists | low | Critical |
308,233,114 | youtube-dl | Making lazy-extractors fails | I was trying to compile with lazy-extractors enabled and got the following error:
```
$ make lazy-extractors
/usr/bin/env python devscripts/make_lazy_extractors.py youtube_dl/extractor/lazy_extractors.py
WARNING: Lazy loading extractors is an experimental feature that may not always work
Traceback (most recent call last):
File "devscripts/make_lazy_extractors.py", line 89, in <module>
src = build_lazy_ie(ie, name)
File "devscripts/make_lazy_extractors.py", line 57, in build_lazy_ie
s += '\n' + getsource(ie.suitable)
File "/usr/lib/python2.7/inspect.py", line 700, in getsource
lines, lnum = getsourcelines(object)
File "/usr/lib/python2.7/inspect.py", line 689, in getsourcelines
lines, lnum = findsource(object)
File "/usr/lib/python2.7/inspect.py", line 528, in findsource
raise IOError('source code not available')
IOError: source code not available
Makefile:111: recipe for target 'youtube_dl/extractor/lazy_extractors.py' failed
make: *** [youtube_dl/extractor/lazy_extractors.py] Error 1
```
| cant-reproduce | low | Critical |
308,239,368 | godot | Implement automatic cleanup of .godot/ folder items (.import/ in 3.x) | **Godot version:**
Godot 3.0.2.stable.official
**Issue description:**
I really like Godot 3's new resource workflow with the .import files and .import folder.
I like that all the source files and settings can be kept in source control.
However, I don't like how Godot never deletes the .stex/.sample/.md5 files for deleted resources in the .import folder. It just feels like the .import folder is accumulating trash more and more until eventually I can't stand it anymore and decide to delete the whole folder and wait for a full re-import. It just bugs me and is something that kind of needs to be managed, when it's supposed to be something you can ignore.
Sometimes I'm also not sure if it affects the editor's knowledge of whether the actual file still exists. (Eg. it is using the .import cache but actually there is no resource file anymore) making me unsure if the image I see in the editor still actually exists. (But that is kind of a separate issue ... because currently even if I delete the resource file and the related .import folder files, the image in the editor is still there. I would expect it to disappear since the editor should know that the file doesn't exist anymore ... it even deleted the .import import settings file for it already! EDIT added as #17734)
It looks like the editor knows how to cleanup the .import import settings files that are in the res folder when the source resource is deleted. I would suggest also cleaning up the .stex/.sample/.md5 files in the .import folder at the same time.
**Steps to reproduce:**
* Delete or rename a resource file in the res folder using an external file explorer.
* Activate Godot
* Go back to external file explorer to see that the .import file next to the resource file has been deleted (this is good)
* Check inside the .import folder to see that the files related to that resource are still in there. (why not delete them too?)
Using the internal file manager actually results in the same thing when renaming. When deleting it does remove the imported resource but leaves the .md5 file. | enhancement,topic:editor,confirmed,topic:import | medium | Critical |
308,265,515 | rust | Long Compile Time (with Optimization) with Large Arrays (2-3 hours) | ## Summary
I have gotten very long compile time (2 hrs plus) when I tried to compile a code that has a large array inbuilt in the code when I turn optimization on. When the code is compiled without optimization, it has a acceptable compile time (10+ seconds).
The array contains 130,000 + strs.
## Details
I tried this code:
```
$ cargo build
Compiling alliteration-gen v0.1.0 (file:///<REDACTED>)
Finished dev [unoptimized + debuginfo] target(s) in 11.23 secs
$ cargo build --release
Compiling alliteration-gen v0.1.0 (file:///<REDACTED>)
^C
```
I expected to see this happen: With the non-optimized code running in 11 seconds, the optimized one shouldn't take more than a few minutes.
Instead, this happened: When i waited for it to compile, it took 10039.81 secs (2 hrs 47 mins).
I replicated the problem again on a different Cargo project path and different machines and faced the same issue (didn't fully compile them as it would take very long. I waited for 5 minutes for each machine).
## Environment
Machines tested:
1. Ubuntu 16.04 (Dell XPS 9360 Intel i5-7200U; 8GB RAM)
2. Kali Linux 2018.01 (Old Laptop with i5)
3. Windows 10 with msvc (Desktop Intel i5 4570 3.2GHz; 8GB RAM)
Cargo project files attached.
[nolib.zip](https://github.com/rust-lang/rust/files/1844460/nolib.zip)
## Meta
`rustc --version --verbose`:
rustc 1.22.1
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.22.1
LLVM version: 4.0
rustc 1.24.1
binary: rustc
commit-hash: unknown
commit-date: unknown
host: x86_64-unknown-linux-gnu
release: 1.24.1
LLVM version: 4.0
rustc 1.24.1 (d3ae9a9e0 2018-02-27)
binary: rustc
commit-hash: d3ae9a9e08edf12de0ed82af57ba2a56c26496ea
commit-date: 2018-02-27
host: x86_64-pc-windows-msvc
release: 1.24.1
LLVM version: 4.0 | A-LLVM,I-compiletime,T-compiler,C-bug | low | Critical |
308,266,690 | flutter | Flutter analyze dives deep into the build/ tree | Analyzer looks into the volatile build/ tree. In fact it steps into ANY not hidden
(dot) directory tree. This is time wasted at every invocation.
## Steps to Reproduce
```
% flutter create -a kotlin -i swift exapp ; cd exapp && flutter build
# flutter build populates build with some 200MB+ /
% mkdir -p build/kotlin/live_examples/bundled/dartcode/
% echo 'noneSuchType x = 0;'> build/kotlin/live_examples/bundled/dartcode/fail.dart
% flutter analyze
Analyzing /testbed/flutter/exapp...
error • Undefined class 'noneSuchType' at build/kotlin/live_examples/bundled/dartcode/fail.dart:1:1 • undefined_class
1 issue found.
(Ran in 14.6s)
```
## Logs
N/A
## Flutter Doctor
```
[✓] Flutter (Channel beta, v0.1.5, on Linux, locale pl_PL.utf8)
• Flutter version 0.1.5 at /testbed/lib/flutter
• Framework revision 3ea4d06340 (4 weeks ago), 2018-02-22 11:12:39 -0800
• Engine revision ead227f118
• Dart version 2.0.0-dev.28.0.flutter-0b4f01f759
[✓] Android toolchain - develop for Android devices (Android SDK 26.0.2)
• Android SDK at /testbed/lib/Android/Sdk
• Android NDK at /testbed/lib/Android/Sdk/ndk-bundle
• Platform android-27, build-tools 26.0.2
• ANDROID_HOME = /testbed/lib/Android/Sdk
• Java binary at: /testbed/lib/Android/android-studio/jre/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
[✓] Android Studio (version 3.0)
• Android Studio at /testbed/lib/Android/android-studio
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
[✓] Connected devices (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 6.0 (API 23) (emulator)
• No issues found!
```
| tool,c: performance,P2,team-tool,triaged-tool | low | Critical |
308,267,807 | rust | rustdoc exposes private use rebindings in the signature of public functions. | Rust will document the `test` function the following code as taking a `ThisIsTotallyNotAnOption<String>` rather than a `Option<String>`. This is confusing at first glance because without looking at the source or actually following the link, there is no indication as to what the type actually is.
```rust
use std::option::{Option as ThisIsTotallyNotAnOption};
pub fn test(o: ThisIsTotallyNotAnOption<String>) { }
``` | T-rustdoc,C-bug | low | Minor |
308,289,050 | rust | rustdoc `[src]` link for modules goes to `mod x;` when the module is re-exported across crates | When I click the master `[src]` link at https://doc.rust-lang.org/std/fmt/ I get taken to https://doc.rust-lang.org/src/alloc/lib.rs.html#178 which is a bit surprising.
I would have expected to be taken to something like https://doc.rust-lang.org/src/alloc/fmt.rs.html#11-567 which is the destination of the `[src]` link at https://doc.rust-lang.org/alloc/fmt/index.html | T-rustdoc,C-bug,A-cross-crate-reexports | low | Minor |
308,290,858 | vscode | Expose API for variable substitution in contributed configuration | So now we have a bunch of variable substitutions we can use in `.vscode/tasks.json`
```
${workspaceFolder} - the path of the folder opened in VS Code
${workspaceFolderBasename} - the name of the folder opened in VS Code without any slashes (/)
${file} - the current opened file
${relativeFile} - the current opened file relative to workspaceFolder
${fileBasename} - the current opened file's basename
${fileBasenameNoExtension} - the current opened file's basename with no file extension
${fileDirname} - the current opened file's dirname
${fileExtname} - the current opened file's extension
${cwd} - the task runner's current working directory on startup
${lineNumber} - the current selected line number in the active file
${env:Name} - the `Name` variable from the environment
${config:Name} - example: ${config:editor.fontSize}
${command:CommandID} - example: ${command:explorer.newFolder}
```
But what if an extension wants to give the user the ability to use substitution for the configuration points it contributes, the extension developer has to implement that all themselves. While it is totally possible to support all of these substitutions, even inlined commands, from an extension the developer has to reinvent the wheel and maintain compatibility with future/past versions of VSCode.
It would be great if there was a way for an extension to make use of the existing variable substitution logic. Unfortunately, [this is pretty deeply embedded](https://github.com/Microsoft/vscode/blob/b0793e672ddda64d26796873b35c5afafc215090/src/vs/workbench/parts/debug/electron-browser/debugConfigurationManager.ts#L600) into vscode and not something made readily accessible to extension developers.
I'm sure that there will be demand for **custom substitution**s and for **limiting what kind of substitutions are allowed**.
Really rough, but this is how something like this could look.
`./package.json`
```json5
"contributes": {
"substitutions": {
"prompt-debug.colorOfSky": {
"description": "..."
}
"prompt-debug.binaryPath": {
"description": "..."
}
},
"configuration": {
"properties": {
"prompt-debug.autoResolveScript": {
"description": "A javascript or typescript file which is exports a function named 'autoResolve' that resolves a file path to run.",
"title": "Auto Resolve Script",
"type": "string",
"required": false,
"substitutions": false, // substitutions disabled (default)
"substitutions": "*", // allow all registered substitutions
"substitutions": [
"*", // allow all registered substitutions
"-command:*" // exclude commands from substitutions
"command:explorer.newFolder" // with the exception of the newFolder command
],
"substitutions": [
"substitution:prompt-debug.*" // allow all of the substitutions prompt-debug contributes
"-substitution:prompt-debug.binaryPath" // with the exception of binaryPath
]
}
}
```
`./src/extension.ts`
```typescript
export function activate(context: vscode.ExtensionContext) {
vscode.substitutions.registerSubstitution('prompt-debug.colorOfSky', () => (Math.random() > 0.5) ? 'blue' : 'grey');
vscode.substitutions.registerSubstitution('prompt-debug.binaryPath', async () => {
const binaryPath = await someAsycStuff();
if (binaryPath) return binaryPath;
else return '/usr/bin/derp';
});
}
```
Obviously `vscode.workspace.getConfiguration().get('prompt-debug.autoResolveScript');` would have to be async because substitutions with commands can take a while to evaluate.. I have a few good ideas, but I'm tired of typing so we can bikeshed later if anyone is actually interested in this.. lol | feature-request,api | high | Critical |
308,296,534 | go | x/crypto/argon2: Add AVX2 implementation | This is a feature request for adding an AVX2 implementation of Argon2. Currently there is a generic / pure Go and an amd64 SSE4.1 implementation.
An AVX2 implementation can improve performance about ~30 %. The AVX2 implementation requires Go 1.10 because of some instructions which are not supported by the assembler in earlier releases.
See also: google/fscrypt#82
/cc @FiloSottile | NeedsDecision,Proposal-Crypto | low | Major |
308,298,694 | rust | Windows: success of canonicalizing r"\" depends on whether set_current_dir has been called | ## Problem: sometimes `Path::new(r"\").canonicalize() fails
Note: apparently this isn't _necessarily_ [against the spec](https://stackoverflow.com/a/151875/1036670) (a better link to the windows spec would be nice)
> In Windows it's relative to what drive your current working directory is at the time. If your current directory is in the C drive then C:\ would be the root. If the current directory is the D drive then D:\ would be the root. There is no absolute root.
Regardless of whether it is against the spec or not, I think basing the "root location" off of the `current_dir` is a best practice. At the very least, having `canonicalize(r"\")` fail is unexpected.
## Full Report
I hit this problem during one of my tests for [path_abs](https://github.com/vitiral/path_abs). The way I handle it is thorny (and there is still a TODO hidden in there).
The below test _passes_ on windows (and linux obviously):
```
if cfg!(windows) {
let result = Path::new(r"\").canonicalize();
assert!(result.is_ok(), "Should work before set_current_dir is called: {:?}", result);
}
let tmp = tempdir::TempDir::new("ex").unwrap();
let tmp = tmp.path();
let tmp_abs = PathArc::new(&tmp).canonicalize().unwrap();
env::set_current_dir(&tmp_abs).unwrap();
if cfg!(windows) {
let result = Path::new(r"\").canonicalize();
assert!(result.is_err());
println!("Got ERR cananonicalizing root: {}", result.unwrap_err());
}\
```
The way I handle this in `path_abs` is the following:
- If the first component is `Root`
- Get the `current_dir` and use it's root instead.
That code [is here](https://github.com/vitiral/path_abs/blob/e6b8b31a70f8e9d03bba3350b229fe9cb26feed6/src/arc.rs#L378) (it's messy and tied to resolving the absolute path in general).
# Rust Info
Running in Windows Appveyor: https://ci.appveyor.com/project/vitiral/path-abs
```
stable installed - rustc 1.24.1 (d3ae9a9e0 2018-02-27)
``` | O-windows,C-enhancement,T-libs-api,A-io | medium | Major |
308,320,041 | opencv | Cuda streams do not run concurrently when using the convolve function | <!--
If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses.
If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute).
This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library.
-->
##### System information (version)
- OpenCV => 3.4.0
- Operating System / Platform => Windows 64 Bit
- Compiler => Visual Studio 2015
##### Detailed description
Using streams to run multiple different convolutions do not run concurrently . I have not used any compiler flags such as `–default-stream per-thread`
##### Steps to reproduce
The code is in a .cpp file.
Ptr<cuda::Convolution> convolver;
cuda::Stream s1, s2, s3, s4, s5, s6, s7, s8, s9, s10;
convolver->convolve(im_32fc1_d, x, a_d, false, s1);
convolver->convolve(im_32fc1_d, xy, b_d, false, s2);
convolver->convolve(im_32fc1_d, xx, c_d, false, s3);
convolver->convolve(im_32fc1_d, yy, d_d, false, s4);
convolver->convolve(im_32fc1_d, xy, e_d, false, s5);

| priority: low,category: gpu/cuda (contrib) | low | Critical |
308,351,083 | rust | Tracking issue for libtest JSON output | Added in https://github.com/rust-lang/rust/pull/46450
Available in nightly behind a `-Z` flag. | T-libs-api,B-unstable,A-libtest,C-tracking-issue,T-testing-devex | high | Critical |
308,354,233 | go | net/http: BenchmarkClientServerParallelTLS64 sometimes reports an error | Please answer these questions before submitting your issue. Thanks!
### What version of Go are you using (`go version`)?
go version devel +cc155eb
### Does this issue reproduce with the latest release?
Yes.
### What operating system and processor architecture are you using (`go env`)?
GOARCH="arm64"
GOBIN=""
GOCACHE="/home/*/.cache/go-build"
GOEXE=""
GOHOSTARCH="arm64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/username/go"
GORACE=""
GOROOT="/home/username/go-temp"
GOTMPDIR=""
GOTOOLDIR="/home/username/go-temp/pkg/tool/linux_arm64"
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 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build212786936=/tmp/go-build -gno-record-gcc-switches"
### What did you do?
I found this error in the log of our daily job (cd /src ; go test -count 3 -timeout 180m -run=^$ -bench=. ... ).
Running the command "go test -bench BenchmarkClientServerParallelTLS64" alone can also reproduce this error, but the error sometimes appears, sometimes does not appear, you may need to run it several times.
### What did you expect to see?
PASS
### What did you see instead?
I have seen two kinds of error messages. When executing command "go test -bench BenchmarkClientServerParallelTLS64" , the error message appears:
goos: linux
goarch: arm64
pkg: net/http
BenchmarkClientServerParallel4-32 30000 37850 ns/op 12324 B/op 88 allocs/op
BenchmarkClientServerParallel64-32 10000 307570 ns/op 13278 B/op 96 allocs/op
BenchmarkClientServerParallelTLS4-32 20000 112708 ns/op 41859 B/op 433 allocs/op
BenchmarkClientServerParallelTLS64-32 2018/03/25 13:47:49 http: TLS handshake error from 127.0.0.1:58119: read tcp 127.0.0.1:34212->127.0.0.1:58119: use of closed network connection
20000 106537 ns/op 43259 B/op 454 allocs/op
PASS
ok net/http 47.081s
When running all the benchmarks ( cd /src ; go test -count 3 -timeout 180m -run=^$ -bench=. ... ) , in addition to the above error, another error may also occur., namely:
15:10:47 BenchmarkClientServerParallelTLS64-64 Build timed out (after 10 minutes). Marking the build as aborted.
15:20:47 Build was aborted
I do not understand what the problem is. How did it come about? Can anyone explain it to me, thank you!
| Testing,NeedsInvestigation | low | Critical |
308,357,432 | TypeScript | Represent the types of function parameters that mutate inside the function. | <!-- If you have a SUGGESTION:
Most suggestion reports are duplicates, please search extra hard before logging a new suggestion.
See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md
-->
In JavaScript is possible to mutate objects inside functions. Right now, the following code in JavaScript:
```js
function merge(x,y) {
Object.assign(x,y);
}
let x = {a: 1};
merge(x, {b: 2});
console.log(x.b);
```
Can't be written in TypeScript without casting the type. There are a few options whose type definition is wrong in all scenarios I can think of (maybe I'm missing a better option):
## Option 1
```ts
let x: {a: number, b: number} = {a: 1}; // Error, missing b
merge(x, {b: 2});
```
## Option 2
```ts
let x: {a: number, b: number} = {a: 1, b: 2};
merge(x, {b: null});
// From here, x.b is not a number anymore, but you could do
let y: number= x.b;
```
## Suggestion
There could be an extension to function parameter definition like the following:
```ts
// then keyword indicates that before it can be type A, and after it will be of type A&B.
function merge<A,B>(x: A then x2: A&B, y: B) {
Object.assign(x2,y);
}
let x: {a: number, b: number} = {a: 1, b: 2};
merge(x, {b: null});
// Here, type of x is {a: number, b: number} & {b: null}
x.b; // Type null
```
There, we indicate that whatever type was x before, now it is something different. The code above could be written in TypeScript as follows:
```ts
// then keyword indicates that before it can be type A, and after it will be of type A&B.
function merge<A,B>(x: A, y: B) {
Object.assign(x,y);
}
let x: {a: number, b: number} = {a: 1, b: 2};
merge(x, {b: null});
// Here, type of x is {a: number, b: number} & {b: null}
let xAfterMerge = x as {a: number, b: number} & {b: null};
// Since this line, x should not be used but xAfterMerge
xAfterMerge.b; // Type null
```
### Another example
```ts
interface Before {
address: string;
}
interface After {
addr: string;
}
function map(userb: Before then usera: After) {
usera.addr = userb.address;
delete userb.address;
}
let u = {adress: "my street"};
map(u);
console.log(u.addr);
```
That could be syntax sugar for this:
```ts
interface Before {
address: string;
}
interface After {
addr: string;
}
function map(userb: any) {
userb.addr = userb.address;
delete userb.address;
}
let u = {adress: "my street"};
map(u);
console.log((u as After).addr);
```
## Syntax
It could be something like:
```
identifier: type *then* identifier: type
```
With the identifiers being different, and with the types being mandatory an extension of Object.
| Suggestion,Awaiting More Feedback | medium | Critical |
308,376,334 | vscode | Feature Request : SHOW / HIDE comments in editor | Hi VsCode teams !
# Why developers need it
- Adding comments and documentation in a codebase is very important for maintenance.
- But often it could make it harder to read (especially if you use jsdoc or swagger)
**Conclusion:** toggling comments visibility could be a very nice productivity feature directly inside VSCode ! Moreover, **this feature exists on most of other text editors.**
# Question
If i missed the feature in VSCode, how could i show / hide comments in my code ?
I saw [this extension](https://marketplace.visualstudio.com/items?itemName=3dGrabber.HideShowComments) on vscode store, but it's not maintained and it doesn't work with last versions of VSCode
Thanks for your work ! :open_hands:
```[tasklist]
### Tasks
```
| feature-request,languages-basic,editor-comments | high | Critical |
308,382,680 | opencv | Error installing on Ubuntu | ##### System information (version)
- OpenCV => 3.4.1
- Operating System / Platform => Ubuntu 16.04.4 LTS
##### Detailed description
Trying to install latest build on Ubuntu. Before compiling I installed all of these: https://pastebin.com/raw/DhKkF0Da
This is where it stops after sudo make. What am I missing?
[ 90%] Generate files for Java bindings
Traceback (most recent call last):
File "/home/tonyrulez/Letöltések/opencv-3.4.1/modules/java/generator/../generator/gen_java.py", line 1093, in <module>
copy_java_files(java_files_dir, target_path)
File "/home/tonyrulez/Letöltések/opencv-3.4.1/modules/java/generator/../generator/gen_java.py", line 1032, in copy_java_files
src = checkFileRemap(java_file)
File "/home/tonyrulez/Letöltések/opencv-3.4.1/modules/java/generator/../generator/gen_java.py", line 25, in checkFileRemap
assert path[-3:] != '.in', path
AssertionError: /home/tonyrulez/Letöltések/opencv-3.4.1/modules/java/generator/src/java/org/opencv/osgi/OpenCVNativeLoader.java.in
modules/java_bindings_generator/CMakeFiles/gen_opencv_java_source.dir/build.make:357: recipe for target 'CMakeFiles/dephelper/gen_opencv_java_source' failed
make[2]: *** [CMakeFiles/dephelper/gen_opencv_java_source] Error 1
CMakeFiles/Makefile2:2547: recipe for target 'modules/java_bindings_generator/CMakeFiles/gen_opencv_java_source.dir/all' failed
make[1]: *** [modules/java_bindings_generator/CMakeFiles/gen_opencv_java_source.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2 | category: build/install,incomplete | low | Critical |
308,391,991 | opencv | Implement HoughCircles and HoughLines with specifying bounds on parameters in order to lessen complexity | For HoughCircles I mean the range of coordinates of their centers. | feature,category: imgproc,priority: low | low | Minor |
308,418,951 | go | x/tools/cmd/gomvpkg: incorrect handling of cgo packages | ### What version of Go are you using (`go version`)?
go version devel +438a757d73 Wed Feb 21 18:10:00 2018 +0000 linux/amd64
### Does this issue reproduce with the latest release?
Yes, on the latest version of `gomvpkg` (rev golang/tools@77106db15f689a60e7d4e085d967ac557b918fb2).
### What operating system and processor architecture are you using (`go env`)?
```
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/u/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/u/Desktop/foo"
GORACE=""
GOROOT="/home/u/go"
GOTMPDIR=""
GOTOOLDIR="/home/u/go/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-build382385690=/tmp/go-build -gno-record-gcc-switches"
```
### What did you do?
Tried to move a package containing cgo code. In this example, we try to move package `a` to `b`.
```bash
gomvpkg -from a -to b
```
Source code of package `a`. Files:
* [a.go](https://play.golang.org/p/ZatrFeaVu8v)
a.go
```go
package a
import "C"
var _ = C.CString("foo")
```
Output source code of package `b`. Files:
* [a.go](https://play.golang.org/p/-dN-RRSgILS)
* [C](https://play.golang.org/p/PO1Z3w7QtdT)
a.go:
```go
// Created by cgo - DO NOT EDIT
//line a.go:1
package b
import _ "unsafe"
var _ = (_Cfunc_CString)("foo")
```
C:
```go
// Created by cgo - DO NOT EDIT
package b
import "unsafe"
import _ "runtime/cgo"
import "syscall"
var _ syscall.Errno
func _Cgo_ptr(ptr unsafe.Pointer) unsafe.Pointer { return ptr }
//go:linkname _Cgo_always_false runtime.cgoAlwaysFalse
var _Cgo_always_false bool
//go:linkname _Cgo_use runtime.cgoUse
func _Cgo_use(interface{})
type _Ctype_char int8
type _Ctype_void [0]byte
//go:linkname _cgo_runtime_cgocall runtime.cgocall
func _cgo_runtime_cgocall(unsafe.Pointer, uintptr) int32
//go:linkname _cgo_runtime_cgocallback runtime.cgocallback
func _cgo_runtime_cgocallback(unsafe.Pointer, unsafe.Pointer, uintptr, uintptr)
//go:linkname _cgoCheckPointer runtime.cgoCheckPointer
func _cgoCheckPointer(interface{}, ...interface{})
//go:linkname _cgoCheckResult runtime.cgoCheckResult
func _cgoCheckResult(interface{})
func _Cfunc_CString(s string) *_Ctype_char {
p := _cgo_cmalloc(uint64(len(s) + 1))
pp := (*[1 << 30]byte)(p)
copy(pp[:], s)
pp[len(s)] = 0
return (*_Ctype_char)(p)
}
//go:cgo_import_static _cgo_dbcbf9d0883b_Cfunc__Cmalloc
//go:linkname __cgofn__cgo_dbcbf9d0883b_Cfunc__Cmalloc _cgo_dbcbf9d0883b_Cfunc__Cmalloc
var __cgofn__cgo_dbcbf9d0883b_Cfunc__Cmalloc byte
var _cgo_dbcbf9d0883b_Cfunc__Cmalloc = unsafe.Pointer(&__cgofn__cgo_dbcbf9d0883b_Cfunc__Cmalloc)
//go:linkname runtime_throw runtime.throw
func runtime_throw(string)
//go:cgo_unsafe_args
func _cgo_cmalloc(p0 uint64) (r1 unsafe.Pointer) {
_cgo_runtime_cgocall(_cgo_dbcbf9d0883b_Cfunc__Cmalloc, uintptr(unsafe.Pointer(&p0)))
if r1 == nil {
runtime_throw("runtime: C malloc failed")
}
return
}
```
### What did you expect to see?
I expected to see the package moved from `$GOPATH/src/a` to `$GOPATH/src/b`, without affecting cgo code. That is the output should be `b/b.go`:
```go
package b
import "C"
var _ = C.CString("foo")
```
### What did you see instead?
A mysterious `C` file and a rewrite of the code using cgo.
Note, the output (i.e. package `b`) does not compile, while the input did.
```
[u@x220 b]$ go install
# b
a.go:5: undefined: _Cfunc_CString
``` | NeedsInvestigation,Tools | low | Critical |
308,470,606 | TypeScript | Object.getPrototypeOf returns `any` instead of `object | null` |
<!-- If you have a BUG:
Please fill in the *entire* template below.
-->
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
**TypeScript Version:** 2.7.2
<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:** `Object.getPrototypeOf`, `ObjectConstructor.getPrototypeOf`, wrong return type
**Code**
```ts
let prototype = Object.getPrototypeOf(foo);
```
**Expected behavior:**
The type of `prototype` should be `object | null`. According to the spec, `getPrototypeOf` returns the value of the internal property `[[Prototype]]` [[1]](https://www.ecma-international.org/ecma-262/5.1/#sec-15.2.3.2) whose values can only be of type `object` or `null` [[2]](https://www.ecma-international.org/ecma-262/5.1/#sec-8.6.2).
**Actual behavior:**
`prototype` has type `any`
**Playground Link:** [here](http://www.typescriptlang.org/play/#src=%0D%0Alet%20foo%20%3D%20%7B%7D%3B%0D%0Alet%20prototype%20%3D%20Object.getPrototypeOf(foo)%3B%0D%0A%0D%0Aprototype.thisPropertyDefinitelyDoesntExist()%3B%0D%0A)
| Suggestion,Breaking Change,Awaiting More Feedback | low | Critical |
308,475,984 | opencv | [request / evolution] Provide users with compiled file size break down analysis reports | # [request / evolution] Provide users with compiled file size break down analysis reports
* Author: *(vacated)*
* Link: *(to be determined)*
* Status: **Draft**
* Platform: **Mobile first (such as Android and iOS)**, others later
* Complexity: *(to be determined)*
## Introduction and Rationale
Mobile apps tend to be downloaded over the air. Each app tend to require bundling its own OpenCV binary, i.e. there is no sharing of native binary code between apps. There is need to minimize binary code size, even if that requires modifying the default OpenCV build config.
As a personal anecdote, I was working on an app native backend that uses OpenCV for Android (version 2.4.10 or so). The backend uses only three modules: core, imgproc, and imgcodecs. I used ```objdump``` to casually check the size of the binaries, and found that the majority of binary size was taken up by: IlmImf, followed by ```cv::cvtColor```. Both functionality have small API surface but deep innards. As for ```cvtColor```, much of the binary size was taken up by conversions which are not used; a typical app would only use a few of them. There was no build configuration for excluding certain ```cvtColor``` internal implementations from the binary file.
Having the compiled file size analysis report, with break-downs into certain things such as each image I/O codec, and big-ticket functions such as ```cvtColor```, will help teach OpenCV users how to reduce the binary size if they need to.
## Proposed solution
My simplest solution is to run ```objdump``` on the build output, and then parse that output with Python scripts and emitting a report.
For Windows (Microsoft Visual C++), there is ```dumpbin```, although that is a lower priority, because it is unrelated to mobile app development.
The analysis report will process the output of three modules only. Additional modules might be added by amending this proposal.
* core
* imgproc
* imgcodecs
This proposed solution is purely a post-build binary analysis report generation. It does not involve code changes to OpenCV itself. It requires access to the same compiler toolchain used for the build.
With each OpenCV official release, a *sample* analysis report will be accompanied with selected platforms. (The *sample* means "for reference only".) However, because OpenCV users typically need to build from source, they will need to re-run this analysis report on their own build. Therefore, the deliverable of this proposal will need to be shipped as part of the OpenCV build tools.
## Impact on existing code, compatibility
This proposed solution is purely a post-build binary analysis report generation. It does not involve code changes to OpenCV itself. It requires access to the same compiler toolchain used for the build.
## Possible alternatives
Do nothing. Analysis using ```objdump``` can also be done by advanced OpenCV C++ users who work on mobile native code backend. However, many mobile app developers will miss the opportunity to optimize binary size.
## References
* (Link to ```objdump``` documentation)
* (Link to an open-source project that parses the output of ```objdump``` and generates binary file size breakdown analysis)
* (Link to ```dumpbin``` documentation)
| feature,category: build/install | low | Minor |
308,594,328 | godot | -s flag fails in tools=no builds without project | **Godot version:**
Tried 3.0.2 and 928cdb4
**OS/device including version:**
Tried HTML5 and Windows
**Issue description:**
Attempted to run `godot -s script.gd` with `godot` being a template executable (`tools=no`).
Neither the working directory, nor any of its parents, contain a project. No project is specified on the command line.
Expected `script.gd` to run as main loop with default values used for project settings.
Instead exited right away after logging the following:
Error: Could not load game path '.'.
**ERROR**: Condition ' !_start_success ' is true. returned: false
Source: https://github.com/godotengine/godot/blob/928cdb4f8a72c2de5751cddd3205c2a3c09e6f6d/main/main.cpp#L1230
**Steps to reproduce:**
Run `godot -s script.gd` with `godot` being a template executable.
**Minimal reproduction project:**
extends MainLoop
func _iteration(dt):
OS.alert('Success: main loop script is running')
return true | discussion,topic:core | low | Critical |
308,596,651 | youtube-dl | [Freshlive] Add support for paid content | ### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2018.03.20*. If it's not, read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected.
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2018.03.20**
### Before submitting an *issue* make sure you have:
- [x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
- [x] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser
### What is the purpose of your *issue*?
- [x] Feature request (request for a new functionality)
---
### If the purpose of this *issue* is a *bug report*, *site support request* or you are not completely sure provide the full verbose output as follows:
Add the `-v` flag to **your command line** you run youtube-dl with (`youtube-dl -v <your command line>`), copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```):
```
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'https://freshlive.tv/marvelous/198087', u'-v']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.03.20
[debug] Python version 2.7.13 (CPython) - Linux-4.9.0-5-amd64-x86_64-with-debian-9.3
[debug] exe versions: ffmpeg 3.2.10-1, ffprobe 3.2.10-1, phantomjs .
[debug] Proxy map: {}
[FreshLive] 198087: Downloading webpage
[FreshLive] 198087: Downloading m3u8 information
ERROR: Failed to download m3u8 information: HTTP Error 403: Forbidden (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 519, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2199, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib/python2.7/urllib2.py", line 435, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 473, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
```
---
### If the purpose of this *issue* is a *site support request* please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**):
- Single video: https://freshlive.tv/marvelous/198087
- Single video: https://freshlive.tv/hayashi-manatsu/193763
---
### Description of your *issue*, suggested solution and other information
I've been trying to decipher how to download videos from paid subscription channels on freshlive.tv and have noticed that they are handled slightly differently to free content. The AES-128 key seems to be loaded programmatically as evidenced by the example below. My javascript is severely lacking so I've had difficulty working this one out. I have credentials which may be needed for testing.
```
#EXT-X-VERSION:3
#EXT-X-KEY:METHOD=AES-128,URI="abemafresh://abemafresh/198087t261219ad8c0a0938194424025d403f228b75/bcaa1a8ee89b63c8df7e0ad4d2a782f5",IV=0x0f0f2f8feb567cadd636ab98781e7a85
#EXT-X-MEDIA-SEQUENCE:0
#EXT-X-TARGETDURATION:11
#EXTINF:10.067,
```
| account-needed | low | Critical |
308,597,769 | go | cmd/compile: less optimized AMD64 code | Please answer these questions before submitting your issue. Thanks!
### What version of Go are you using (`go version`)?
the newest master branch on March 25, 2018
### Does this issue reproduce with the latest release?
not tried
### What operating system and processor architecture are you using (`go env`)?
amd64/ubuntu16.04
### What did you do?
test commit https://github.com/golang/go/commit/4b00d3f4a2d1379377a0f2312564ae405b946d65#diff-6b1f55ed5d66ec08fb9cbe82259791e9
func ssa(a []int) bool {
return a[0] > a[1]
}
is compiled to
00000 (2) TEXT "".ssa(SB)
00001 (2) FUNCDATA $0, gclocals·4032f753396f2012ad1784f398b170f4(SB)
00002 (2) FUNCDATA $1, gclocals·69c1753bd5f81501d95132d08af04464(SB)
v13 00003 (2) MOVQ "".a+8(SP), AX
v9 00004 (3) TESTQ AX, AX
b1 00005 (3) JLS 13
v25 00006 (3) MOVQ "".a(SP), CX
v16 00007 (3) MOVQ (CX), DX
v3 00008 (3) CMPQ AX, $1
b2 00009 (3) JLS 13
v4 00010 (3) CMPQ 8(CX), DX
v27 00011 (3) SETLT "".~r1+24(SP)
b4 00012 (3) RET
v12 00013 (3) PCDATA $0, $1
v12 00014 (3) CALL runtime.panicindex(SB)
b3 00015 (3) UNDEF
00016 (?) END
which is expected. but
func ssb(a []int) (bool, bool) {
return a[0] > a[1], a[2] != a[3]
}
is compiled to
00000 (6) TEXT "".ssb(SB)
00001 (6) FUNCDATA $0, gclocals·4032f753396f2012ad1784f398b170f4(SB)
00002 (6) FUNCDATA $1, gclocals·69c1753bd5f81501d95132d08af04464(SB)
v7 00003 (6) MOVQ "".a+8(SP), AX
v4 00004 (7) TESTQ AX, AX
b1 00005 (7) JLS 24
v38 00006 (7) MOVQ "".a(SP), CX
v17 00007 (7) MOVQ (CX), DX
v16 00008 (7) CMPQ AX, $1
b2 00009 (7) JLS 24
v10 00010 (7) MOVQ 8(CX), BX
v12 00011 (7) CMPQ BX, DX
v24 00012 (7) CMPQ AX, $2
b4 00013 (7) JLS 24
v34 00014 (7) MOVQ 16(CX), SI
v33 00015 (7) CMPQ AX, $3
b5 00016 (7) JLS 24
v43 00017 (7) MOVQ 24(CX), AX
v8 00018 (7) CMPQ AX, SI
v40 00019 (7) CMPQ BX, DX
v46 00020 (7) SETLT "".~r1+24(SP)
v14 00021 (7) CMPQ AX, SI
v48 00022 (7) SETNE "".~r2+25(SP)
b6 00023 (7) RET
v13 00024 (7) PCDATA $0, $1
v13 00025 (7) CALL runtime.panicindex(SB)
b3 00026 (7) UNDEF
00027 (?) END
The issue here
1. a dead "v8 00018 (7) CMPQ AX, SI" is not eliminated
2. CMPQmem are not used as expected
| Performance,NeedsFix,binary-size | low | Minor |
308,603,916 | electron | Support accessory view option in `dialog.showMessageBox` and `dialog.showErrorBox` | <!--
Thanks for opening an issue! A few things to keep in mind:
- The issue tracker is only for bugs and feature requests.
- Before reporting a bug, please try reproducing your issue against
the latest version of Electron.
- If you need general advice, join our Slack: http://atom-slack.herokuapp.com
-->
* Electron version: 2.0.0-beta.5
* Operating system: macOS 10.13.3
### Expected behavior
I expected `dialog.showMessageBox` and `dialog.showErrorBox` to have an option to specify an accessory view. In the native world, you can render anything inside it, but I'd be happy to just have a multi-line text field.
My specific use-case is that I need to be able to display an error stack trace in the dialog, for [`electron-unhandled`](https://github.com/sindresorhus/electron-unhandled) which currently looks like:
<img width="532" alt="screen shot 2018-03-26 at 21 45 07" src="https://user-images.githubusercontent.com/170270/37913395-fb0c3546-313e-11e8-83cc-c506cc987754.png">
But I would like something like this:

<!-- What do you think should happen? -->
### Actual behavior
<!-- What actually happens? -->
### How to reproduce
<!--
Your best chance of getting this bug looked at quickly is to provide a REPOSITORY that can be cloned and run.
You can fork https://github.com/electron/electron-quick-start and include a link to the branch with your changes.
If you provide a URL, please list the commands required to clone/setup/run your repo e.g.
$ git clone $YOUR_URL -b $BRANCH
$ npm install
$ npm start || electron .
-->
| enhancement :sparkles:,platform/macOS,2-0-x | medium | Critical |
308,701,984 | pytorch | Clean up the extra copies that occur in the execution engine and other places | Known changes:
* Come up with a plan for removing tensor_list<->variable_list copies from the execution engine.
* Switch the execution engine to work using a stack abstraction so that recursive invocations (such as running a white-box `Subgraph`), do not need to create copies of their inputs.
* Switch the FusionCompiler to also use a stack abstraction for similar reasons to the above. | oncall: jit | low | Minor |
308,702,746 | pytorch | Develop a strategy for writing leak tests for pytorch. | Use it to test for leaks in the graph executor/interpreter, etc.
Ideas:
* Add an api to create a tensor, hold a weak reference to it, and assert after a certain point that it is not longer present. Use this tensor as an input to various things that might accidentally hold references to it.
* Add a function like `should_be_freed(x)` that can go in the middle of the network, and adds `x` to a list of tensors that should only be temporaries. A later call `assert_freed()` should check that all those tensors have disappeared.
* Make `should_be_freed` work during tracing and in the script so that intermediates in that code path are checked as well.
Why? Currently our tests will not find when a major leak occurs unless it causes some test to completely run out of GPU memory. This means we often find leaks weeks later when the cause is harder to find. Pybind and python's APIs make introducing leaks very easy, so this happens frequently.
| oncall: jit | low | Minor |
308,763,043 | flutter | [camera] Improve CameraPreview to size itself appropriate for video and picture previews | I am working with a g3 client who is prototyping a camera UI in Flutter, and they're having difficulty getting the preview image from the camera to have a fixed aspect ratio.
They've attempted using an AspectRatio to contain the CameraPreview, but haven't had any results.
Is there a solution to this problem, and can we document it or incorporate it into the CameraPreview API? | customer: crowd,p: camera,package,team-ecosystem,P2,triaged-ecosystem | low | Critical |
308,836,468 | flutter | Function to check if an element is present or not on flutter_driver(QA environment) | ## Steps to Reproduce
Currently testing an application and the lack of ability to check if an element is present/visible is stopping me right dead in the tracks. Something on the lines of that would go a long way in bringing flutter framework on par with appium testing.
## Logs
No issues with the application as such.
| a: tests,c: new feature,tool,t: flutter driver,P3,team-tool,triaged-tool | low | Minor |
308,840,914 | go | time: set specific rule for Date on daylight savings transitions |
### What version of Go are you using (`go version`)?
go1.7.4 linux/amd64
### Does this issue reproduce with the latest release?
Yes
### What operating system and processor architecture are you using (`go env`)?
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/usr/lib/go-1.7"
GOTOOLDIR="/usr/lib/go-1.7/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build628236315=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1
### What did you do?
I called `time.Date` for March 11, 2018, 2:00 AM, and printed the resulting time.
https://play.golang.org/p/N-XUwlGxpaF
### What did you expect to see?
March 11, 2018, 2:00 AM is the moment when the clock in Vancouver changes to 3:00 AM due to switching from PST to PDT. So I would expect one of the following:
- Either 2:00 is interpreted in PST, and the time printed is 2:00 PST
- Or 2:00 is interpreted in PDT, and the time printed is 2:00 PDT
### What did you see instead?
Instead, `time.Date` apparently interprets 2:00 in PDT, but prints 1:00 PST.
| NeedsInvestigation | medium | Critical |
308,878,194 | angular | Reactive forms. formArrayName with formGroupName | <!--
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)
[x] Bug report <!-- Please search GitHub for a similar issue or PR before submitting -->
[x] 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
</code></pre>
## Current behavior
<!-- Describe how the issue manifests. -->
```
...
<div *ngSwitchCase="type.Party"
[@enterAnimation]
(close)="closeRightPart()"
formArrayName="parties">
<div class="col full"
[formGroupName]="contract.parties.indexOf(selectedParty)">
<div>
<div>Some title</div>
<input type="number"
class="full"
formControlName="shipmentVolume" /> // shipmentVolume doesn't update
</div>
...
...
```
`parties: FormArray(SomeObject[])`
In this code example, I don't iterate over `parties`. As a content only show some view with form control at specified `index`. This index of `formGroupName` changes dynamically and in this cases `formControlName` value doesn't update. First rendered `formControlName` value only shown.
## Expected behavior
<!-- Describe what the desired behavior would be. -->
When `formGroupName` changes need to update `formControlName` values too.
In my code example `selectedParty` change, which will trigger to update `[formGroupName]`
## Temporary solution:
Remove this view from template and insert it again with using `setTimeout()`:
```
openRightPart(type: Type, selectedParty: Party = null) {
if (type === Type.Party && selectedParty) {
setTimeout(() => {
this.closeRightPart();
});
setTimeout(() => {
this.selectedParty = selectedParty;
const selectedPart = this.rightParts.find(rp => rp.type === type);
this.openedPart = selectedPart;
});
} else {
...
}
}
```
## Minimal reproduction of the problem with instructions
<!--
For bug reports please provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the problem via
https://stackblitz.com or similar (you can use this template as a starting point: https://stackblitz.com/fork/angular-gitter).
-->
## What is the motivation / use case for changing the behavior?
<!-- Describe the motivation or the concrete use case. -->
## Environment
<pre><code>
Angular version: 5.2.5
<!-- Check whether this is still an issue in the most recent Angular version -->
Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX
For Tooling issues:
- Node version: XX <!-- run `node --version` -->
- Platform: <!-- Mac, Linux, Windows -->
Others:
<!-- Anything else relevant? Operating system version, IDE, package manager, HTTP server, ... -->
</code></pre>
| type: bug/fix,freq1: low,area: forms,P3 | low | Critical |
308,894,894 | vscode | [folding] Fold block comments scrolls editor | re #46597
* open `/src/vs/base/common/arrays.ts`
* set cursor on line 200
* scroll line 200 out of view
* select F1 > Fold Block Comments
* 🐛 line 200 is scrolled back into view | bug,editor-folding | low | Minor |
308,993,844 | vscode | [folding] blocked while language server is starting up | from https://github.com/Microsoft/vscode/issues/44524#issuecomment-376479712\
the collapse button now doed nothing until the language server is up. Not a very pleasant experience. | feature-request,editor-folding | low | Minor |
309,035,971 | vscode | VS Code not being able to open a large file | <!-- Do you have a question? Please ask it on https://stackoverflow.com/questions/tagged/vscode. -->
<!-- Use Help > Report Issue to prefill these. -->
- VSCode Version: 1.21.1
- OS Version: Windows 10 pro
Steps to Reproduce:
1. Get or create a large file (in my case a **19gb** .sql file with insert queries)
2. Try to open the file
Does this issue occur when all extensions are disabled?: Yes
| feature-request,editor-textbuffer | low | Minor |
309,038,603 | scrcpy | Using another android device as client | Thanks for this amazing project.
Is it possible to mirror one android screen to another android device using scrcpy-adb connect method? I found adb clients compiled for arm devices and also java implementation of adb client on github. What are your thoughts? | feature request,android client | high | Critical |
309,038,918 | rust | run-make/relocation-model fails on mips64{el}-unknown-linux-gnuabi64 | ```
error: make failed
status: exit code: 2
command: "make"
stdout:
------------------------------------------
LD_LIBRARY_PATH="/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/test/run-make/relocation-model.stage2-mips64el-unknown-linux-gnuabi64:/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage2/lib:/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage0-tools/mips64el-unknown-linux-gnuabi64/release/deps:/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage0-sysroot/lib/rustlib/mips64el-unknown-linux-gnuabi64/lib:" '/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage2/bin/rustc' --out-dir /home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/test/run-make/relocation-model.stage2-mips64el-unknown-linux-gnuabi64 -L /home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/test/run-make/relocation-model.stage2-mips64el-unknown-linux-gnuabi64 -C relocation-model=static foo.rs
Makefile:17: recipe for target 'others' failed
------------------------------------------
stderr:
------------------------------------------
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-L" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage2/lib/rustlib/mips64el-unknown-linux-gnuabi64/lib" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/test/run-make/relocation-model.stage2-mips64el-unknown-linux-gnuabi64/foo.foo0.rcgu.o" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/test/run-make/relocation-model.stage2-mips64el-unknown-linux-gnuabi64/foo.foo1.rcgu.o" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/test/run-make/relocation-model.stage2-mips64el-unknown-linux-gnuabi64/foo.foo2.rcgu.o" "-o" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/test/run-make/relocation-model.stage2-mips64el-unknown-linux-gnuabi64/foo" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/test/run-make/relocation-model.stage2-mips64el-unknown-linux-gnuabi64/foo.crate.allocator.rcgu.o" "-Wl,--gc-sections" "-no-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs" "-L" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/test/run-make/relocation-model.stage2-mips64el-unknown-linux-gnuabi64" "-L" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage2/lib/rustlib/mips64el-unknown-linux-gnuabi64/lib" "-Wl,-Bstatic" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage2/lib/rustlib/mips64el-unknown-linux-gnuabi64/lib/libstd-bf7adc3a3386a805.rlib" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage2/lib/rustlib/mips64el-unknown-linux-gnuabi64/lib/libpanic_unwind-d6c1d0be350f8447.rlib" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage2/lib/rustlib/mips64el-unknown-linux-gnuabi64/lib/libunwind-020f3ddad3c2aecc.rlib" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage2/lib/rustlib/mips64el-unknown-linux-gnuabi64/lib/liballoc_system-e7e2db07f1320e68.rlib" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage2/lib/rustlib/mips64el-unknown-linux-gnuabi64/lib/liblibc-ee093779b659c145.rlib" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage2/lib/rustlib/mips64el-unknown-linux-gnuabi64/lib/liballoc-9f2b8d7122a962b4.rlib" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage2/lib/rustlib/mips64el-unknown-linux-gnuabi64/lib/libstd_unicode-dbcf6d09120f0b05.rlib" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage2/lib/rustlib/mips64el-unknown-linux-gnuabi64/lib/libcore-a84829a54242b6cf.rlib" "/home/draganm/work/rust/build/mips64el-unknown-linux-gnuabi64/stage2/lib/rustlib/mips64el-unknown-linux-gnuabi64/lib/libcompiler_builtins-57fb30de8d4f53bc.rlib" "-Wl,-Bdynamic" "-l" "dl" "-l" "rt" "-l" "pthread" "-l" "gcc_s" "-l" "c" "-l" "m" "-l" "rt" "-l" "pthread" "-l" "util"
= note: /usr/bin/ld: BFD (GNU Binutils for Debian) 2.30 assertion fail ../../bfd/elfxx-mips.c:11237
collect2: error: ld returned 1 exit status
error: aborting due to previous error
make: *** [others] Error 101
```
After [D23652](https://reviews.llvm.org/D23652) (LLVM 5.0.0) mips64 backend respects relocation-model=static option. Unfortunately this does not work well with libc dynamic linking. The GNU LD allows creation of .plt stubs in this case only if whole application (more important .rel.plt section) lies in in lower 32-bits of address space. The default linker script for mips64 n64 abi puts __executable-start at 0x120000000 which results in a assert (see log above). Historically GCC would usually generate pic-like code for mips64 n64 even when static linking and fno-pic is involved except when "-msym32" (use 32-bit symbols) option is provided. That option seems primarily targeted for bare-metal targets and stock LD does not provide suitable linker script for it, as far I know. So static relocation model can only be used for full static linking w/o messing with linker script.
I'm not sure if relocation-model=static is used commonly on non musl targets. If so then on mips64 targets it probably should be silently ignored, at least on linux-gnu targets. | A-linkage,A-testsuite,O-MIPS,T-compiler,C-bug,A-run-make | low | Critical |
309,060,997 | youtube-dl | [BBC iPlayer] Unable to download XML | ### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2018.03.26.1*. If it's not, read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected.
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2018.03.26.1**
### Before submitting an *issue* make sure you have:
- [x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
- [x] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser
### What is the purpose of your *issue*?
- [x] Bug report (encountered problems with youtube-dl)
- [ ] Site support request (request for adding support for a new site)
- [ ] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other
---
### If the purpose of this *issue* is a *bug report*, *site support request* or you are not completely sure provide the full verbose output as follows:
Add the `-v` flag to **your command line** you run youtube-dl with (`youtube-dl -v <your command line>`), copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```):
```
./youtube-dl -v --print-traffic --cookies=new.cookies -F https://www.bbc.co.uk/iplayer/episode/b094f5h4
**stdout**
[bbc.co.uk] b094f5h4: Downloading video page
[bbc.co.uk] b094f5h4: Downloading playlist JSON
send: b'GET /iplayer/episode/b094f5h4 HTTP/1.1\r\nHost: www.bbc.co.uk\r\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0 (Chrome)\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 301 Moved Permanently\r\n'
header: request-id header: X-Cache-Action header: Vary header: X-Cache-Age header: Cache-Control header: Content-Type header: Date header: server-timing header: location header: x-xss-protection header: x-content-type-options header: x-response-time header: Connection header: x-frame-options header: Content-Length
send: b'GET /iplayer/episode/b094f5h4/oran-na-marasong-of-the-sea HTTP/1.1\r\nHost: www.bbc.co.uk\r\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0 (Chrome)\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: request-id header: X-Cache-Action header: Vary header: X-Cache-Age header: Cache-Control header: Content-Type header: content-encoding header: Date header: server-timing header: link header: x-xss-protection header: etag header: x-content-type-options header: x-response-time header: Connection header: Set-Cookie header: x-frame-options header: Content-Length
[bbc.co.uk] b094f5h4: Downloading legacy playlist XML
send: b'GET /programmes/b094f5h4/playlist.json HTTP/1.1\r\nHost: www.bbc.co.uk\r\nCookie: BBC-UID=955a0b6a577b3e3c9895b926b1ee8a1f75e69691a7b4c4061ab0774234b4e7a00Mozilla/5.0%20(X11%3b%20Linux%20x86_64%3b%20rv:59.0)%20Gecko/20100101%20Firefox/59.0%20(Chrome)\r\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0 (Chrome)\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Server header: X-Cache-Action header: Vary header: Cache-Control header: X-Cache-Age header: Content-Type header: Content-Encoding header: Date header: Content-Language header: Access-Control-Allow-Origin header: Etag header: Connection header: X-UA-Compatible header: Access-Control-Allow-Headers header: Content-Length
send: b'GET /iplayer/playlist/b094f5h4 HTTP/1.1\r\nHost: www.bbc.co.uk\r\nCookie: BBC-UID=955a0b6a577b3e3c9895b926b1ee8a1f75e69691a7b4c4061ab0774234b4e7a00Mozilla/5.0%20(X11%3b%20Linux%20x86_64%3b%20rv:59.0)%20Gecko/20100101%20Firefox/59.0%20(Chrome)\r\nUser-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0 (Chrome)\r\nAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\nAccept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\nAccept-Encoding: gzip, deflate\r\nAccept-Language: en-us,en;q=0.5\r\nConnection: close\r\n\r\n'
reply: 'HTTP/1.1 404 Not Found\r\n'
header: Content-Type header: Date header: Connection header: Content-Length
**stderr**
[debug] System config: []
[debug] User config: ['--cookies', '/home/userid/.youtube-dl.cookies']
[debug] Custom config: []
[debug] Command-line args: ['-v', '--print-traffic', '--cookies=new.cookies', '-F', 'https://www.bbc.co.uk/iplayer/episode/b094f5h4']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.03.26.1
[debug] Python version 3.6.4 (CPython) - Linux-4.15.12-x86_64-Intel-R-_Core-TM-_i5-4570T_CPU_@_2.90GHz-with-gentoo-2.4.1
[debug] exe versions: ffmpeg 3.4.2, ffprobe 3.4.2, rtmpdump 2.4
[debug] Proxy map: {}
ERROR: Unable to download XML: HTTP Error 404: Not Found (caused by <HTTPError 404: 'Not Found'>); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
File "./youtube-dl/youtube_dl/extractor/common.py", line 519, in _request_webpage
return self._downloader.urlopen(url_or_request)
File "./youtube-dl/youtube_dl/YoutubeDL.py", line 2199, in urlopen
return self._opener.open(req, timeout=self._socket_timeout)
File "/usr/lib64/python3.6/urllib/request.py", line 532, in open
response = meth(req, response)
File "/usr/lib64/python3.6/urllib/request.py", line 642, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib64/python3.6/urllib/request.py", line 570, in error
return self._call_chain(*args)
File "/usr/lib64/python3.6/urllib/request.py", line 504, in _call_chain
result = func(*args)
File "/usr/lib64/python3.6/urllib/request.py", line 650, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
...
<end of log>
```
---
### Description of your *issue*, suggested solution and other information
youtube-dl fails against https://www.bbc.co.uk/iplayer/episode/b094f5h4 with a 404 error from the "Downloading legacy playlist XML" stage. | geo-restricted | low | Critical |
309,067,181 | TypeScript | Organize Imports: Add option to change between relative and absolute paths | https://github.com/Microsoft/vscode/issues/46699
**Feature Request**
Add a configuration option that can force auto imports to be converted to relative or absolute paths. This option should be off by default (we leave the paths untouched) | Suggestion,Awaiting More Feedback,VS Code Tracked,Domain: Organize Imports | medium | Major |
309,076,382 | TypeScript | Organize imports should remove blank lines within imports | **TypeScript Version:** 2.9.0-dev.20190327
<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
**Search Terms:**
- Organize imports
**Code**
1. For the js:
```ts
import { x } from 'x';
import { y } from 'y';
console.log(x, y)
```
2. Run organize imports.
**Expected behavior:**
Blank lines within the import are removed
```js
import { x } from 'x';
import { y } from 'y';
console.log(x, y)
```
**Actual behavior:**
Blanklines preserved but shifted to end of imports:
```js
import { x } from 'x';
import { y } from 'y';
console.log(x, y)
```
| Suggestion,Awaiting More Feedback,Domain: Organize Imports | low | Major |
309,094,687 | flutter | Sharing constants between Flutter, Android, and iOS code | .. to reduce risks associated with duplication (values going out of sync).
Is there perhaps a solution for this already?
It would be especially useful when using platform channels, for the channel and argument names.
(-> sharing constants between Flutter, Android, iOS code)
But I assume it could be useful for any other configuration values as well that are used only in native code.
(-> sharing constants between Android, iOS code)
I guess a simple properties file at the project root could do, and generate the Dart, Java, Swift source file from it (a class having String constant fields), with a Gradle task.
(Android has something similar with BuildConfig file which has generated fields from gradle configuration.)
Example:
`project_config.properties` file at project root:
```properties
calendarSubscriptionChannel=calendarChannel
calendarUrl=calendarUrl
calendarTitle=calendarTitle
```
`project_config.dart` Dart file:
```dart
class ProjectConfig {
static const String calendarSubscriptionChannel = 'calendarChannel';
static const String calendarUrl = 'calendarUrl';
static const String calendarTitle = 'calendarTitle';
}
```
`ProjectConfig.java` Java file:
```java
class ProjectConfig {
public static final String calendarSubscriptionChannel = "calendarChannel";
public static final String calendarUrl = "calendarUrl";
public static final String calendarTitle = "calendarTitle";
}
```
Swift file:
```swift
// I don't know Swift.. :)
```
| c: new feature,tool,P2,team-tool,triaged-tool | low | Critical |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.