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
207,372,917
TypeScript
Access `global` as a type
Since https://github.com/Microsoft/TypeScript/wiki/What%27s-new-in-TypeScript#augmenting-globalmodule-scope-from-modules it's been possible to augment the `global` from a module. However, in TypeScript definitions (such as `dom.d.ts` or `node.d.ts`) we're left to create our own "globals". This results in two issue: 1. inconsistency with what is _actually_ the global namespace 2. requiring the declaration of global types multiple times in case it's used as a "real global" or from `window.` (browsers) or `global.` (node) Instead of this, it'd be really nice to access TypeScript's `global` as a type. For instance, in `dom.d.ts` we could do: ```ts declare var window: global ``` Or in `node.d.ts`: ```ts declare var global: global ``` I couldn't see any previous issues, but it's partially related to things like https://github.com/Microsoft/TypeScript/issues/12902 - the difference though is that those issues seems to be tracking adding variables to the TypeScript global scope whereas this would be using the global scope as a type to define these variables themselves.
Suggestion,Awaiting More Feedback
low
Major
207,380,334
go
x/mobile: X11 Key Events
Please answer these questions before submitting your issue. Thanks! ### What version of Go are you using (`go version`)? 1.7 (sorry i am using windows at the office, the issue occurs at home) ### What operating system and processor architecture are you using (`go env`)? ubuntu amd64 (sorry i am using windows at the office, the issue occurs at home) ### What did you do? run flappy gopher ### What did you expect to see? key events are triggered ### What did you see instead? no key events triggered, and close button not functional. key events are not yet implemented at - app/x11.go - app/x11.c but shiny have implemented this: https://godoc.org/golang.org/x/exp/shiny/driver/internal/x11key Should gomobile reuse shiny?
mobile
low
Minor
207,399,151
rust
Trait object coercion supercedes deref coercion
This seems like it should work: [Playground link](https://is.gd/Q8MWVS) ```rust use std::sync::Arc; trait Foo {} struct Bar; impl Foo for Bar {} fn takes_foo(foo: &Foo) {} fn main() { let foo: Arc<Foo> = Arc::new(Bar); takes_foo(&foo); } ``` However, it seems the compiler is attempting to coerce `&Arc<Foo>` to a trait object before attempting deref coercion, which gives this unintuitive error: ``` rustc 1.15.1 (021bd294c 2017-02-08) error[E0277]: the trait bound `std::sync::Arc<Foo>: Foo` is not satisfied --> <anon>:13:15 | 13 | takes_foo(&foo); | ^^^^ the trait `Foo` is not implemented for `std::sync::Arc<Foo>` | = note: required for the cast to the object type `Foo` ``` Adding a deref-reref seems to fix the issue, but it's definitely a papercut: ```rust takes_foo(&*foo); ```
I-needs-decision,T-lang,C-feature-request,A-coercions,T-types,A-trait-objects
low
Critical
207,436,887
neovim
:grep doesn't detect ENOSPC in /tmp
- `nvim --version`: 0.1.7-3 - Vim (version: ) behaves differently? no - Operating system/version: Debian amd64 - Terminal name/version: xterm/tmux - `$TERM`: screen ### Actual behaviour With a full `/tmp` the command `:grep ...` says `error 1`, doesn't show (partial) list of matches ### Expected behaviour User gets a notice like `$TMPDIR is full`. I guess that the external `tee` command would have to be implemented within `nvim` to see the `ENOSPC` error code, without having to second-guess another program's return code.
enhancement,ux
low
Critical
207,603,707
go
x/text/collate: collation does not work for Korean
### What version of Go are you using (`go version`)? go1.8beta2 linux/amd64 ### What operating system and processor architecture are you using (`go env`)? GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/anx/go" GORACE="" GOROOT="/usr/local/go" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build492080285=/tmp/go-build -gno-record-gcc-switches" CXX="g++" CGO_ENABLED="1" PKG_CONFIG="pkg-config" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" ### What did you do? I attempted to sort some strings according to Korean rules. These rules say that Korean characters should be sorted *before* Latin characters. ``` import ( "fmt" "golang.org/x/text/collate" "golang.org/x/text/language" ) func main() { strs := []string{"abc", "λ‚˜λŠ”"} cl := collate.New(language.Korean) //Korean collator cl.SortStrings(strs) fmt.Println(strs) } ``` ### What did you expect to see? Expected output: [λ‚˜λŠ” abc] - Korean sorted before Latin - ICU gives this correct behavior ### What did you see instead? Actual output: [abc λ‚˜λŠ”] - Latin sorted before Korean This issue was discussed in #12750, at which point @mpvl noted that: > ...the implementation is based on the CLDR UCA tables. If I look at the collation elements of both the DUCET (Unicode's tables) and CLDR (the tailorings) they both show Hangul to have a higher primary collation value then Latin. So that explains why Korean is sorted later. > What is probably happening in ICU is that the the script for the selected language is sorted before other scripts. The Go implementation currently does not support script reordering, though. This is an TODO, but depends on changing the implementation to using fractional weights...
NeedsFix
low
Critical
207,607,505
rust
Warn about `$x:expr` in `macro_rules` expansion
Maybe I'm the only one, but a stupid mistake I've made several times, when writing macros, is to accidentally include `$x:expr` in the output of a macro, when of course I should just write `$x`. The result of this mistake is a working macro that includes the tokens `:expr` in its output. (!) The error messages when I do this are correct... but there's so much going on that I *still* typically don't understand until I've spent a few minutes enabling `trace_macros!` and poring over the output. It should be possible to warn about this when the macro is defined. I think it's always a mistake.
A-lints,T-lang,C-feature-request
low
Critical
207,625,911
TypeScript
VSCode compatibility: Find-all-references not working for special reference kinds
**TypeScript Version:** nightly (2.2.0-dev.20170214) **Code** ```ts label: while (true) { break label; } function f(x: "abc") {} f("abc"); const x: number; const y: number; ``` In VSCode, find-all-references does not work for `label`, `"abc"`, or `number`. But document highlights does work for `label` and `number`. Similar to #13846, but that issue is for Visual Studio.
Bug
low
Minor
207,655,251
go
runtime: do map growth work on reads
CLs [37011](https://golang.org/cl/37011) and [37012](https://golang.org/cl/37012) suggest that finishing map growth can be important. If an author knows that a particular map is done growing and will henceforth be read-only, and they can spend some cycles optimizing it, it would be useful for them to be able to ask the runtime to finish any ongoing map growth. This is kinda sort possible now: ```go for k, v := range m { m[k] = v } ``` However, this is really slow, particularly for a large map. It does way more work than is necessary, and it does it very inefficiently. The compiler could recognize this idiom and convert it into a runtime call. Another option is to add API surface: `runtime.OptimizeMap(m interface{})` or some such, which would be documented to be a slow, expensive, blocking call that makes subsequent reads more efficient. Another idiomatic option, if `copy` worked on maps :) would be `copy(m, m)`. Other suggestions welcomed. I don't particularly like any of these, but it'd be nice to find something.
Performance,compiler/runtime
low
Major
207,689,394
go
os: support runtime poller with os.File on Windows
In order to use the runtime poller with `os.File` on Windows, the file or pipe will have to be opened with `FILE_FLAG_OVERLAPPED`. We shouldn't do that unconditionally unless we can remove it if the program calls the `Fd` method. Programs currently expect the `Fd` method to return a handle that uses ordinary synchronous I/O.
ExpertNeeded,Thinking,OS-Windows
low
Major
207,729,562
go
x/arch/arm/armasm: second source register is calculated incorrectly
Please answer these questions before submitting your issue. Thanks! ### What version of Go are you using (`go version`)? golang.org/x/arch/arm ### What operating system and processor architecture are you using (`go env`)? Ubuntu 16.04.1 LTS and ARM64 ### What did you do? Disassemble following two instructions 937facb1 d6530d61 ### What did you expect to see? STREXD.LT [R12], R4, R3, R7 LDRD.VS [SP, -R6], R6, R5 ### What did you see instead? STREXD.LT [R12], R3, R3, R7 LDRD.VS [SP, -R6], R5, R5
NeedsFix
low
Major
207,746,051
TypeScript
Can not declaration merging for default exported class
<!-- BUGS: Please use this template. --> <!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript --> <!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md --> **TypeScript Version:** 2.1.5 **Code** ```ts // A *self-contained* demonstration of the problem follows... // ===== file Foo.ts ===== export default class Foo { hello() { console.log('Foo'); } } // ===== file Bar.ts ===== import Foo from './Foo'; declare module './Foo' { interface Foo { add(x, y); } } // ERROR: 'add' does not exist in type Foo. Foo.prototype.add = function (x, y) { return x + y; }; let f = new Foo(); f.hello(); f.add(3, 4); // ERROR: 'add' does not exist in type Foo. ``` **Expected behavior:** If the class Foo is exported without default in file Foo.ts, and then import {Foo} from './Foo', it works correctly as example in doc http://www.typescriptlang.org/docs/handbook/declaration-merging.html Hope import Foo same as import {Foo} behaviors. **Actual behavior:** ERROR message showed.
Bug
medium
Critical
207,804,341
vscode
[themes] different themes for different filetypes
Is it possible to have different themes for different filetypes?
feature-request,themes
high
Critical
207,873,579
youtube-dl
Introduce playlist level thumbnail and write it with --write-thumbnail
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.02.16** - [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [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] Feature request (request for a new functionality) --- ### Description of your *issue*, suggested solution and other information I'd like to request a feature please, the feature is --write-artwork for crunchyroll, for example if you type youtube-dl.exe --write-artwork http://www.crunchyroll.com/naruto-shippuden it will also download the artwork from the right hand side http://img1.ak.crunchyroll.com/i/spire1/958243dc68ae929a6b9cb834165112471456969325_full.jpg thank you
request
low
Critical
207,920,294
go
os: support runtime poller with os.File on Solaris
The os test `TestPipeThreads` is failing on the Solaris builder, suggesting that for some reason `os.File` values are not working with the runtime poller. The code looks OK to me. I don't know why it is not working. Filing this issue to record the problem.
OS-Solaris
low
Minor
207,987,040
TypeScript
Implement missing members sometimes writes out inaccessible types
```ts function foo() { abstract class C { abstract myMethod(): C; } return C; } class D extends foo() { } ``` Right now, we enable a codefix for implementing missing members of the class `C`. However, `C` is inaccessible, and the generated code will be something like the following ```ts function foo() { abstract class C { abstract myMethod(): C; } return C; } class D extends foo() { myMethod(): C { throw new Error('Method not implemented.'); } } ``` which is invalid. I'd argue that the code fix shouldn't be made available.
Bug,Domain: Quick Fixes
low
Critical
208,009,500
TypeScript
Support overload resolution with type union arguments
**TypeScript Version:** 2.1.6 **Code** ```ts interface Foo { bar(s: string): void; bar(n: number): number; bar(b: boolean): boolean; } type SN = string | number; var sn1: string | number; var sn2: SN; var foo: Foo; var x1 = foo.bar(sn1); // error var x2 = foo.bar(sn2); // error ``` **Expected behavior:** This should be allowed. The type of `x1` and `x2` should be `void | number`, the union of the matching overload return types. All 3 overloads can be seen as a single overload with a union type. It should try to fallback to a union when it can't match one of the originally defined overloads. **Actual behavior:** error TS2345: Argument of type 'string | number' is not assignable to parameter of type 'boolean'. Type 'string' is not assignable to type 'boolean'.
Suggestion,Needs Proposal
high
Critical
208,078,712
youtube-dl
support for 9news
I want to download video from 9news link "http://www.9news.com/news/local/father-worries-about-immigration-status/408808900" i tried youtube-dl. ``` % youtube-dl -v -F "http://www.9news.com/news/local/father-worries-about-immigration-status/408808900" :( [debug] System config: [] [debug] User config: [] [debug] Command-line args: ['-v', '-F', 'http://www.9news.com/news/local/father-worries-about-immigration-status/408808900'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2016.12.22 [debug] Python version 3.5.1 - Linux-4.6.2-1-ARCH-x86_64-with-arch [debug] exe versions: ffmpeg 3.0.2, ffprobe 3.0.2, rtmpdump 2.4 [debug] Proxy map: {} [generic] 408808900: Requesting header WARNING: Falling back on generic information extractor. [generic] 408808900: Downloading webpage [generic] 408808900: Extracting information ERROR: Unsupported URL: http://www.9news.com/news/local/father-worries-about-immigration-status/408808900 Traceback (most recent call last): File "/usr/lib/python3.5/site-packages/youtube_dl/YoutubeDL.py", line 694, in extract_info ie_result = ie.extract(url) File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/common.py", line 358, in extract return self._real_extract(url) File "/usr/lib/python3.5/site-packages/youtube_dl/extractor/generic.py", line 2453, in _real_extract raise UnsupportedError(url) youtube_dl.utils.UnsupportedError: Unsupported URL: http://www.9news.com/news/local/father-worries-about-immigration-status/408808900 ```
site-support-request
low
Critical
208,132,182
rust
Provide an easy way to use LLVM's Polly
[To use polly with clang](http://polly.llvm.org/example_load_Polly_into_clang.html) I just need to compile polly together with llvm and clang (just check it out and put it in the correct directory before compiling), load it as a clang plugin, and then enable `-mllvm polly`. It would be nice if: - [ ] rustc always came with an LLVM compiled with polly - [ ] it had an easy option to enable it from rustc that: - [ ] loads polly's `/lib/LLVMPolly.so` as a plugin - [ ] enables it in llvm's opt: `-mllvm polly`. - [ ] had an easy way to pass polly options without having to do the `-mllvm -polly-option_name=value` dance over and over again. This would allow to start experimenting with polly, to e.g. make sure that it gets proper aliasing information for Rust.
A-LLVM,T-compiler,C-feature-request
low
Major
208,193,512
vscode
Allow to create multi-cursor with keyboard
<!-- Do you have a question? Please ask it on http://stackoverflow.com/questions/tagged/vscode --> - VSCode Version: 1.10.0 - insider - OS Version: Windows -- Sorry for the English, I used Google Translator -- Allow me to place multiple cursors by navigating with the arrow keys. Like this extension [multi-cursor-plus](https://atom.io/packages/multi-cursor-plus) of Atom. Press `alt + x` to highlight a cursor, use the arrow keys to scroll to the next location you want (by pressing the `alt `key), and press again. If I wanted to take some specific cursor, I'll enter the arrows to the location and press `alt + x` again. ![68747470733a2f2f7261772e67697468756275736572636f6e74656e742e636f6d2f6b616e6b61726973746f2f61746f6d2d6d756c74692d637572736f722d706c75732f6769662f73686f77636173652e676966](https://cloud.githubusercontent.com/assets/19866231/23032826/ff22e12c-f45c-11e6-8b41-0263fd185dbb.gif)
feature-request,editor-multicursor
medium
Critical
208,226,697
TypeScript
Class mixins shouldn't require a specific signature of constructors
<!-- BUGS: Please use this template. --> <!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript --> <!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md --> **TypeScript Version:** 2.2.0-dev.20170209 **Code** Requiring mixins to have a constructor signature of `constructor(...args: any[])` causes a few problems: 1. Node v4, which is an active LTS, doesn't support rest and spread syntax. We avoid it and can run our output on Node v4 even when targeting ES6. The mixin constructor requirements prevent this. 2. It's common to have mixins that want to provide a specific constructor. These will usually be applied last to create a concrete class. This is impossible now, so you have to create a new concrete class with only a constructor to give it the correct signature. 3. For a mixin that does have constructor argument requirements, it's very cumbersome to extract arguments out of `...args`. Here's an approximation of a case I hit. I have two classes that that share a base class: ```ts class Base { foo: string[]; } class A extends Base {} class B extends Base {} ``` Later, I want to add some functionality to via mixins to create two new classes: ```ts type Constructor<T extends object> = new (...args: any[]) => T; interface Magic {} const Magic = <T extends Constructor<Base>>(superclass: T): Constructor<Magic>& T => class extends superclass implements Magic { constructor(foo: string[]) { super(); this.foo = foo; } }; const MagicA = Magic(A); const MagicB = Magic(A); ``` And I want MagicA and MagicA to have a constructor that takes a single argument. I know the code will work because I know the constructors of A and B, but the type checker is unhappy. First, the `Constructor` type is wrong in this case because I know the signature I want. I'd actually like to write: ```ts type BaseConstructor = new() => Base; type MagicConstructor = new(foo: string[]) => Magic; interface Magic {} const Magic = <T extends BaseConstructor>(superclass: T): MagicConstructor & T => class extends superclass implements Magic { constructor(foo: string[]) { super(); this.foo = foo; } }; const MagicA = Magic(A); const MagicB = Magic(A); ``` **Expected behavior:** This works **Actual behavior:** Error: "Type 'T' is not a constructor function type." on the extends clause.
Suggestion,Awaiting More Feedback
low
Critical
208,245,686
go
testing: add -benchsplit to get more data points
For #18177, we need to make tradeoffs between worst-case latency and average throughput for the functions in question. It's relatively easy to measure the average throughput today using benchmarks with the `testing` package. It would be nice if I could use those same benchmarks to measure the distribution of timings across iterations. That isn't really feasible using `(*B).N` with caller-side iteration, but it might at least be possible to tap into `(*PB).Next` to get some idea of the latency between calls for parallel benchmarks.
help wanted,Proposal,Proposal-Accepted,NeedsFix,FeatureRequest
medium
Major
208,254,868
angular
Support Input/Output spread
<!-- IF YOU DON'T FILL OUT THE FOLLOWING INFORMATION WE MIGHT CLOSE YOUR ISSUE WITHOUT INVESTIGATING --> **I'm submitting a ...** (check one with "x") ``` [ ] bug report => search github for a similar issue or PR before submitting [x] feature request [ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question ``` **Current behavior** <!-- Describe how the bug manifests. --> Currently each Input or Output must be explicitly declared in the component to allow its usage. **Expected behavior** <!-- Describe what the behavior would be without the bug. --> I'd like to have any way to pass Inputs/Outputs to a component in the template without declaring them first. This is allowed in React with [props spread](https://facebook.github.io/react/docs/jsx-in-depth.html#spread-attributes) and allows techniques like [Higher Order Components](https://facebook.github.io/react/docs/higher-order-components.html). ```jsx <my-component [prop1]="prop1" {...otherInputs} ></my-component> ``` **What is the motivation / use case for changing the behavior?** <!-- Describe the motivation or the concrete use case --> Declaring each Input/Output is a problem when wrapping some component to extend its behaviour or to hide the component when dealing with an external library. It requires mapping each of the wrapped component Inputs/Outputs and it's very tedious and error prone. Besides any change in the wrapped component API would require touching the wrapper component.
feature,area: core,core: inputs / outputs,feature: under consideration
high
Critical
208,293,598
rust
Macros not included in back-traces when used in a crate
When a macro causes a panic (directly or indirectly) between crates, the line of code from which the macro is used isn't included in the back-trace. This makes it impossible to know which use of the macro caused the panic. I ran into this problem because my tests are in a separate directory, and use the code they tests as a crate. Possibly this is just unsupported feature / known limit in macro system, reporting because I wasn't sure. [Git repository][1] for the example below. `tests/tests.rs` extern crate test_macro; #[test] fn main() { let file: Vec<u8> = Vec::new(); test_macro::decode_main(&*file).unwrap(); } `src/lib.rs` use ::std::io; macro_rules! read_exact { ($f:expr, $r:expr) => { io::Read::read_exact($f, $r).unwrap() } } fn decode_blocks<R: io::Read>(mut file: R) -> Result<(), io::Error> { let mut bhead: [u8; 320] = [0; 320]; read_exact!(&mut file, &mut bhead); // <-- this line isn't in the backtrace Ok(()) } pub fn decode_main<R: io::Read>(mut file: R) -> Result<(), io::Error> { decode_blocks(file)?; Ok(()) } Calling: RUST_BACKTRACE=1 cargo test Gives the backtrace: at /buildslave/rust-buildbot/slave/stable-dist-rustc-linux/build/src/libcore/result.rs:737 11: 0x562061ffd7da - test_macro::decode_blocks::h391253710f990761 at /src/test_macro/src/lib.rs:5 12: 0x562061ffd5ca - test_macro::decode_main::h43b3b33b47640ea4 at /src/test_macro/src/lib.rs:16 13: 0x562061fff1ad - tests::main::hc17f25ef21544d0b at /src/test_macro/tests/tests.rs:5 14: 0x56206200d54e - <F as test::FnBox<T>>::call_box::h04563d623b7ebdf9 Notice line 11 isn't included. ---- Using Rust stable 1.15. [1]: https://gitlab.com/ideasman42/test_42277783_report/tree/master
A-debuginfo,E-needs-test,A-macros,T-compiler,C-feature-request
low
Critical
208,299,323
flutter
Platform specific assets
It would be great if you could use a platform (android/iOS) as a variant (automatically) with regards to Assets. A good example is for icons representing actions like sharing. They have platform specific conventions and it would be great if you could just do `"assets/icons/share"` and have the one that is relevant to the current platform.
c: new feature,tool,customer: posse (eap),a: assets,P3,team-tool,triaged-tool
medium
Critical
208,332,413
TypeScript
strictNullChecks false-positive when returning or breaking from within loop
Compile the following with `--strictNullChecks` ```ts function findScrollTarget(event: MouseEvent): { element: Element } | null { let x = event.clientX; let y = event.clientY; let element: Element | null = document.elementFromPoint(x, y); for (; element; element = element.parentElement) { return { element }; } return null; } ``` **Expected behavior:** This should compile, but doesn't with the following error: `src/index.ts(796,31): error TS2531: Object is possibly 'null'.` That line number and position corresponds to to the `element.parentElement` expression in the third clause of the for-loop in my example. This example also fails with the same error: ```ts function findScrollTarget(event: MouseEvent): { element: Element } | null { let x = event.clientX; let y = event.clientY; let result: { element: Element } | null = null; let element: Element | null = document.elementFromPoint(x, y); for (; element; element = element.parentElement) { result = { element }; break; } return result; } ``` However, this example compiles fine, which doesn't escape early from the loop. ```ts function findScrollTarget(event: MouseEvent): { element: Element } | null { let x = event.clientX; let y = event.clientY; let result: { element: Element } | null = null; let element: Element | null = document.elementFromPoint(x, y); for (; element; element = element.parentElement) { result = { element }; } return result; } ```
Bug
low
Critical
208,335,929
rust
bootstrap overrides -O in CFLAGS for LLVM
At OpenBSD, for building lang/rust package, we switched from using standard LLVM version (3.9.1) to embedded LLVM version, in order to be able to update LLVM at 4.0.0. The switch has a big performance impact: the build of rust passed from approx 2h (build with linking to external LLVM) to 12h (with 2h for building LLVM itself). And every program built with rustc had a similar performance impact (build time for cargo raise by a factor of 8). I passed lot of time to found the issue (comparing source tree between stock LLVM-3.9.1 and `src/llvm`, reviewing cmake options and finally comparing compiler command-line). It appeared that LLVM embedded version is build without optimization (no `-O2` in `CFLAGS`). As workaround, I removed the filter out of `-O` options from [bootstrap code](https://github.com/rust-lang/rust/blob/master/src/bootstrap/lib.rs#L821), and the build time come back to something more coherent: only 4h (with 2h for LLVM itself - so it is similar to what we had before). In order to check the LLVM comand-line at compilation, I also added `cfg.define("CMAKE_VERBOSE_MAKEFILE", "ON");` to `src/bootstrap/native.rs`. I dunno if the issue is only on OpenBSD or could be found on other platform. Maybe Linux adds some optimization by default on the compiler ? or it is LLVM that doesn't enable same optimizations set depending the platform ?
A-LLVM,T-bootstrap,C-bug,requires-custom-config
low
Major
208,504,263
youtube-dl
[MDR] Support playlists
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.02.17** - [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [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] Bug report (encountered problems with youtube-dl) - Single audio: http://www.mdr.de/kultur/videos-und-audios/audio-radio/operation-mindfuck-robert-wilson100.html - Playlist: http://www.mdr.de/kultur/videos-und-audios/index.html **description** After recent changes on their site the download from MDR Radio is no longer working. **log** ``` youtube-dl.exe -v http://www.mdr.de/kultur/videos-und-audios/audio-radio/operation-mindfuck-robert-wilson100.html [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['-v', 'http://www.mdr.de/kultur/videos-und-audios/audio-radio/operation-mindfuck-robert-wilson100.html'] [debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252 [debug] youtube-dl version 2017.02.17 [debug] Python version 3.4.4 - Windows-XP-5.1.2600-SP3 [debug] exe versions: ffmpeg N-67100-g6dc99fd, ffprobe N-67100-g6dc99fd, rtmpdump 2.4 [debug] Proxy map: {} [generic] operation-mindfuck-robert-wilson100: Requesting header WARNING: Falling back on generic information extractor. [generic] operation-mindfuck-robert-wilson100: Downloading webpage [generic] operation-mindfuck-robert-wilson100: Extracting information ERROR: Unsupported URL: http://www.mdr.de/kultur/videos-und-audios/audio-radio/operation-mindfuck-robert-wilson100.html Traceback (most recent call last): File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpqajgst4a\build\youtube_dl\YoutubeDL.py", line 696, in extract_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpqajgst4a\build\youtube_dl\extractor\common.py", line 369, in extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpqajgst4a\build\youtube_dl\extractor\generic.py", line 2579, in _real_extractyoutube_dl.utils.UnsupportedError: Unsupported URL: http://www.mdr.de/kultur/videos-und-audios/audio-radio/operation-mindfuck-robert-wilson100.html <end of log> ```
request
low
Critical
208,520,567
react
event.preventDefault in click handler does not prevent onChange from being called
**Do you want to request a *feature* or report a *bug*?** Bug! **What is the current behavior?** When rendering an `input` element of type `checkbox` with an `onClick` and `onChange` handler, `onChange` is still called even though `event.preventDefault()` is called in the `onClick` handler. **If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/reactjs/69z2wepo/).** http://jsfiddle.net/rf3w7apc/ **What is the expected behavior?** Calling `event.preventDefault` in the `onClick` handler should prevent the default action from occurring (or undo its effect), which is to update the value of the `input` element. This should stop any `change` event listener from being invoked. See https://jsfiddle.net/L1eskzsq/ for expected behavior **Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** Tested using a build from master, macOS 10.12.2, verified in: * Chrome 56.0.2924.87 (64-bit) * Firefox 51.0.1 (64-bit) Safari 10.0.2 calls the `change` event listener in both cases.
Type: Bug,Component: DOM
low
Critical
208,530,134
go
cmd/objdump: implement all disassemblers
Teach objdump how to disassemble all the supported architectures. Tracking bug for all the architectures involved. We're currently missing 4. s390x: #15255 mips: #19158 mips64: #19156 ~~arm64: #19157~~
NeedsFix,compiler/runtime
low
Critical
208,538,484
rust
Linking with LLD
LLVM 4.0 is shipping with LLD enabled, though AFAIK it is not yet production-ready on all platforms. I believe we've got an LLVM upgrade planned soon to resolve AVR/emscripten problems anyway, so now's the time to start determining what we might need to do to support it, how it impacts compiler performance/binary size/runtime performance compared to our usual linkers, and what platforms on which we might want to enable it by default. **Current status (2020-04-24) summarized at https://github.com/rust-lang/rust/issues/39915#issuecomment-618726211** Possible problems: * LLD has internal parallelism, and is not documented to have jobserver support, which can lead to poor contention resolution in practice
A-linkage,I-compiletime,T-compiler,C-feature-request
high
Major
208,547,320
TypeScript
Unsafe type-incompatible assignments should not be allowed
**TypeScript Version:** 2.1.6 **Code** ```ts interface StringOnly { val: string; } interface StringOrNull { val: string | null; } const obj: StringOnly = { val: "str" }; // should not be allowed const nullable: StringOrNull = obj; nullable.val = null; // obj is now in a bad state ``` **Expected behavior:** The sample should not compile, as it's not safe. Type casts/assertions should be required to override type incompatibility errors here. (Or, of course, cloning the object itself `const nullable: StringOrNull = { ...str };`). For comparison, Flow does _not_ allow the sample code. **Actual behavior:** The sample compiles and further accesses of `str.val` will likely result in exceptions. **EDIT**: Removed all references to `readonly`, as discussion of that modifier is overshadowing the issue.
Suggestion,Awaiting More Feedback
medium
Critical
208,565,789
go
cmd/compile: rewrite interface args by actual type args in functions called only with a single set of argument types
Sometimes programs use only a single set of interface implementations for every function call accepting interface args. In this case the compiler may safely rewrite such functions, so they'll accept actual type args instead of interface args. This brings the following benefits: - removal of interface conversion overhead; - removal of interface method call overhead; - reducing memory allocations, since escape analysis may leave variables on stack that is passed to interface functions; - inlining short interface method calls and further optimizations based on the inlining. The idea may be extended further. For instance, the compiler may generate specialized functions for each unique set of arg types passed to interface args (aka `"generic" functions` :)) . But naive implementation may lead to uncontrolled code bloat and performance degradation, so it must be carefully designed beforehand. One possible idea - specializing the function only if the following conditions are met: - all the interface methods for the arg implementation may be inlined (i.e. may lead to performance optimizations); - the function body is short (i.e. reducing generated code bloat). This could inline and optimize `sort.Interface` implementations inside `sort.Sort` calls.
Performance,compiler/runtime
low
Major
208,573,875
flutter
Restarting ballistics misses a frame
framework,a: fidelity,f: scrolling,a: quality,P2,team-framework,triaged-framework
low
Minor
208,598,422
kubernetes
Need pattern for updating controllers that works with extensions (TPR/Aggregated)
Users may also write their own controllers as extensions -- Aggregated API Servers (AASes) or Third Party Resources (TPRs). Controllers (core or extensions) may contain pod templates. Those podTemplates need to be updateable, and that should cause a rollout of the new desired state. We already support rollouts for deployments by creating a new replicaSet each time we see an update to the controller. There is [a proposal for how to do this for daemon sets](https://github.com/kubernetes/community/pull/366). That may eventually use stand-alone pod templates (`/api/v1/podtemplates`). As noted on that proposal by @janetkuo, the proposed pattern cannot be used by extensions. This issue summarizes some problems with extensions that want to have podTemplates. - **Some Extensions cannot use `observedGeneration`** - `templateGeneration` is a field that updates every time the `.spec.podTemplate` of the controller is updated. It happens in the API server. - AAS can support the `observedGeneration`. - TPR-based controller can not. - **Extensions cannot use hashes to compare embedded and standalone pod templates** - Deployment computes a `pod-template-hash`. One issue is that you can GET an object once before a master upgrade, and then GET it after, and it will be different, even though the object was not updated by the user. This is because new defaulted fields can be added by the new version of the API server code. - If an AAS object includes a podTemplate in its controller Spec, then presumably it will have defaulting too. But that will be vendored from Kubernetes, and so the version of the defaulting in the AAS may be different from the version in the Primary API Server. - TPRs cannot have defaulting. So they cannot compare their hashes (which are stable) with podTemplate hashes, which are not. - **Extensions cannot use deep equality to compare embedded and standalone pod templates** - Same reasons as above. This makes it hard to build controllers that are extensions and have updating and pod templates. Some things that would solve that problem: 1. If we never used embedded pod templates and just used standalone podTemplates. So, you have to create at least two objects to make a controller. But this works poorly with declarative config (apply). 2. If we never apply defaulting or conversion to embedded pod templates. Let that happen at pod creation time. I like this. It puts TPR and AAS and core controllers on the same footing. 3. If we figured out a way to generalize the `observedGeneration` pattern to work with TPRs. I like 2 but it looks like the most work. @thockin pointed out that recent changes to defaulting make it difficult to make defaulting not happen in embedded pod templates.
area/extensibility,sig/apps,lifecycle/frozen
low
Major
208,660,045
rust
`#[deprecated]` does nothing if placed on an impl item.
Given the following two crates: ```rust #![crate_name = "foo"] pub struct Foo; pub struct Bar; pub trait IntoBar { fn into_bar(self) -> Bar; } #[deprecated(note = "Just pass `Bar` instead")] impl IntoBar for Foo { fn into_bar(self) -> Bar { Bar } } ``` ```rust extern crate foo; use foo::*; fn main() { let _ = Foo.into_bar(); } ``` I would expect the second crate to see a deprecation warning on the use of `Foo.into_bar()`. Instead, both crates compile successfully with no errors. I think that allowing deprecations on impls is a useful option to provide to authors (one that I was looking to do, and found this while seeing if it would work). However, if we do not wish to provide that ability to library authors, placing the `#[deprecated]` attribute on an impl should result in a compiler error.
A-lints,A-trait-system,T-compiler,C-bug,T-types,L-deprecated
medium
Critical
208,663,704
go
x/build: auto-detect flakes
Request from @danp: When the build system is idle, run builds of tip branches periodically (every 5 min?) to see if builds alternate between "ok" and "failed" state. Maybe auto-file flake bugs if test failures aren't consistent.
Builders,FeatureRequest
low
Critical
208,663,728
go
x/build/cmd/coordinator: write proper scheduler
Currently if there are N builds waiting on a buildlet type (due to lack of machines or quota), the current implementation is a bunch of goroutines fighting over a mutex. It's random who wins and gets the buildlet. We should have them register interest and when a buildlet becomes available, pick the highest priority one. Example priorities in order: * trybot run with a +2 already * trybot run * normal run of a build at tip of a release branch * normal run of a build at tip of master branch * normal run of a build at tip of dev branch * normal run of a build not at tip * idle flake detection (#19177) etc. /cc @danp @kevinburke
Builders,NeedsInvestigation
medium
Major
208,684,748
rust
Enum associated functions can name-clash with variants, but cannot be called.
### Description It's currently possible to name a function associated to an enum identically to the name of one of its variants. This function cannot be called (see below), but rather than warning at the point that the function is defined, the compiler only emits an error upon trying to call said function (and in some cases - see the 'Alternate Reproduction' - it doesn't even do that). https://is.gd/EZQ9mL ```rust #[derive(Debug)] enum X { a } impl X { fn a() -> X { X::a } } fn main() { println!("{:?}", X::a()) } ``` yields: ```rust rustc 1.15.1 (021bd294c 2017-02-08) error: `X::a` is being called, but it is not a function --> <anon>:13:22 | 13 | println!("{:?}", X::a()) | ^^^^^^ | = help: did you mean to write `X::a`? note: defined here --> <anon>:3:5 | 3 | a | ^ error: aborting due to previous error ``` ### Expected behaviour: Emit an error at the point (`fn a() -> X`) that the function is defined. ### Alternate reproduction Even more confusing is the code: https://is.gd/S15gOw ```rust #[derive(Debug)] enum X { a(), b, } impl X { fn a() -> X { X::b } } fn main() { println!("{:?}", X::a()) } ``` This compiles and runs. Any guesses whether the variant or the function wins? :smile:
A-lints,T-compiler,C-bug
low
Critical
208,685,704
rust
rustc --test should not check linking when using --emit=metadata or -Z no-trans
Suppose I have a library configured with `panic = "abort"`: ``` $ cargo init --lib foo $ cd foo $ nano Cargo.toml $ more Cargo.toml [package] name = "foo" version = "0.1.0" authors = ["Wilfred Hughes <[email protected]>"] [dependencies] [profile.dev] panic = "abort" ``` I'm unable to build with with `--test`: ``` $ cargo rustc -- --test Compiling foo v0.1.0 (file:///home/wilfred/tmp/foo) error: the linked panic runtime `panic_unwind` is not compiled with this crate's panic strategy `abort` error: aborting due to previous error error: Could not compile `foo`. To learn more, run the command again with --verbose. ``` As discussed in https://github.com/rust-lang/cargo/issues/3166#issuecomment-252120541 this is because the test harness needs unwinding on panic. However, I get the same error with `-Z no-trans`: ``` $ cargo rustc -- -Z no-trans --test Compiling foo v0.1.0 (file:///home/wilfred/tmp/foo) error: the linked panic runtime `panic_unwind` is not compiled with this crate's panic strategy `abort` error: aborting due to previous error error: Could not compile `foo`. To learn more, run the command again with --verbose. ``` This causes problems in editor integration like https://github.com/flycheck/flycheck-rust/issues/47 . We want to pass `--test` as otherwise we don't get syntax checking on test files. However, we get the above error for projects with abort-on-panic. Could we teach `--test` to ignore the runtime when we pass `-Z no-trans`?
C-feature-request,A-libtest
low
Critical
208,717,980
rust
error[E0275]: overflow evaluating the requirement `_: std::marker::Sized`
Reduced test case: ```rust #![recursion_limit = "5"] fn main() {} trait Serialize {} struct Ser<'a, T: 'a>(&'a T); impl<'a, T> Ser<'a, T> where Ser<'a, T>: Serialize { pub fn new(value: &'a T) -> Self { Ser(value) } } impl<'a, T> Serialize for Ser<'a, Option<T>> where Ser<'a, T>: Serialize {} fn serialize<'a, T>(value: &'a T) where Ser<'a, T>: Serialize { Ser::new(value); } ``` Output in rustc 1.17.0-nightly (536a900c4 2017-02-17): ```rust error[E0275]: overflow evaluating the requirement `_: std::marker::Sized` --> a.rs:20:5 | 20 | Ser::new(value); | ^^^^^^^^ | = note: consider adding a `#![recursion_limit="10"]` attribute to your crate = note: required because of the requirements on the impl of `Serialize` for `Ser<'_, std::option::Option<_>>` = note: required because of the requirements on the impl of `Serialize` for `Ser<'_, std::option::Option<std::option::Option<_>>>` = note: required because of the requirements on the impl of `Serialize` for `Ser<'_, std::option::Option<std::option::Option<std::option::Option<_>>>>` = note: required because of the requirements on the impl of `Serialize` for `Ser<'_, std::option::Option<std::option::Option<std::option::Option<std::option::Option<_>>>>>` = note: required because of the requirements on the impl of `Serialize` for `Ser<std::option::Option<std::option::Option<std::option::Option<std::option::Option<std::option::Option<_>>>>>>` error: aborting due to previous error ``` Without `#![recursion_limit = "5"]`, the error message is similar but much larger. If this isn’t a bug, at least the diagnostic should be improved.
A-diagnostics,T-compiler,C-bug
medium
Critical
208,718,621
opencv
findCirclesGrid does not check circularity to detect blob
##### System information (version) - OpenCV => 3.2(master) - Operating System / Platform => Windows 10 Pro 64bit - Compiler => Visual Studio 2015 ##### Detailed description * findCirclesGrid [uses SimpleBlobDetector](https://github.com/opencv/opencv/blob/3.2.0/modules/calib3d/include/opencv2/calib3d.hpp#L750) by default. * filterByCircularity of SimpleBlobDetector::Params is 'false' by default. * As a result, findCirclesGrid does not check circularity to detect blob by default. I think that this is a issue of findCirclesGrid. Could you please give me your comment? ##### Steps to reproduce ```cpp #include <opencv2/core.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/calib3d.hpp> #include <opencv2/imgcodecs.hpp> #include <opencv2/highgui.hpp> #include <vector> #include <iostream> //#define USE_CIRCULARITY int main(int argc, char** argv) { cv::Mat img = cv::imread("circles5.png", cv::IMREAD_COLOR); if (img.empty()) { std::cerr << "could not load image." << std::endl; return -1; } cv::Size pat_size = cv::Size(7, 7); std::vector<cv::Point2f> points; #ifdef USE_CIRCULARITY cv::SimpleBlobDetector::Params param; param.filterByCircularity = true; param.minCircularity = 0.8f; param.maxCircularity = 1.0f; cv::Ptr<cv::FeatureDetector> blobDetector = cv::SimpleBlobDetector::create(param); bool found = findCirclesGrid(img, pat_size, points, cv::CALIB_CB_SYMMETRIC_GRID | cv::CALIB_CB_CLUSTERING, blobDetector); #else bool found = findCirclesGrid(img, pat_size, points, cv::CALIB_CB_SYMMETRIC_GRID | cv::CALIB_CB_CLUSTERING); #endif std::cout << "findCirclesGrid: " << (found ? "Found" : "Not found") << "pattern" << std::endl; cv::drawChessboardCorners(img, pat_size, points, found); cv::imshow("img", img); cv::waitKey(0); return 0; } ```
RFC
low
Minor
208,726,625
vscode
[Feature Request] Undo branches
Undo branches / undo tree allows you to undo some changes, then make a new change, while keeping all changes available in the undo tree. The undo tree can therefore prevent awkward scenarios such as: * Losing all redo futures by accidentally pressing a button during undo * Copying the file or save it with git when trying multiple alternatives This screen-cap showcases how it works in Emacs with undo-tree. ![wpid-undo-tree1](https://cloud.githubusercontent.com/assets/908496/23103901/811d0352-f6c3-11e6-8dfa-b8690faa034f.gif) https://github.com/Zalastax/vscode/commit/c5699711d21dece88c7c608f6d8ae277f72a0081 contains the changes to the model that are needed, but several questions remain to be answered. I'm interested in completing the feature but need further input before proceeding. * How should the UI look? Graphics / ASCII, clickable? * Should the tree be formatted like in Emacs undo-tree (as short tree as possible) or like Vim's Gundo http://screenr.com/M9l (one state per line sorted by time)? * What unit-tests should be added? You can try out the current changes by compiling my fork and you'll find 'History Tree' in the Edit menu. Clicking the menu item will console.log a function that changes what redo future is selected (just like in the gif).
feature-request,undo-redo
high
Critical
208,744,742
rust
making a temporary tuple for pattern matching tries to move borrowed content
[playground link](https://is.gd/Bunuc0) This works, even though it looks like it's moving out of shared pointers, because of the `ref` keyword: ```rust fn works(foo_opt1: &Option<Foo>, foo_opt2: &Option<Foo>) { if let Some(ref foo1) = *foo_opt1 { if let Some(ref foo2) = *foo_opt2 { println!("this works") } } } ``` However this very similar code does not work: ```rust fn doesnt_work(foo_opt1: &Option<Foo>, foo_opt2: &Option<Foo>) { if let (Some(ref foo1), Some(ref foo2)) = (*foo_opt1, *foo_opt2) { println!("this does not compile!"); } } ``` We get this error: ``` | 13 | if let (Some(ref foo1), Some(ref foo2)) = (*foo_opt1, *foo_opt2) { | ^^^^^^^^^ cannot move out of borrowed content ``` It looks like the temporary tuple created on the right is a moving operation that can't be "undone" by the `ref` keyword. Could the compiler be smarter about this, or would that be unsound somehow?
A-diagnostics,A-borrow-checker,T-compiler
low
Critical
208,801,552
go
cmd/compile: needlessly early return value loads in runtime.scanobject
runtime.scanobject contains this bit of code: ```go // Mark the object. if obj, hbits, span, objIndex := heapBitsForObject(obj, b, i); obj != 0 { greyobject(obj, b, i, hbits, span, gcw, objIndex) } ``` This compiles to (excerpt): ``` 0x024b 00587 (/Users/josh/go/tip/src/runtime/mgcmark.go:1180) MOVQ R11, (SP) 0x024f 00591 (/Users/josh/go/tip/src/runtime/mgcmark.go:1180) MOVQ BX, 8(SP) 0x0254 00596 (/Users/josh/go/tip/src/runtime/mgcmark.go:1180) MOVQ R8, 16(SP) 0x0259 00601 (/Users/josh/go/tip/src/runtime/mgcmark.go:1180) PCDATA $0, $3 0x0259 00601 (/Users/josh/go/tip/src/runtime/mgcmark.go:1180) CALL "".heapBitsForObject(SB) 0x025e 00606 (/Users/josh/go/tip/src/runtime/mgcmark.go:1180) MOVL 40(SP), AX 0x0262 00610 (/Users/josh/go/tip/src/runtime/mgcmark.go:1180) MOVQ 24(SP), CX 0x0267 00615 (/Users/josh/go/tip/src/runtime/mgcmark.go:1180) MOVQ 48(SP), DX 0x026c 00620 (/Users/josh/go/tip/src/runtime/mgcmark.go:1180) MOVQ 56(SP), BX 0x0271 00625 (/Users/josh/go/tip/src/runtime/mgcmark.go:1180) MOVQ 32(SP), SI 0x0276 00630 (/Users/josh/go/tip/src/runtime/mgcmark.go:1180) TESTQ CX, CX 0x0279 00633 (/Users/josh/go/tip/src/runtime/mgcmark.go:1180) JNE $0, 683 0x027b 00635 (/Users/josh/go/tip/src/runtime/mgcmark.go:1178) MOVQ "".arena_used+96(SP), AX 0x0280 00640 (/Users/josh/go/tip/src/runtime/mgcmark.go:1160) MOVL "".h.shift+68(SP), CX 0x0284 00644 (/Users/josh/go/tip/src/runtime/mgcmark.go:1178) MOVQ ""..autotmp_2642+112(SP), DX 0x0289 00649 (/Users/josh/go/tip/src/runtime/mgcmark.go:1174) MOVQ "".b+168(FP), BX 0x0291 00657 (/Users/josh/go/tip/src/runtime/mgcmark.go:1160) MOVQ "".h.bitp+128(SP), SI 0x0299 00665 (/Users/josh/go/tip/src/runtime/mgcmark.go:1153) MOVQ "".n+80(SP), DI 0x029e 00670 (/Users/josh/go/tip/src/runtime/mgcmark.go:1153) MOVQ "".i+88(SP), R8 0x02a3 00675 (/Users/josh/go/tip/src/runtime/mgcmark.go:1160) MOVL CX, R9 0x02a6 00678 (/Users/josh/go/tip/src/runtime/mgcmark.go:1178) JMP 548 0x02ab 00683 (/Users/josh/go/tip/src/runtime/mgcmark.go:1181) MOVQ CX, (SP) 0x02af 00687 (/Users/josh/go/tip/src/runtime/mgcmark.go:1181) MOVQ "".b+168(FP), CX 0x02b7 00695 (/Users/josh/go/tip/src/runtime/mgcmark.go:1181) MOVQ CX, 8(SP) 0x02bc 00700 (/Users/josh/go/tip/src/runtime/mgcmark.go:1181) MOVQ "".i+88(SP), DI 0x02c1 00705 (/Users/josh/go/tip/src/runtime/mgcmark.go:1181) MOVQ DI, 16(SP) 0x02c6 00710 (/Users/josh/go/tip/src/runtime/mgcmark.go:1181) MOVQ SI, 24(SP) 0x02cb 00715 (/Users/josh/go/tip/src/runtime/mgcmark.go:1181) MOVL AX, 32(SP) 0x02cf 00719 (/Users/josh/go/tip/src/runtime/mgcmark.go:1181) MOVQ DX, 40(SP) 0x02d4 00724 (/Users/josh/go/tip/src/runtime/mgcmark.go:1181) MOVQ "".gcw+176(FP), AX 0x02dc 00732 (/Users/josh/go/tip/src/runtime/mgcmark.go:1181) MOVQ AX, 48(SP) 0x02e1 00737 (/Users/josh/go/tip/src/runtime/mgcmark.go:1181) MOVQ BX, 56(SP) 0x02e6 00742 (/Users/josh/go/tip/src/runtime/mgcmark.go:1181) PCDATA $0, $3 0x02e6 00742 (/Users/josh/go/tip/src/runtime/mgcmark.go:1181) CALL "".greyobject(SB) 0x02eb 00747 (/Users/josh/go/tip/src/runtime/mgcmark.go:1180) JMP 635 ``` The loads at instructions 0x025e, 0x0267, 0x026c, and 0x0271 are too early. They're loading return values from heapBitsForObject, but if the call to greyobject isn't necessary (if the jump at 0x0279 isn't taken), their values are unnecessary and will be overwritten. This is easy enough to see in the original code as well. The loads are scheduled where they are due to memory ordering. But maybe there's something we can do to improve the situation, perhaps using the knowledge that stack slots and function return values are always disjoint in memory? cc @randall77 @dr2chase @cherrymui
Performance,compiler/runtime
low
Minor
208,898,093
rust
Range* should overrride more methods of Iterator
Like nth, last, count, max, min,... maybe even sum and product (using a direct formula).
I-slow,C-enhancement,T-libs-api
medium
Major
208,917,656
go
gccgo: add AIX support
### What version of Go are you using (`go version`)? Snapshots from gcc SVN repository ### What operating system and processor architecture are you using (`go env`)? AIX 6.1/7.2 on Power7/8 ### What did you do? We are currently porting gccgo to AIX. This issue will be used to submit and discuss our changes.
OS-AIX
high
Critical
208,992,912
neovim
API: Do not translate errors; add more error "types"
Currently there are only two types of errors: Exception and Validation and translated exception text, but many languages like Python are supposed to translate them into something own: e.g. when indexing buffer it is expected that invalid index is IndexError, invalid buffer is something like ValueError and β€œLine index is too high” is TypeError. But with the current code it is clearly not possible to do such translation because one does not know what text will be received. Thus I suggest that 1. Variant 1 1. Error messages are part of the API. Any change (including typo fixes) to the text is considered to be incompatible. 2. Messages which my potentially be truncated (e.g. like β€œKey "%s" doesn't exist”) must be written in a form `{identifier}: {data}`, e.g. `Key doesn't exist: %s`. `api_set_error` should contain an assert which checks that either `vim_snprintf()` was able to fit text into the message field or text ends with `%s` and there are no other `%…` atoms except `%%`. (Currently used `snprintf()` is not guaranteed to return sane length on some systems.) 3. No errors are translated. 2. Variant 2 1. Exception messages are replaced or start with an identifier which are unique per function: e.g. `locked`, `lengthy`, `missing` for dict_set_value. Make it categorized to avoid confusion with other functions: `dict/locked`, `dict/lengthy`, … Identifiers must not be translated, must be a separate argument to `api_set_error` even if messages are kept and it would be logical if CI checked that no identifier is repeated twice. Identifiers are considered to be a part of the API. 2. If messages are chosen to be kept then they may be translated and are not a part of the API (except for the fact of their presence in reply). Additionally error types are retired: I have no idea what these two types may be useful for in the current state and there is no documentation where I would expect it to live (i.e. api/private/defs.h should have at least some pointer or ag should be able to find documentation for `\bk?ErrorType`, but neither is the case), so I assume that enough developers had already put some semi-random exception types to the code. Even if they are not retired there must be easily accessible documentation explaining WTF is the difference between Exception and Validation and all occurrences of api_set_error must be revisited to check conformance. I think that it is better to agree on this soon but this is not too urgent to be included in the `0.2`, so I selected `0.3` milestone. Note that current python client is not compatible with Vim in case scripts are written using EAFP principle: e.g. ```Python try: cached_value = vim.vars['cached_value'] except KeyError: vim.vars['cached_value'] = cached_value = compute_value() ``` is not going to work because it emits NvimError.
api,needs:design
low
Critical
209,066,920
go
x/crypto/ocsp: asn1 marshal failed with ocsp
I am not sure that it is bug in go `asn1` or it's in `x/ocsp` ### What version of Go are you using (`go version`)? i am using go version `go1.8 linux/amd64` and go version `go1.7.5 linux/amd64` ### What operating system and processor architecture are you using (`go env`)? ``` GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/root/prog/GO" GORACE="" GOROOT="/root/tgo/go" GOTOOLDIR="/root/tgo/go/pkg/tool/linux_amd64" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build808732534=/tmp/go-build -gno-record-gcc-switches" CXX="g++" CGO_ENABLED="1" ``` ### What did you do? i am generating ocsp response with `golang.org/x/crypto/ocsp` witch use `asn1` inside. And after upgrading to go1.8 i have this problems. ``` package main import ( "golang.org/x/crypto/ocsp" "crypto/ecdsa" "crypto/elliptic" "crypto/rand" "log" "crypto/x509" "time" "math/big" "flag" "io/ioutil" "os" ) func main() { o := flag.String("o", "output.ocsp", "file to save ocsp response") flag.Parse() priv, err := ecdsa.GenerateKey(elliptic.P521(), rand.Reader) if err != nil { log.Fatalf("can't crate key: %v", err) } issuer := &x509.Certificate{ RawSubjectPublicKeyInfo: []byte{48, 130 ,1 ,34 ,48, 13 ,6 ,9 ,42 ,134 ,72 ,134 ,247 ,13 ,1 ,1 ,1 ,5 ,0 ,3 ,130 ,1 ,15 ,0 ,48 ,130 ,1 ,10 ,2 ,130 ,1 ,1 ,0 ,189 ,125 ,218 ,247 ,195 ,162 ,125 ,131 ,246 ,91 ,130 ,253 ,219 ,91 ,95 ,174 ,30 ,27 ,117 ,192 ,181 ,25 ,175 ,152 ,36 ,172 ,187 ,87 ,121 ,216 ,53 ,236 ,9 ,30 ,124 ,204 ,148 ,27 ,10 ,208 ,118 ,252 ,14 ,110 ,22 ,163 ,113 ,89 ,167 ,41 ,92 ,97 ,173 ,76 ,36 ,100 ,245 ,209 ,3 ,6 ,89 ,162 ,196 ,71 ,124 ,66 ,34 ,228 ,81 ,251 ,199 ,164 ,149 ,255 ,196 ,169 ,230 ,86 ,68 ,186 ,35 ,39 ,188 ,193 ,70 ,216 ,204 ,203 ,3 ,206 ,9 ,233 ,107 ,57 ,79 ,131 ,95 ,93 ,157 ,42 ,159 ,132 ,207 ,130 ,122 ,247 ,95 ,107 ,207 ,85 ,46 ,117 ,51 ,181 ,26 ,246 ,114, 9 ,130 ,127 ,35 ,189 ,58 ,218 ,225 ,236 ,178 ,67 ,60 ,111 ,184 ,15 ,198 ,103 ,2 ,160 ,237 ,84 ,31 ,12 ,41 ,130 ,75 ,233 ,8 ,10 ,201 ,88 ,97 ,104 ,23 ,56 ,203 ,118 ,198 ,91 ,18 ,178 ,92 ,75 ,113 ,237 ,2 ,25 ,100 ,108 ,79 ,193 ,41 ,51 ,43 ,117 ,136 ,55 ,229 ,74 ,53 ,217 ,34 ,193 ,59 ,155 ,91 ,147 ,200 ,118 ,138 ,102 ,202 ,76 ,47 ,34 ,50 ,207 ,169 ,178 ,74 ,239 ,35 ,240 ,21 ,150 ,30 ,144 ,161 ,52 ,215 ,147 ,172 ,91 ,161 ,85 ,250 ,206 ,3 ,32 ,207 ,20 ,149 ,84 ,188 ,166 ,66 ,44 ,160 ,97 ,137 ,180 ,203 ,150 ,140 ,178 ,248 ,182 ,173 ,161 ,97 ,11 ,174 ,55 ,72 ,225 ,175 ,18 ,181 ,150 ,60 ,249 ,210 ,17 ,246 ,222 ,0 ,61 ,113 ,179 ,2 ,3 ,1 ,0, 1}, RawSubject: []byte{48, 117 ,49 ,11 ,48 ,9 ,6 ,3 ,85 ,4 ,6 ,19 ,2 ,73 ,76 ,49 ,22 ,48 ,20 ,6 ,3 ,85 ,4 ,10 ,19 ,13 ,83 ,116 ,97 ,114 ,116 ,67 ,111 ,109 ,32 ,76 ,116 ,100 ,46 ,49 ,41 ,48 ,39 ,6 ,3 ,85 ,4 ,11 ,19 ,32 ,83 ,116 ,97 ,114 ,116 ,67 ,111 ,109 ,32 ,67 ,101 ,114 ,116 ,105 ,102 ,105 ,99 ,97 ,116 ,105 ,111 ,110 ,32 ,65 ,117 ,116 ,104 ,111 ,114 ,105 ,116 ,121 ,49 ,35 ,48 ,33 ,6 ,3 ,85 ,4 ,3 ,19 ,26 ,83 ,116 ,97 ,114 ,116 ,67 ,111 ,109 ,32 ,67 ,108 ,97 ,115 ,115 ,32 ,49 ,32 ,67 ,108 ,105 ,101 ,110 ,116 ,32 ,67 ,65}, } responder := &x509.Certificate{ RawSubject:[]byte{48, 84 ,49 ,37 ,48 ,35 ,6 ,3 ,85 ,4 ,3 ,12 ,28 ,99 ,101 ,114 ,116 ,105 ,102 ,105 ,101 ,100 ,95 ,117 ,115 ,101 ,114 ,95 ,48 ,48 ,64 ,115 ,112 ,117 ,116 ,110 ,105 ,107 ,46 ,114 ,117 ,49 ,43 ,48 ,41 ,6 ,9 ,42 ,134 ,72 ,134 ,247 ,13 ,1 ,9 ,1 ,22 ,28 ,99 ,101 ,114 ,116 ,105 ,102 ,105 ,101 ,100 ,95 ,117 ,115 ,101 ,114 ,95 ,48 ,48 ,64 ,115 ,112 ,117 ,116 ,110 ,105 ,107 ,46 ,114 ,117}, } serial := &big.Int{} serial.SetInt64(int64(123321)) temp := ocsp.Response{ Status: ocsp.Revoked, SerialNumber: serial, ThisUpdate: time.Now().AddDate(0, 0, -1), NextUpdate: time.Now().AddDate(0, 0, 7), } b, err := ocsp.CreateResponse(issuer, responder, temp, priv) if err != nil { log.Fatalf("Can't create response: %v", err) } err = ioutil.WriteFile(*o, b, os.ModeType) if err != nil { log.Fatalf("Error at writing file: %v", err) } } ``` when i run this code on go 1.8 i have no errors, but when i am trying to read this response with openssl i have an error ``` # openssl ocsp -respin output.ocsp -text OCSP Response Data: OCSP Response Status: successful (0x0) Error parsing response 140378471253656:error:0D07808F:asn1 encoding routines:ASN1_ITEM_EX_D2I:no matching choice type:tasn_dec.c:350:Type=OCSP_CERTSTATUS 140378471253656:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:697:Field=certStatus, Type=OCSP_SINGLERESP 140378471253656:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:669:Field=responses, Type=OCSP_RESPDATA 140378471253656:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:697:Field=tbsResponseData, Type=OCSP_BASICRESP 140378471253656:error:0D0C706E:asn1 encoding routines:ASN1_item_unpack:decode error:asn_pack.c:205: Response Type: Basic OCSP Response ``` but if i run same code with go1.7 it works fine and openssl run without errors. Also i found that if i set `remplate.RevocationReason` to non zero value it also works good on go1.8
NeedsInvestigation
low
Critical
209,131,192
rust
A new compiler flag: "link everything statically or die, dammit!"
My adventures with static linking and native dependencies have been frustrating – because of the multitude of different `build.rs` scripts each configured in a different way, the build environment is fragile. Lately I made some changes to my environment, and since then, I've been trying to get all the native deps linking statically again – and some of them quite stubbornly refuse to do so. The general problem with `build.rs` is hard to fix, but I think at least the process of troubleshooting the build could be made less frustrating. I'm thinking something like passing a flag to `cargo` or` rustc`, signalling that "I'm expecting the build to be fully statically linked, so if some of the libraries passes dynamic linking flags, stop building and tell me the name of that traitor". At the moment, the build just silently accepts dynamic flags, resulting, after a long compilation, in a binary that I'm expecting to be able to run in an empty Linux userspace, but which fails. This is because `rustc` doesn't know my intent. Should we not be allowed to signal that intent?
A-frontend,A-linkage,T-compiler,C-feature-request
high
Critical
209,207,954
opencv
Distance between multi-contour shapes
<!-- 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.0+ - Operating System / Platform => ALL - Compiler => ALL ##### Detailed description Not all the shapes consist of a single contour, and `fillPoly` have taken that into consideration. It would be great if similar behavior is adapted for the `computeDistance` function as well. ##### Current signature: ```.cpp float ShapeDistanceExtractor::computeDistance(InputArray contour1, InputArray contour2); ``` ##### Desired signature: ```.cpp float ShapeDistanceExtractor::computeDistance(InputArrayOfArrays pts1, InputArrayOfArrays pts2); ```
feature,category: shape
low
Critical
209,228,481
TypeScript
Suggestion: tsc should display a one line summary
Suggestion: tsc currently list the errors. Sometimes you want to see if the number of errors increases or decreases. Proposition: ``` $ tsc FooBar.tsx(66,59): error TS2339: Property 'query' does not exist on type 'Location'. Hello.tsx(42,60): error TS2339: Property 'query' does not exist on type 'Location'. dispatcher.ts(1,13): error TS6133: '_' is declared but never used. World.test.ts(3,35): error TS7006: Parameter 'reason' implicitly has an 'any' type. World.test.ts(3,43): error TS7006: Parameter 'promise' implicitly has an 'any' type. World.test.ts(18,13): error TS6133: 'hello' is declared but never used. mock.ts(194,23): error TS6133: 'ruleId' is declared but never used. mock.ts(221,8): error TS2339: Property 'fetch' does not exist on type 'Window'. Compilation done in 2.6s - 8 errors ``` ``` $ tsc [...] Compilation aborted [...] ``` Could be the opportunity to display other informations (compilation time for example) given that it fits in a single line (72 columns). (I'm not talking about `--diagnostics`)
Suggestion,Help Wanted
medium
Critical
209,276,453
go
net/smtp: TestTLSClient failures with "connection reset by peer" on freebsd
Please answer these questions before submitting your issue. Thanks! ### What version of Go are you using (`go version`)? 1.8+ (development) ### What operating system and processor architecture are you using (`go env`)? freebsd-amd64-gce101 ### What did you do? Tried to run Trybots for an unrelated change: https://go-review.googlesource.com/c/37333/#message-ae31a67c5f6927959d8d507bc5ae951e01fbc4e7 Observed failure, followed instructions to check https://build.golang.org In the first column for freebsd-x64 (the left-hand one), I clicked through some of the failures in that column, and noticed the repeated occurrence of ``` --- FAIL: TestTLSClient (0.00s) smtp_test.go:610: client error: close tcp 127.0.0.1:46828->127.0.0.1:46827: connection reset by peer FAIL FAIL net/smtp 0.016s ``` which is also what besmirched my otherwise-clean TryBot run.
ExpertNeeded,Testing,OS-FreeBSD
low
Critical
209,435,460
vscode
When using Run to Cursor, then there is no inline instruction pointer decoration
Testing #20793 I would have expected to see an inline instruction pointer decoration when I use the 'Run to Cursor' command. ![run-to-cursor](https://cloud.githubusercontent.com/assets/172399/23210926/e1e8dbbe-f8ff-11e6-9fd4-f3f684424baf.gif)
feature-request,debug
low
Major
209,445,065
youtube-dl
Multi-Threaded postproc for playlists
Would be nice if postproc was done in separate thread(s) (up to N threads, N being the number of CPU cores). As soon as a download is finished, the postproc job should be dispatched and the next download should start immediately. But if all N cores are doing postproc, wait for one to finish before downloading another playlist item. If the machine has only 1 core then the the behavior is exactly the same as it currently is.
request,postprocessors
low
Major
209,469,386
rust
Need a way to close standard output
It is sometimes appropriate for a program to close its standard output stream long before it's done running. For instance, I have a [C program](https://github.com/zackw/tbbscraper/blob/master/collector/scripts/tunnel-ns.c) that sets up some system-wide state, waits for its parent to be done using that setup, and then tears it down again. (It's a separate program from the parent because it has to be setuid.) It notifies the parent that it's done setting up by closing its stdout, which is expected to be a pipe. You _can_ do this in Rust, but only by going behind the stdlib's back and calling `libc::close(1)`. I would like there to be an official way to do this, without going behind the stdlib's back. A concrete proposal: `Stdout` (and `Stderr`) add a `close` method. These flush buffered output, close the underlying OS-level file descriptor, and then immediately reopen it on `/dev/null`, taking care to ensure that the well-known fd number is retained. It remains OK to use `io::stdout()` after calling `close` on it. (Reopening the OS-level file descriptor on `/dev/null` is to accommodate third-party libraries that may assume it is always safe to write to file descriptors 1 and/or 2, and/or that the `open()` primitive will never return descriptors numbered 0, 1, or 2.) (Windows doesn't exactly have "file descriptors" but it _does_ have the concept of "standard handles" and there is a 1:1 mapping from the Unixy terms I used above to Windows equivalents.) (For consistency, the internal method for "replacing `Stdout` and `Stderr` with an arbitrary instance of `Write`" (mentioned in #40007) should also perform this `close` operation.)
T-libs-api,C-feature-accepted
low
Major
209,489,894
flutter
'flutter daemon' reports an inconsistent device 'platform' field when starting up versus shutting down
The problem seems to be that 'flutter daemon' reports an inconsistent 'platform' field when starting up versus shutting down. In the debugger, when a device is added, I see: ``` id: emulator-5554 name: Android SDK built for x86 64 platform: android-x64 ``` On shutdown, the "id" and "name" fields are the same, but platform is incorrectly reported as: ``` platform: android-arm ``` See https://github.com/flutter/flutter-intellij/issues/754 for more context.
tool,P3,team-tool,triaged-tool
low
Critical
209,510,106
react
Disabling or destroying event's target stops further event propagation.
Disabling a submit button within a form on `onClick`, stops the event propagation to the forms `onSubmit` handler. The fiddle: ``` import React from "react"; class SomeForm extends React.Component { constructor(props){ super(props) this.state = { disabled:false } } handleClick() { this.setState({ disabled:true }); console.log("Clicked button"); } handleSubmit(e){ alert("Submitted the form") } render() { let opts = {}; opts.disabled = this.state.disabled; // disabling the button stops the event propagation return (<form onSubmit={this.handleSubmit.bind(this)}> <button {...opts} type="submit" onClick={this.handleClick.bind(this)}> Continue </button> </form>) } } ReactDOM.render(<SomeForm />, document.getElementById('a')); ``` [JsBin with the live example](http://jsbin.com/kidabifono/1/edit?js,output) Expected behavior: The event gets propagated unless explicitly swallowed via `e.preventDefault() && e.stopPropagation()` **React version:** 15.4.2 **Browser:** Chrome 56.0.2924.87 x64 Unfortunately I cannot tell if this happens with older versions.
Component: DOM,Type: Discussion
low
Minor
209,538,335
TypeScript
[Salsa] Support jsdoc `@namespace`
Support treating variable declarations with [`@namespace`](http://usejsdoc.org/tags-namespace.html) JSDoc tag as TS namespaces. ```ts /** @namespace */ var Documents = { /** * An ordinary newspaper. */ Newspaper: 1, /** * My diary. * @private */ Diary: 2 }; ```
Suggestion,Committed,Domain: JSDoc,Domain: JavaScript
medium
Major
209,569,295
go
strings: Split1 slowdown
Please answer these questions before submitting your issue. Thanks! ### What version of Go are you using (`go version`)? 1.8 ### What operating system and processor architecture are you using (`go env`)? GOARCH="amd64" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" ### What did you do? Run strings/BenchmarkSplit1 benchmark ### What did you expect to see? Same performance as 1.7 ### What did you see instead? 3x slowdown Split1-4 12.0ms Β± 0% 52.7ms Β± 2% +337.56% (p=0.002 n=6+6) I've also reproduced this on tip. https://github.com/golang/go/commit/894650277670eed065566f803c642a8f80437456 renamed Split1 to SplitEmptySeparator, but kept benchmark the same. This performance regression was caused by https://github.com/golang/go/commit/b92d39ef6924fd5174449f95505d782f3f75db16 Investigation shows that extra time is spent in mostly GC,runtime.procyield and runtime.writebarrierptr_prewrite1. This is due to missing stack check prologue in utf8.DecodeRuneInString (disabling this optimization for DecodeRuneInString removes regression), which is called in a loop inside a benchmark. Because of missing stack size check goroutine cannot be preempted, preventing concurent GC and resulting in worse performance. If https://github.com/golang/go/issues/10958 is fixed, this particular regression should disappear. I'm not sure whether having more preemption points is more important than having lower call overhead.
Performance
low
Major
209,586,673
flutter
Hard to test exceptions during layout
Exceptions during layout tend to cause a cascade of other exceptions, which makes it hard to test. See https://github.com/flutter/flutter/pull/8321 for an example of a layout exception we'd like to test.
a: tests,team,framework,P3,team-framework,triaged-framework
low
Major
209,591,343
TypeScript
JSDoc - generate @type for a variable
_From @egamma on February 22, 2017 11:21_ Generating a JSDoc comment for a variable/constant should generate an @type annotation ```js /** | var p; ``` Inserts ```js /** * @type {any} */ var p; ``` _Copied from original issue: Microsoft/vscode#21110_
Suggestion,Awaiting More Feedback,Domain: JSDoc,Domain: JavaScript
low
Minor
209,622,288
angular
feature: support multiple case matching in `ngSwitch`/`@switch`
Like what anuglar 1 provide https://docs.angularjs.org/api/ng/directive/ngSwitch Also mentioned in here: https://github.com/angular/angular/issues/12174 Angular version: 2.4.7
feature,area: common,feature: under consideration
high
Critical
209,653,764
react-native
[Android] position: absolute shouldn't be cut off within a container with border
### Description If you have an element `position: absolute` with negative offset within a container with a border, it's going to be cut off, it's like `overflow: hidden` of the container is suddenly enabled by the border. But if you remove the border of the container, it works well. This issue only happens on Android. #3198 is a similar issue, and was reported with lots of discussions. However, I believe they are not exactly the same. ### Reproduction I've made [an example on rnplay](https://rnplay.org/apps/CouTuQ) to reproduce the issue. ### Solution TBD ### Additional Information * React Native version: 0.33 (rnplay), 0.39 (the version I currently use) * Platform: Android * Operating System: MacOS
Ran Commands,Platform: Android,Bug,Never gets stale
high
Critical
209,696,839
vue
<textarea> and <input type=text> cursor issue in IE 11.0
To reproduce: - open https://vuejs.org/v2/guide/forms.html#Multiline-text with IE 11.0 (Edge) on Windows 7 - type some text in the textarea - move the cursor at the beginning of the text (press the Home key) - quickly type random chars => the cursor jumps to the end same issue with input type=text (https://vuejs.org/v2/guide/forms.html#Text)
improvement
low
Major
209,796,982
javascript
missing function expression name : naming / semantics
Assuming a function expression that toggles the visibility of `<tr>`s depending on some criteria, ``` const filterRows = function () { ... } ``` ` 39:23 warning Missing function expression name func-names` I'm running into difficulty finding a name for that function expression as the rule suggests. More often it would be pure duplication of the variable in which the function is saved. Any ideas on how to properly redact a meaningful name that isn't a duplicate of the variable name?
question
low
Major
209,814,254
TypeScript
Proposal: quoted and unquoted property names distinct
Closure Compiler is a JavaScript optimizer that also works well with TypeScript (using our https://github.com/angular/tsickle as an intermediate re-writer). It produces the smallest bundles, and we use this internally at Google and externally for some Angular users to get the smallest application. In ADVANCED_OPTIMIZATIONS mode, Closure Compiler renames non-local properties. It uses a simple rule: unquoted property accesses can be renamed, but quoted property access cannot. This can break a program in the presence of mixed quoted and non-quoted property access, as a trivial example: ``` window.foo = "hello world"; console.log(window["foo"]); ``` Is minified by Closure Compiler [1] as ``` window.a = "hello world"; console.log(window.foo); // prints "undefined" ``` Currently, Closure Compiler puts the burden of correct quoted/unquoted access on the author. This is documented here: https://developers.google.com/closure/compiler/docs/api-tutorial3#propnames With TypeScript's type-checker we believe we could flag the majority of cases where property renaming breaks a users program. We propose to introduce an option that makes quoted and unquoted properties be separate, non-matching members. In the proposal below, assume we enable this behavior with an option `--strictPropertyNaming` # Treat quoted and unquoted properties as distinct Currently, TypeScript allows quoted access to named properties (and vice versa): ``` interface SeemsSafe { foo?: {}; } let b: SeemsSafe = {}; b["foo"] = 1; // This access should fail under --strictPropertyNaming b.foo = 2; // okay ``` Also, newly introduced in TypeScript 2.2, the inverse problem exists: ``` interface HasIndexSig { [key: string]: boolean; } let c: HasIndexSig; c.foo = true; // This access should fail under --strictPropertyNaming ``` # Defining types whose members should not be renamed It's convenient for users to specify a type that insures the properties are not renamed. For example, when an XHR returns, property accesses of the JSON data must not be renamed. ``` // Under --strictPropertyNaming, the quotes on these properties matter. // They must be accessed quoted, not unquoted. interface JSONData { 'username': string; 'phone': number; } let data = JSON.parse(xhrResult.text) as JSONData; console.log(data['phone']); // okay console.log(data.username); // should be error under --strictPropertyNaming ``` # Structural matches Two types should not be a structural match if their quoting differs: ``` interface JSONData { 'username': string; } class SomeInternalType { username: string; } let data = JSON.parse(xhrResult.text) as JSONData; let myObj: SomeInternalType = data; // should fail under --strictPropertyNaming console.log(myObj.username); // would get broken by property renaming ``` # Avoid a mix of Index Signatures and named properties Optional: we could add a semantic check for `.ts` inputs that disallows any type to have both an index signature and named properties. ``` interface Unsafe { [prop: string]: {}; foo?: {}; // This could be a semantic error with --strictPropertyNaming } let a: Unsafe = {}; a.foo = 1; a["foo"] = 2; ``` Note that the intersection operator `&` still defeats such a check: ``` type Unsafe = { [prop: string]: {}; } & { foo?: {}; // This is uncheckable because the intersection never fails } ``` We should not check `.d.ts` inputs as they may have been compiled without `--strictPropertyNaming`. # Compatibility with libraries If a library is developed with `--strictPropertyNaming`, the resulting `.d.ts` files should be usable by any program whether it opts into the flag or not. There is one corner case however. The following example should probably produce a declarationDiagnostic, because the generated .d.ts would be an error when used in a compilation without `--strictPropertyNaming`. ``` type C = { a: number; 'a': string; // this one should probably error [key: string]: number; } ``` A simpler alternative is just to allow this case, and produce it in `.d.ts` files. Then downstream consumers will have an error unless they turn on `--strictPropertyNaming` or `--noLibCheck`. Either choice here is okay with us. # Property names that require quoting In this case, there is no choice but to quote the identifier: ``` interface JSONData { 'hy-phen': number; } ``` This continues to work under `--strictPropertyNaming`, but the implication is that such an identifier is forced to be non-renamable since there is no unquoted syntax to declare it. This seems fine, it results in a lost optimization only for such names, which we assume are rare. # Property-renaming safety There are some cases that will remain unsafe: - the `any` type still turns off type-checking, including checking quoted vs. unquoted access - libraries developed without `--strictPropertyNaming` use unquoted identifiers which should not be renamed (such as `document.getElementById`. Closure Compiler already has an 'externs' mechanism that prevents the renaming. In the TypeScript code it will not be evident that the properties are not renamed, but this is the same situation we have today. [1] https://closure-compiler.appspot.com/home#code%3D%252F%252F%2520%253D%253DClosureCompiler%253D%253D%250A%252F%252F%2520%2540compilation_level%2520ADVANCED_OPTIMIZATIONS%250A%252F%252F%2520%2540output_file_name%2520default.js%250A%252F%252F%2520%2540formatting%2520pretty_print%250A%252F%252F%2520%253D%253D%252FClosureCompiler%253D%253D%250A%250Awindow.foo%2520%253D%2520%2522hello%2520world%2522%253B%250Aconsole.log(window%255B%2522foo%2522%255D)%253B%250A
Suggestion,In Discussion
low
Critical
209,815,702
rust
"Stability" of the `-C passes` and `-C llvm-args` flags
These flags are part of the stable `rustc` CLI but they let you tap into LLVM internals that we can't guarantee the stability of. Known usages of these flags include: - Generating code coverage files. [Works on stable](https://github.com/rust-lang/rust/pull/38608#issuecomment-280797934) - Fuzzing ([`cargo fuzz`](https://github.com/rust-fuzz/cargo-fuzz)). This additionally requires using a sanitizer so it requires nightly. Concerns: - An LLVM upgrade may break the functionality exposed by these flags. An LLVM pass may be removed or renamed, the code coverage format may change, etc. - These flags may pose an obstacle for the adoption of non-LLVM backends (like Cranelift). For example, `-C llvm-args` has no meaning for the Cranelift backend. We discussed this a bit towards the end of the last tools meeting. Some ways to communicate the unstability of these flags were brought up: - Discourage their use. Something along these lines: - Stable: remove them from `-C help`, and print a warning if they are used - Beta/nightly: show a warning if these flags are used without the `-Z unstable-options` flag. - Document what are the real stability guarantees of the functionality exposed by `-C` flags. - Provide more targeted *unstable* `-Z` flags for the LLVM functionality that can be accessed through these flags and encourage users to use those instead the `-C` ones. For example, `-Z fuzz`, `-Z code-coverage`, etc. cc @rust-lang/tools
I-needs-decision,A-stability,T-compiler,T-dev-tools,C-bug,A-cranelift,A-gcc
low
Minor
209,849,689
youtube-dl
Please add support for animation.filmarchives.jp
### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.02.22*. 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 **2017.02.22** ### Before submitting an *issue* make sure you have: - [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [ ] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones ### What is the purpose of your *issue*? - [ ] Bug report (encountered problems with youtube-dl) - [x] 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 `-v` flag to **your command line** you run youtube-dl with, 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.exe -v http://animation.filmarchives.jp/works/play/5432 [debug] System config: [] [debug] User config: ['-o', '%(title)s.%(ext)s', '--autonumber-size', '3', '--all-subs', '-r', '1M'] [debug] Custom config: [] [debug] Command-line args: ['-v', 'http://animation.filmarchives.jp/works/play/5432'] [debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252 [debug] youtube-dl version 2017.02.22 [debug] Python version 3.4.4 - Windows-10-10.0.14393 [debug] exe versions: ffmpeg N-71883-geb9fb50, ffprobe N-71883-geb9fb50, rtmpdump 2.3 [debug] Proxy map: {} [generic] 5432: Requesting header WARNING: Falling back on generic information extractor. [generic] 5432: Downloading webpage [generic] 5432: Extracting information ERROR: Unsupported URL: http://animation.filmarchives.jp/works/play/5432 Traceback (most recent call last): File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkf42q19b\build\youtube_dl\YoutubeDL.py", line 704, in extract_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkf42q19b\build\youtube_dl\extractor\common.py", line 427, in extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpkf42q19b\build\youtube_dl\extractor\generic.py", line 2604, in _real_extract youtube_dl.utils.UnsupportedError: Unsupported URL: http://animation.filmarchives.jp/works/play/5432 ... <end of log> ``` --- ### 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: http://animation.filmarchives.jp/works/play/5432 - Single video: http://animation.filmarchives.jp/works/playen/5432 Note that **youtube-dl does not support sites dedicated to [copyright infringement](https://github.com/rg3/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free)**. In order for site support request to be accepted all provided example URLs should not violate any copyrights. ---
site-support-request
low
Critical
209,881,589
rust
Error on bad pub(path) depends on module ordering
Which error message you get with a non-ancestral `pub(path)` visibility restriction depends on the ordering of module declarations. These two struct declarations produce different errors; ```rust mod foo { pub(in ::bar) struct Foo; } mod bar { pub(in ::foo) struct Bar; } ``` The second produces the correct error: ``` error: visibilities can only be restricted to ancestor modules ``` The first produces this, incorrect error: ``` error[E0578]: cannot find module `bar` in the crate root ``` Presumably the pub(path) code is operating on the assumption the path, if real, has already been walked (because any correct path would have been walked), but this is not the case.
A-diagnostics,A-resolve,E-mentor,T-compiler,C-bug,WG-diagnostics
low
Critical
209,919,037
TypeScript
Support JSDoc `@function`
<!-- BUGS: Please use this template. --> <!-- QUESTIONS: This is not a general support forum! Ask Qs at http://stackoverflow.com/questions/tagged/typescript --> <!-- SUGGESTIONS: See https://github.com/Microsoft/TypeScript-wiki/blob/master/Writing-Good-Design-Proposals.md --> From: https://github.com/Microsoft/vscode/issues/21321 **TypeScript Version:** 2.2.1 / nightly (2.2.0-dev.201xxxxx) **Code** ```ts // test-module.d.ts declare module 'test-module' { declare function func<T>(c: T): (y: any) => any; } ``` ```js // example.js import { func } from 'test-module'; /** * @function * @param {number} c first number * @returns {number} result */ const thisDoesNot = func(1); ``` **Expected behavior:** The JSDoc specifications give `thisDoesNot` a type of `(c: number) => number` **Actual behavior:** The type from the `*.d.ts` file is preferred instead, giving `thisDoesNot` a type of `(c: any) => any`
Suggestion,Committed,VS Code Tracked,Domain: JSDoc
low
Critical
209,995,213
TypeScript
Relax visibility rules for type-aliases when 'declaration' compiler option is set.
One common thing I use type-aliases for is to give shorter, more expressive names to commonly used types throughout a file. This is especially useful for callback signatures that see common use throughout a module, as well as string-literal types used in a union type, like `type HttpMethods = 'get' | 'post' | 'put' | 'delete'`. Let's look at the following simplified example: ```ts type CharCallback = (c: string, i: number) => string; export function mapOnChar(str: string, fn: CharCallback): string { const newStr = []; for (let i = 0, lim = str.length; i < lim; i++) newStr.push(fn(str.charAt(i), i)); return newStr.join(''); } ``` When using the `declaration` compiler option, this example fails to compile with the following error: `error TS4078: Parameter 'fn' of exported function has or is using private name 'CharCallback'.` This initially makes sense; the type-alias is not being exported so it **is** private. However, if you look at the type-alias, the only thing "private" about it is the name it was given, and an alias' name is not really important to or needed for a definition file. There is no reason that the un-exported type-alias in the example cannot be automatically de-aliased back into `(c: string, i: number) => string` and that used in its place when the definition file is emitted. However, if the alias in the example were to be exported, then it should not be de-aliased in the definition file. I should point out that this suggestion is considering type-aliases only. If the `CharCallback` type was re-written as `interface CharCallback { (c: string, i: number): string }`, then that would be a good case to raise an error. An `interface` is generally considered more "concrete" than a simple type-alias, and so its name should be preserved and used in the definition file.
Suggestion,Awaiting More Feedback
low
Critical
210,017,513
opencv
cv::ml::Boost->predict always returns 0/1 with RAW_OUTPUT
<!-- 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.2 - Operating System: Windows 7 ##### Detailed description I expected the `boost->predict(sample, cv::noArray(), cv::ml::StatModel::RAW_OUTPUT)` to give me the sum value, instead it always is 0 or 1, regardless of Boost model setup. In order to calculate an ROC curve of the classifier I need to be able to shift the sum towards the positive or negative side. I think the [following line](https://github.com/opencv/opencv/blob/master/modules/ml/src/boost.cpp#L365) is the cause (`int ival = (int)(val > 0);`). I managed to work around this issue by calculating the sum myself, based on the implementation of DTrees, but this will only work correctly for VAR_ORDERED variables. ``` auto& nodes = boost->getNodes(); auto& roots = boost->getRoots(); auto& splits = boost->getSplits(); double sum = 0.; for (auto& r : roots) { int nidx = r, prev = nidx, c = 0; while (true) { auto& n = nodes[r]; prev = nidx; const cv::ml::DTrees::Node& node = nodes[nidx]; if (node.split < 0) break; const cv::ml::DTrees::Split& split = splits[node.split]; int vi = split.varIdx; float val = sample[vi]; nidx = val <= split.c ? node.left : node.right; } sum += nodes[prev].value; } ``` As boost uses decision tree stumps I could probably simplify the workaround further ##### Steps to reproduce Train any Boost model and evaluate with `boost->predict(sample, cv::noArray(), cv::ml::StatModel::RAW_OUTPUT)`
RFC
low
Critical
210,080,347
opencv
Invalid bind texture error at runtime with CUDA OpenCV functions
##### System information - OpenCV => 3.2 - Operating System / Platform => Ubuntu 64 Bit - Compiler => g++, nvcc - Cuda => 7.0 ##### Description When I try to call CUDA OpenCV functions, like cuda::remap, I get the following error: OpenCV Error: Gpu API call (invalid texture reference) in bindTexture, file /home/username/laptop_setup/opencv-3.2.0/modules/core/include/opencv2/core/cuda/common.hpp, line 102 terminate called after throwing an instance of 'cv::Exception' what(): /home/username/laptop_setup/opencv-3.2.0/modules/core/include/opencv2/core/cuda/common.hpp:102: error: (-217) invalid texture reference in function bindTexture ```.cpp cuda::remap(mat_gpu_left, d_left, map_gpu_left1, map_gpu_left2, INTER_LINEAR, BORDER_CONSTANT); ``` The same code I was using has run without errors on other machines. This was also the case for other CUDA functions like cuda::multiply.
bug,category: gpu/cuda (contrib)
low
Critical
210,115,778
go
runtime/race: adding support for the race detector on other platforms
Hi Everyone, Following on from [this](https://groups.google.com/forum/#!topic/golang-nuts/5B4cXnaWcn8) discussion on the golang-nuts list, about supporting the race detector on ARM hardware, I'm opening this issue to track the suggestion. The ThreadSanitizer that the Go race detector is based on supports x86_64, aarch64 (i.e.Arm8 64-bit), mips64 and powerpc64. Currently Go only supports the race detector on x86_64 hardware. Would it be possible for a future release of Go to support the race detector on the other platforms - aarch64, mips64 and powerpc64. Thanks Owen
RaceDetector,help wanted,FeatureRequest,compiler/runtime
medium
Major
210,132,626
opencv
[wishlist, feature, improvement] Doxygen documentation
<!-- 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) <!-- Example - OpenCV => 3.1 - Operating System / Platform => Windows 64 Bit - Compiler => Visual Studio 2015 --> - OpenCV => 3.2 - Operating System / Platform => N/A - Compiler => N/A ##### Detailed description Going through the Doxygen documentation, I noticed the following: - some folders / files have camel case, others have snake case - '@subsection' does not follow the convention of folder being in the same view ##### Suggested feature Starting of page contains sentences copied from previous content list. These should be extended from a main view, as this would help the contributor make changes in one place. <!-- your description --> ##### Steps to reproduce <!-- to add code example fence it with triple backticks and optional file extension ```.cpp // C++ code example ``` or attach as .txt or .zip file --> N/A
wontfix,category: documentation,incomplete
low
Critical
210,133,537
youtube-dl
Add support for toei-animation.com
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.02.24.1** - [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [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] Site support request (request for adding support for a new site) ### Description of your *issue*, suggested solution and other information Please add support for toei-animation.com. Example URL: http://www.toei-animation.com/en/catalog/master_hamsters
site-support-request
low
Critical
210,145,448
pytorch
BCELoss doesn't accept LongTensor targets
Unlike NLLLoss, BCELoss doesn't accept LongTensor targets (Reported by Marc'Aurelio)
feature,module: loss,triaged,Stale
low
Minor
210,158,505
opencv
Affine3 class templated method operator* is using a type that does not exist!
##### System information (version) - OpenCV => 3.1.0 - Operating System / Platform => Ubuntu 14.04 on VirtualBoxVM - Compiler => g++ ##### Detailed description The templated method ``` template<typename T, typename V> inline V cv::operator*(const cv::Affine3<T>& affine, const V& v) ``` is using a type that does not exist! Because it tried to use V's member variable x, y, z, but as far as I know, no vectors in OpenCV or even Eigen is implemented this way but only access by indices. ##### Steps to reproduce ``` struct CamSpec { CamSpec(cv::Mat intrinsic, cv::Mat extrinsic): _intrinsic(intrinsic), _extrinsic(extrinsic){} const cv::Mat _intrinsic; const cv::Affine3<decimal_t> _extrinsic; cv::Mat inverse() { return _extrinsic.inv()*_intrinsic.inv(); } point_t operator * (const cv::Vec<decimal_t, 3>& vec) { cv::Vec<decimal_t, 3> coord_pixel_vec = _extrinsic*vec; // THIS IS THE LINE THAT FAILS TO COMPILE cv::Mat_<decimal_t> coord_pixel = _intrinsic*cv::Mat(coord_pixel_vec); assert(coord_pixel.at<decimal_t>(2) == 1); return point_t(coord_pixel.at<decimal_t>(0), coord_pixel.at<decimal_t>(1)); } }; ``` ##### Error Message ``` /usr/local/include/opencv2/core/affine.hpp:456:55: error: β€˜const class cv::MatExpr’ has no member named β€˜z’ r.x = m.val[0] * v.x + m.val[1] * v.y + m.val[ 2] * v.z + m.val[ 3]; ^ /usr/local/include/opencv2/core/affine.hpp:456:37: error: β€˜const class cv::MatExpr’ has no member named β€˜y’ r.x = m.val[0] * v.x + m.val[1] * v.y + m.val[ 2] * v.z + m.val[ 3]; ^ /usr/local/include/opencv2/core/affine.hpp:456:20: error: β€˜const class cv::MatExpr’ has no member named β€˜x’ r.x = m.val[0] * v.x + m.val[1] * v.y + m.val[ 2] * v.z + m.val[ 3]; ^ /usr/local/include/opencv2/core/affine.hpp:456:9: error: β€˜class cv::MatExpr’ has no member named β€˜x’ r.x = m.val[0] * v.x + m.val[1] * v.y + m.val[ 2] * v.z + m.val[ 3]; ^ /usr/local/include/opencv2/core/affine.hpp:457:55: error: β€˜const class cv::MatExpr’ has no member named β€˜z’ r.y = m.val[4] * v.x + m.val[5] * v.y + m.val[ 6] * v.z + m.val[ 7]; ^ /usr/local/include/opencv2/core/affine.hpp:457:37: error: β€˜const class cv::MatExpr’ has no member named β€˜y’ r.y = m.val[4] * v.x + m.val[5] * v.y + m.val[ 6] * v.z + m.val[ 7]; ^ /usr/local/include/opencv2/core/affine.hpp:457:20: error: β€˜const class cv::MatExpr’ has no member named β€˜x’ r.y = m.val[4] * v.x + m.val[5] * v.y + m.val[ 6] * v.z + m.val[ 7]; ^ /usr/local/include/opencv2/core/affine.hpp:457:9: error: β€˜class cv::MatExpr’ has no member named β€˜y’ r.y = m.val[4] * v.x + m.val[5] * v.y + m.val[ 6] * v.z + m.val[ 7]; ^ /usr/local/include/opencv2/core/affine.hpp:458:55: error: β€˜const class cv::MatExpr’ has no member named β€˜z’ r.z = m.val[8] * v.x + m.val[9] * v.y + m.val[10] * v.z + m.val[11]; ^ /usr/local/include/opencv2/core/affine.hpp:458:37: error: β€˜const class cv::MatExpr’ has no member named β€˜y’ r.z = m.val[8] * v.x + m.val[9] * v.y + m.val[10] * v.z + m.val[11]; ^ /usr/local/include/opencv2/core/affine.hpp:458:20: error: β€˜const class cv::MatExpr’ has no member named β€˜x’ r.z = m.val[8] * v.x + m.val[9] * v.y + m.val[10] * v.z + m.val[11]; ^ /usr/local/include/opencv2/core/affine.hpp:458:9: error: β€˜class cv::MatExpr’ has no member named β€˜z’ r.z = m.val[8] * v.x + m.val[9] * v.y + m.val[10] * v.z + m.val[11]; ^ ```
bug,category: core
low
Critical
210,179,915
go
plugin: add Windows support
hi Plugin Pkg Work for Windows!? i want use this for mac,linux,win,... os. when(what time) fix this? https://golang.org/pkg/plugin/
OS-Windows,NeedsInvestigation,FeatureRequest,compiler/runtime
high
Critical
210,199,273
TypeScript
Is there a way to use TypeScript to prevent accidental global access?
I just spent 2 hours tracking down this issue: - We have a class with a prototype method called `focus()` - Our code was calling `focus()`, but it should have been calling `this.focus()` - The code compiled fine, because `window.focus()` shares the same signature as our `focus()` method Is there a way to throw a compile time error when implicitly accessing global methods (on `window`, `global`, etc.)? If not, a compiler flag would be extremely helpful. I would happily be more explicit about commonly used globals (`window.setTimeout`, `window.document`, ...) if it meant I could more easily catch insidious bugs like this one. Full commit here: https://github.com/coatue/SlickGrid/commit/0f8bab3fa9968173d749ccdf535c88f3a526ca8b.
Suggestion,Needs Proposal
high
Critical
210,230,783
opencv
buildOpticalFlowPyramid + calcOpticalFlowPyrLK + cloned pyramids
System Info: OpenCV 3.2.0, Win10 x64, VS2015 I am computing pyramids using `cv::buildOpticalFlowPyramid` and passing the result to `cv::calcOpticalFlowPyrLK`. This works only if the pyramids are passed as is (being a submatrix from the original images, i.e shared data with ROI). If we make a deep copy of the pyramids, we get an error from `calcOpticalFlowPyrLK`: ``` OpenCV Error: Assertion failed (ofs.x >= winSize.width && ofs.y >= winSize.height && ofs.x + prevPyr[lvlStep1].cols + winSize.width <= fullSize.width && ofs.y + prevPyr[lvlStep1].rows + winSize.height <= fullSize.height) in cv::`anonymous-namespace'::SparsePyrLKOpticalFlowImpl::calc, file C:\dev\opencv\sources\modules\video\src\lkpyramid.cpp, line 1294 ``` Looking at the [source](https://github.com/opencv/opencv/blob/master/modules/video/src/lkpyramid.cpp), there are two places that call `locateROI` expecting the pyramids to be submatrices: - modules/video/src/lkpyramid.cpp#L1286 - modules/video/src/lkpyramid.cpp#L1314 ```cpp // ensure that pyramid has reqired padding if(levels1 > 0) { Size fullSize; Point ofs; prevPyr[lvlStep1].locateROI(fullSize, ofs); CV_Assert(ofs.x >= winSize.width && ofs.y >= winSize.height && ofs.x + prevPyr[lvlStep1].cols + winSize.width <= fullSize.width && ofs.y + prevPyr[lvlStep1].rows + winSize.height <= fullSize.height); } ``` Perhaps there should be a check first to see if the pyramids indeed are submatrices, before doing the CV_ASSERT. --- Here is a minimal C++ example that shows the problem (compile with and without the `TRIGGER_BUG` define): ```cpp #include "opencv2/opencv.hpp" #include <iostream> #include <vector> using namespace std; using namespace cv; // triggers assertion failed in cv::calcOpticalFlowPyrLK #define TRIGGER_BUG 1 int main() { // pair of images and source points vector<Point2f> prevPts, nextPts; Mat prevImg = imread("RubberWhale1.png", IMREAD_GRAYSCALE); Mat nextImg = imread("RubberWhale2.png", IMREAD_GRAYSCALE); goodFeaturesToTrack(prevImg, prevPts, 100, 0.01, 2.0); // pyramids vector<Mat> prevPyr, nextPyr; Size winSize(21,21); int maxLevel = 3; buildOpticalFlowPyramid(prevImg, prevPyr, winSize, maxLevel, true); buildOpticalFlowPyramid(nextImg, nextPyr, winSize, maxLevel, true); // clone pyramids (no ROIs) vector<Mat> p1, p2; for (int i=0; i<prevPyr.size(); ++i) { #ifdef TRIGGER_BUG p1.push_back(prevPyr[i].clone()); p2.push_back(nextPyr[i].clone()); #else p1.push_back(prevPyr[i]); p2.push_back(nextPyr[i]); #endif } // compute sparse flow Mat status; calcOpticalFlowPyrLK(p1, p2, prevPts, nextPts, status, noArray(), winSize, maxLevel); cout << nextPts.size() << " points" << endl; return 0; } ```
priority: normal,category: video,RFC
low
Critical
210,234,894
youtube-dl
Add support for authentication http://www.gracieuniversity.com/
$ youtube-dl --verbose -u PRIVATE -p PRIVATE http://www.gracieuniversity.com/Players/FVLessonPlayer/FVLessonPlayer.aspx?enc=dkG2PaKrWHkbW%2bHxxa7%2bXA%3d%3d [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: [u'--verbose', u'-u', u'PRIVATE', u'-p', u'PRIVATE', u'http://www.gracieuniversity.com/Players/FVLessonPlayer/FVLessonPlayer.aspx?enc=dkG2PaKrWHkbW%2bHxxa7%2bXA%3d%3d'] [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2017.02.24.1 [debug] Python version 2.7.6 - Linux-3.19.0-32-generic-x86_64-with-LinuxMint-17.3-rosa [debug] exe versions: avconv 9.20-6, avprobe 9.20-6 [debug] Proxy map: {} [generic] FVLessonPlayer: Requesting header WARNING: Could not send HEAD request to http://www.gracieuniversity.com/Players/FVLessonPlayer/FVLessonPlayer.aspx?enc=dkG2PaKrWHkbW%2bHxxa7%2bXA%3d%3d: <urlopen error [Errno -2] Name or service not known> [generic] FVLessonPlayer: Downloading webpage ERROR: Unable to download webpage: <urlopen error [Errno -2] Name or service not known> (caused by URLError(gaierror(-2, 'Name or service not known'),)) File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 496, in _request_webpage return self._downloader.urlopen(url_or_request) File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 2093, in urlopen return self._opener.open(req, timeout=self._socket_timeout) File "/usr/lib/python2.7/urllib2.py", line 404, in open response = self._open(req, data) File "/usr/lib/python2.7/urllib2.py", line 422, in _open '_open', req) File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain result = func(*args) File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 918, in http_open req) File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open raise URLError(err) --- Hi, I'm downloaded the first video in the page, that's http://www.gracieuniversity.com/Players/FVLessonPlayer/FVLessonPlayer.aspx?enc=%2fd2ro7h1eDQMt9mN44fjzA%3d%3d even without provide a user and password.
site-support-request,account-needed
low
Critical
210,259,252
opencv
Aruco samples won't build with apparently correct minimum module configuration
##### System information (version) - OpenCV => 3.2 - Operating System / Platform => Ubuntu 16.01 - Compiler => g++-5 ##### Detailed description CMakeLists.txt for aruco lists the modules needed for the aruco libraries. But the aruco samples will not build with just these modules. They also require videoio. As a result, a minimum system build to support aruco will not build the samples. Not precisely a bug - but there is no straightforward way of discovering this other than trial and error and review of the samples source. Easy to imagine this being true in other modules as well. Perhaps CMakeLists.txt for the samples? <!-- your description --> ##### Steps to reproduce Configure opencv build to include opencv_contrib/modules. Require only minimum modules needed for aruco as discovered by inspecting relevant CMakeLists.txt files - aruco core highgui imgproc img_codecs calib3d features2d flann ml. Set BUILD_EXAMPLES on. Build. Check build/bin directory - no samples built. Re-configure, adding only videio. Build again. Samples now present in build/bin.
bug,category: build/install
low
Critical
210,268,337
rust
Braced macros are inconsistent with other braced items
Consider the following macro: ```rust macro_rules! test { () => ( "hello" ) } ``` The following function compiles as expected if the macro is invoked with parenthesis: ```rust fn string_len() -> usize { test!().len() } ``` However, if I invoke the macro with curly braces instead, Rust emits an error: ```rust fn string_len() -> usize { test!{ }.len() } rustc 1.15.1 (021bd294c 2017-02-08) error: expected expression, found `.` --> <anon>:2:13 | 2 | test!{ }.len() | ^ ``` From discussions with @eddyb, this occurs because the macro is being treated as expanding into a statement as opposed to an expression. This is inconsistent with how other curly-braced constructs are treated. For instance, the following functions as expected: ```rust fn string_len() -> usize { { "hello" }.len() } ``` It seems that the expansion site is not correctly being identified as an expression or statement. In this case, the `.` suffix to the macro invocation clearly determines that the macro should expand to an expression.
A-macros,T-compiler,C-bug
low
Critical
210,275,741
youtube-dl
Split `README.md` into smaller files
The `README.md` is really long. Considering that it loads every time someone goes to the main page, wouldn't it be better to keep some of it (e.g., the FAQ) in separate files?
request,documentation
low
Minor
210,280,874
rust
Tracking issue for future-incompatibility lint `missing_fragment_specifier`
This is the summary issue for the `missing_fragment_specifier` future-compatibility warning and other related errors. The goal of this page is describe why this change was made and how you can fix code that is affected by it. It also provides a place to ask questions or register a complaint if you feel the change should not be made. #### What is the warning for? The `missing_fragment_specifier` warning is issued when an unused pattern in a `macro_rules!` macro definition has a meta-variable (e.g. `$e`) that is not followed by a fragment specifier (e.g. `:expr`). This warning can always be fixed by removing the unused pattern in the `macro_rules!` macro definition. #### When will this warning become a hard error? At the beginning of each 6-week release cycle, the Rust compiler team will review the set of outstanding future compatibility warnings and nominate some of them for Final Comment Period. Toward the end of the cycle, we will review any comments and make a final determination whether to convert the warning into a hard error or remove it entirely. #### Current status * https://github.com/rust-lang/rust/pull/39419 * Introduces the `missing_fragment_specifier` lint as warn-by-default * https://github.com/rust-lang/rust/pull/42894 * Makes the `missing_fragment_specifier` lint deny-by-default * #75516 * Makes the `missing_fragment_specifier` lint a hard error * #80210 * Turns the hard error back to a deny-by-default lint due to too much breakage
A-lints,A-parser,A-macros,T-compiler,C-future-incompatibility,C-tracking-issue
low
Critical
210,348,962
kubernetes
No way to configure ExternalIP addresses for a node with kubelet
Kubelet currently will update the node addresses in the status, meaning it cannot be edited manually / with a controller. However, there is also no way to tell kubelet to register anything other than a single `--node-ip` address flag, which gets registered as `NodeLegacyHostIP` and `NodeInternalIP`. We should allow arbitrary addresses to be specified on the kubelet command line, if kubelet is going to prevent them being updated externally.
priority/backlog,sig/network,area/kubelet,sig/node,kind/feature,lifecycle/frozen,needs-triage
medium
Critical
210,351,785
neovim
plugin: --startuptime statistics and visualization
I think it would be really great if something like timecop could be added directly into Neovim. For many users, using Neovim is all about performance. With the `--startuptime` option already there, I think all that's missing is some kind of cli visualization and statistic. It would be great to have it show on `:timecop`. I think just dumping a file and then leaving the user to "visualize it however you want" isn't a great user experience.
enhancement,plugin
medium
Major
210,369,692
youtube-dl
MSNBC Livestream errors
## Please follow the guide below - You will be asked some questions and requested to provide some information, please read them **carefully** and answer honestly - Put an `x` into all the boxes [ ] relevant to your *issue* (like that [x]) - Use *Preview* tab to see how your issue will actually look like --- ### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2017.02.24.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 **2017.02.24.1** ### Before submitting an *issue* make sure you have: - [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [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 ### 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 `-v` flag to **your command line** you run youtube-dl with, copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```): ``` C:\Users\Michelle\Videos>youtube-dl --verbose -- http://www.msnbc.com/live-online/watch/live-streaming-will-resume-shortly-871842883738 [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['--verbose', '--', 'http://www.msnbc.com/live-online/watch/live-streaming-will-resume-shortly-871842883738'] [debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252 [debug] youtube-dl version 2017.02.24.1 [debug] Python version 3.4.4 - Windows-10-10.0.14393 [debug] exe versions: ffmpeg N-79000-g66edd86, ffprobe N-79000-g66edd86 [debug] Proxy map: {} [NBCNews] 871842883738: Downloading webpage [ThePlatformFeed] n_shift_livesho_170207: Downloading JSON metadata Traceback (most recent call last): File "__main__.py", line 19, in <module> File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl89hv5ts\build\youtube_dl\__init__.py", line 457, in main File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl89hv5ts\build\youtube_dl\__init__.py", line 447, in _real_main File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl89hv5ts\build\youtube_dl\YoutubeDL.py", line 1883, in download File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl89hv5ts\build\youtube_dl\YoutubeDL.py", line 772, in extract_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl89hv5ts\build\youtube_dl\YoutubeDL.py", line 838, in process_ie_result File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl89hv5ts\build\youtube_dl\YoutubeDL.py", line 761, in extract_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl89hv5ts\build\youtube_dl\extractor\common.py", line 427, in extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl89hv5ts\build\youtube_dl\extractor\theplatform.py", line 378, in _real_extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl89hv5ts\build\youtube_dl\extractor\theplatform.py", line 313, in _extract_feed_info IndexError: list index out of range ``` ``` C:\Users\Michelle\Videos>youtube-dl --verbose -- http://www.msnbc.com/msnbc-live [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['--verbose', '--', 'http://www.msnbc.com/msnbc-live'] [debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252 [debug] youtube-dl version 2017.02.24.1 [debug] Python version 3.4.4 - Windows-10-10.0.14393 [debug] exe versions: ffmpeg N-79000-g66edd86, ffprobe N-79000-g66edd86 [debug] Proxy map: {} [NBCNews] live: Downloading webpage ERROR: An extractor error has occurred. (caused by KeyError('meta',)); 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. Traceback (most recent call last): File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl89hv5ts\build\youtube_dl\extractor\common.py", line 427, in extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl89hv5ts\build\youtube_dl\extractor\nbc.py", line 371, in _real_extract KeyError: 'meta' Traceback (most recent call last): File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl89hv5ts\build\youtube_dl\extractor\common.py", line 427, in extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl89hv5ts\build\youtube_dl\extractor\nbc.py", line 371, in _real_extract KeyError: 'meta' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl89hv5ts\build\youtube_dl\YoutubeDL.py", line 761, in extract_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmpl89hv5ts\build\youtube_dl\extractor\common.py", line 440, in extract youtube_dl.utils.ExtractorError: An extractor error has occurred. (caused by KeyError('meta',)); 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. ``` --- ### Description of your *issue*, suggested solution and other information These were found whilst seeing if youtube-dl would work with MSNBC's live stream of their own content. I know normally youtube-dl does not spit out a trace when a URL is not found, though it seems the MSNNews extractor caught it and attempted to download it as a pre-recorded video (not a stream), hence the first error above. Both of the URLs that I try above should lead to the same page (the second URL lead to the first URL in a web browser). I am fairly certain, regardless of whether this is an extractor catching a URL it can't actually handle or not, the errors should not have been thrown, however. If it is indeed an extractor catching a URL it cannot handle, I would recommend having it error out in a more proper way, instead of throwing a trace.
bug
low
Critical
210,436,183
youtube-dl
Download all episodes from stream.cz
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.02.24.1** ### Before submitting an *issue* make sure you have: - [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [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 ### What is the purpose of your *issue*? - [ ] Bug report (encountered problems with youtube-dl) - [x] Site support request (request for adding support for a new site) - [x] Feature request (request for a new functionality) - [ ] Question - [ ] Other --- ### 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**): - Show: https://www.stream.cz/pohadky/krtek Note that **youtube-dl does not support sites dedicated to [copyright infringement](https://github.com/rg3/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free)**. In order for site support request to be accepted all provided example URLs should not violate any copyrights. --- ### Description of your *issue*, suggested solution and other information Just as the title says. It would be really nice to be able to download all episodes of given show. ``` youtube-dl https://www.stream.cz/pohadky/krtek [debug] System config: [] [debug] User config: [u'-v', u'--console-title'] [debug] Custom config: [] [debug] Command-line args: [u'https://www.stream.cz/pohadky/krtek'] [debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2017.02.24.1 [debug] Python version 2.7.12+ - Linux-4.8.0-40-generic-x86_64-with-Ubuntu-16.10-yakkety [debug] exe versions: ffmpeg 3.0.7-0ubuntu0.16.10.1, ffprobe 3.0.7-0ubuntu0.16.10.1 [debug] Proxy map: {} [generic] krtek: Requesting header WARNING: Falling back on generic information extractor. [generic] krtek: Downloading webpage [generic] krtek: Extracting information ERROR: Unsupported URL: https://www.stream.cz/pohadky/krtek Traceback (most recent call last): File "/home/pitel/bin/youtube-dl/youtube_dl/extractor/generic.py", line 1744, in _real_extract doc = compat_etree_fromstring(webpage.encode('utf-8')) File "/home/pitel/bin/youtube-dl/youtube_dl/compat.py", line 2526, in compat_etree_fromstring doc = _XML(text, parser=etree.XMLParser(target=_TreeBuilder(element_factory=_element_factory))) File "/home/pitel/bin/youtube-dl/youtube_dl/compat.py", line 2515, in _XML parser.feed(text) File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1653, in feed self._raiseerror(v) File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1517, in _raiseerror raise err ParseError: mismatched tag: line 86, column 3 Traceback (most recent call last): File "/home/pitel/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 761, in extract_info ie_result = ie.extract(url) File "/home/pitel/bin/youtube-dl/youtube_dl/extractor/common.py", line 427, in extract ie_result = self._real_extract(url) File "/home/pitel/bin/youtube-dl/youtube_dl/extractor/generic.py", line 2604, in _real_extract raise UnsupportedError(url) UnsupportedError: Unsupported URL: https://www.stream.cz/pohadky/krtek ```
request
low
Critical
210,480,599
youtube-dl
Utime failing worryingly often
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.02.24.1** - [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [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 ### What is the purpose of your *issue*? - [x] Bug report (encountered problems with youtube-dl) --- Last night I let my phone download a list of songs in a JSON file, formatted as ```python { "playlist_name": [ "url_1", "url_2", ... ], ... } ``` Today when I woke up, it was done, but a lot of songs had no duration. The code I used is as follows: ```python import json import youtube_dl as ytdl data = json.load(open("playlists.json")) my_options = { 'format': 'bestaudio/best', 'noplaylist': True, 'audioformat': 'flac', 'quiet':True, 'outtmpl': 'songs/{playlist}/%(title)s.flac' } for playlist, songs in data.items(): opts = my_options.copy() opts['outtmpl'] = opts['outtmpl'].format(playlist=playlist) for song in playlist: with ytdl.YoutubeDL(opts) as ydl: try: ydl.download([song]) # Download all separately in case of errors except ytdl.DownloadError: pass ``` It downloads most songs just fine, with only a few failing due to copyright restrictions and similar. However, a lot of them seem to say `WARNING: Cannot update utime of file`. It seems to me that exactly those files have a duration of zero, and from all 7035 files downloaded this has affected about 3000. Any idea why this has happened?
cant-reproduce,incomplete
low
Critical
210,565,422
go
net/http: support content negotiation
Content negotiation is, roughly, the process of figuring out what content type the response should take, based on an Accept header present in the request. An example might be an image server that figures out which image format to send to the client, or an API that wants to return HTML to browsers but JSON to command line clients. It's tricky to get right because the client may accept multiple content types, and the server may have multiple types available, and it can be difficult to match these correctly. I think this is a good fit for Go standard (or adjacent) libraries because: - there's a formal specification for how it should behave: https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html - it's annoying to implement yourself, correctly; you have to write a mini-parser. - it would take one function to implement, which makes it annoying to import an entire third party library for (assuming you find the right one) I've seen people hack around this in various ways: - checking whether the Accept header contains a certain string - checking for the first matching value, - returning different content types based on the User-Agent - requiring different URI's to get different content. There's a sample implementation here with a pretty good API: https://godoc.org/github.com/golang/gddo/httputil#NegotiateContentType ```go // NegotiateContentType returns the best offered content type for the request's // Accept header. If two offers match with equal weight, then the more specific // offer is preferred. For example, text/* trumps */*. If two offers match // with equal weight and specificity, then the offer earlier in the list is // preferred. If no offers match, then defaultOffer is returned. func NegotiateContentType(r *http.Request, offers []string, defaultOffer string) string ``` `offers` are content-types that the server can respond with, and can include wildcards like `text/*` or `*/*`. `defaultOffer` is the default content type, if nothing in `offers` matches. The returned value never has wildcards. So you'd call it with something like ```go availableTypes := []string{"application/json", "text/plain", "text/html", "text/*"} ctype: = NegotiateContentType(req, availableTypes, "application/json") ``` If the first value in `offers` is `text/*` and the client requests `text/plain`, NegotiateContentType will return `text/plain`. This is why you have to have a default - you can't just return the first value in `offers` because it might include a wildcard. In terms of where it could live, I'm guessing that `net/http` is frozen at this point. Maybe one of the packages in `x/net` would be a good fit? There is also [a similar function for parsing Accept-Language headers in x/text/language](https://godoc.org/golang.org/x/text/language#ParseAcceptLanguage). Open to ideas.
help wanted,Proposal,Proposal-Accepted,NeedsFix
high
Critical
210,583,566
opencv
Incorrect type traits for DMatch/Keypoint
DMatch should not be represented as 4 * int, because it is <int, int, int, float>. Keypoint should not be represented as 7 * float, because this structure contains integers. This problem is worse than with DMatch, because a subset of integer values can be interpreted/mapped as single NaN value. Problem can be observed via FileStorage output. Also default implementation of `DataType` type trait is broken and should not be used by default (it hides potential errors, like "uint" with size=8 bytes). Related #7599
bug,category: core
low
Critical
210,752,858
rust
1.15.1 armhf run-make/relocation-model failed, "relocation [..] against `a local symbol' can not be used [..]; recompile with -fPIC"
Running manually on [abel.debian.org](https://db.debian.org/machines.cgi?host=abel): ~~~~ failures: ---- [run-make] run-make/relocation-model stdout ---- error: make failed status: exit code: 2 command: "make" stdout: ------------------------------------------ make[3]: Entering directory '/home/infinity0/rustc/src/test/run-make/relocation-model' LD_LIBRARY_PATH="/home/infinity0/rustc/armv7-unknown-linux-gnueabihf/test/run-make/relocation-model.stage2-armv7-unknown-linux-gnueabihf:/home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage2/lib:/home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage2/lib:/usr/lib/llvm-3.9/lib:" '/home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage2/bin/rustc' --out-dir /home/infinity0/rustc/armv7-unknown-linux-gnueabihf/test/run-make/relocation-model.stage2-armv7-unknown-linux-gnueabihf -L /home/infinity0/rustc/armv7-unknown-linux-gnueabihf/test/run-make/relocation-model.stage2-armv7-unknown-linux-gnueabihf -C link-args=-Wl,-z,relro -C relocation-model=dynamic-no-pic foo.rs Makefile:4: recipe for target 'all' failed make[3]: Leaving directory '/home/infinity0/rustc/src/test/run-make/relocation-model' ------------------------------------------ stderr: ------------------------------------------ error: linking with `cc` failed: exit code: 1 | = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-L" "/home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage2/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "/home/infinity0/rustc/armv7-unknown-linux-gnueabihf/test/run-make/relocation-model.stage2-armv7-unknown-linux-gnueabihf/foo.0.o" "-o" "/home/infinity0/rustc/armv7-unknown-linux-gnueabihf/test/run-make/relocation-model.stage2-armv7-unknown-linux-gnueabihf/foo" "-Wl,--gc-sections" "-pie" "-nodefaultlibs" "-L" "/home/infinity0/rustc/armv7-unknown-linux-gnueabihf/test/run-make/relocation-model.stage2-armv7-unknown-linux-gnueabihf" "-L" "/home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage2/lib/rustlib/armv7-unknown-linux-gnueabihf/lib" "-Wl,-Bstatic" "-Wl,-Bdynamic" "/home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage2/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libstd-570da8f8.rlib" "/home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage2/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/librand-570da8f8.rlib" "/home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage2/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libpanic_unwind-570da8f8.rlib" "/home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage2/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libcollections-570da8f8.rlib" "/home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage2/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/liballoc-570da8f8.rlib" "/home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage2/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/liballoc_jemalloc-570da8f8.rlib" "/home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage2/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libunwind-570da8f8.rlib" "/home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage2/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/liblibc-570da8f8.rlib" "/home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage2/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libstd_unicode-570da8f8.rlib" "/home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage2/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libcore-570da8f8.rlib" "/home/infinity0/rustc/armv7-unknown-linux-gnueabihf/stage2/lib/rustlib/armv7-unknown-linux-gnueabihf/lib/libcompiler_builtins-570da8f8.rlib" "-l" "dl" "-l" "pthread" "-l" "pthread" "-l" "gcc_s" "-l" "c" "-l" "m" "-l" "rt" "-l" "util" "-Wl,-z,relro" = note: /usr/bin/ld: /home/infinity0/rustc/armv7-unknown-linux-gnueabihf/test/run-make/relocation-model.stage2-armv7-unknown-linux-gnueabihf/foo.0.o: relocation R_ARM_MOVW_ABS_NC against `a local symbol' can not be used when making a shared object; recompile with -fPIC /home/infinity0/rustc/armv7-unknown-linux-gnueabihf/test/run-make/relocation-model.stage2-armv7-unknown-linux-gnueabihf/foo.0.o: error adding symbols: Bad value collect2: error: ld returned 1 exit status error: aborting due to previous error make[3]: *** [all] Error 101 ~~~~
O-Arm,T-compiler,C-bug
low
Critical
210,758,933
youtube-dl
I cannot download playlist of Tutsplus Tutorials
Why youtube-dl does not work in tutsplus for downloading the whole course. it just download the first video. I think it only grabs the preview video of any course and it does not go through the playlist
site-support-request,account-needed
low
Major
210,805,408
youtube-dl
Support converting multilingual TTML to srt
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2017.02.27** - [x] At least skimmed through [README](https://github.com/rg3/youtube-dl/blob/master/README.md) and **most notably** [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 ### What is the purpose of your *issue*? - [ ] Bug report (encountered problems with youtube-dl) - [ ] Site support request (request for adding support for a new site) - [x] Feature request (request for a new functionality) - [ ] Question - [ ] Other --- ``` $ youtube-dl -v --write-sub --convert-subs srt test:daisuki [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['-v', '--write-sub', '--convert-subs', 'srt', 'test:daisuki'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2017.02.27 [debug] Git HEAD: 7c4aa6fd6 [debug] Python version 3.6.0 - Linux-4.10.1-1-ARCH-x86_64-with-arch [debug] exe versions: ffmpeg 3.2.4, ffprobe 3.2.4, rtmpdump 2.4 [debug] Proxy map: {} [TestURL] Test URL: http://www.daisuki.net/tw/en/anime/watch.TheIdolMasterCG.11213.html [Daisuki] 11213: Downloading webpage [Daisuki] 11213: Downloading JSON metadata [Daisuki] 11213: Downloading m3u8 information [info] Writing video subtitles to: #01 Who is in the pumpkin carriage - THE IDOLM@STER CINDERELLA GIRLS-11213.mul.ttml [debug] Invoking downloader on 'https://bngn-vh.akamaihd.net/i/43383936/35470338/smil/TW/00005/454886408824423.smil/index_6000000_av.m3u8?null=0&id=AgCMcBxnoxzgBe+JtVig6tjALsUYU9c4vLlbWNR%2fIjKLjO3tedogpOqsv80VcutRxOme6T2ME6x0%2fQ%3d%3d' [hlsnative] Downloading m3u8 manifest WARNING: hlsnative has detected features it does not support, extraction will be delegated to ffmpeg [download] Destination: #01 Who is in the pumpkin carriage - THE IDOLM@STER CINDERELLA GIRLS-11213.mp4 [debug] ffmpeg command line: ffmpeg -y -headers 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0) Gecko/20150101 Firefox/47.0 (Chrome) Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Encoding: gzip, deflate Accept-Language: en-us,en;q=0.5 Cookie: _alid_=dmV/+lBznv+Bca+is2H0ew==; hdntl=exp=1488378735~acl=%2f*~data=hdntl~hmac=e9d75e91b0278ee8489e785fb97e5f8d2a203dc603fbeae88c22eccbc6be5e63 ' -i 'https://bngn-vh.akamaihd.net/i/43383936/35470338/smil/TW/00005/454886408824423.smil/index_6000000_av.m3u8?null=0&id=AgCMcBxnoxzgBe+JtVig6tjALsUYU9c4vLlbWNR%2fIjKLjO3tedogpOqsv80VcutRxOme6T2ME6x0%2fQ%3d%3d' -c copy -f mp4 'file:#01 Who is in the pumpkin carriage - THE IDOLM@STER CINDERELLA GIRLS-11213.mp4.part' ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 6.3.1 (GCC) 20170109 configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-avresample --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libass --enable-libbluray --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-netcdf --enable-shared --enable-version3 --enable-x11grab libavutil 55. 34.101 / 55. 34.101 libavcodec 57. 64.101 / 57. 64.101 libavformat 57. 56.101 / 57. 56.101 libavdevice 57. 1.100 / 57. 1.100 libavfilter 6. 65.100 / 6. 65.100 libavresample 3. 1. 0 / 3. 1. 0 libswscale 4. 2.100 / 4. 2.100 libswresample 2. 3.100 / 2. 3.100 libpostproc 54. 1.100 / 54. 1.100 [NULL @ 0x562846175960] non-existing SPS 0 referenced in buffering period [NULL @ 0x562846175960] SPS unavailable in decode_picture_timing [h264 @ 0x56284624b520] non-existing SPS 0 referenced in buffering period [h264 @ 0x56284624b520] SPS unavailable in decode_picture_timing Input #0, hls,applehttp, from 'https://bngn-vh.akamaihd.net/i/43383936/35470338/smil/TW/00005/454886408824423.smil/index_6000000_av.m3u8?null=0&id=AgCMcBxnoxzgBe+JtVig6tjALsUYU9c4vLlbWNR%2fIjKLjO3tedogpOqsv80VcutRxOme6T2ME6x0%2fQ%3d%3d': Duration: 00:24:00.00, start: 0.100667, bitrate: 0 kb/s Program 0 Metadata: variant_bitrate : 0 Stream #0:0: Video: h264 (High) ([27][0][0][0] / 0x001B), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 23.98 fps, 23.98 tbr, 90k tbn, 47.95 tbc Metadata: variant_bitrate : 0 Stream #0:1: Audio: aac (LC) ([15][0][0][0] / 0x000F), 48000 Hz, stereo, fltp Metadata: variant_bitrate : 0 Output #0, mp4, to 'file:#01 Who is in the pumpkin carriage - THE IDOLM@STER CINDERELLA GIRLS-11213.mp4.part': Metadata: encoder : Lavf57.56.101 Stream #0:0: Video: h264 (High) ([33][0][0][0] / 0x0021), yuv420p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], q=2-31, 23.98 fps, 23.98 tbr, 90k tbn, 90k tbc Metadata: variant_bitrate : 0 Stream #0:1: Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, stereo Metadata: variant_bitrate : 0 Stream mapping: Stream #0:0 -> #0:0 (copy) Stream #0:1 -> #0:1 (copy) Press [q] to stop, [?] for help frame=34525 fps=347 q=-1.0 Lsize= 845745kB time=00:23:59.97 bitrate=4811.4kbits/s speed=14.5x video:811849kB audio:33986kB subtitle:0kB other streams:0kB global headers:1kB muxing overhead: unknown Exception ignored in: <_io.FileIO name=6 mode='wb' closefd=True> ResourceWarning: unclosed file <_io.BufferedWriter name=6> [ffmpeg] Downloaded 866043111 bytes [download] 100% of 825.92MiB [download] 100% of 825.92MiB [debug] ffmpeg command line: ffprobe -show_streams 'file:#01 Who is in the pumpkin carriage - THE IDOLM@STER CINDERELLA GIRLS-11213.mp4' [ffmpeg] Fixing malformated aac bitstream in "#01 Who is in the pumpkin carriage - THE IDOLM@STER CINDERELLA GIRLS-11213.mp4" [debug] ffmpeg command line: ffmpeg -y -i 'file:#01 Who is in the pumpkin carriage - THE IDOLM@STER CINDERELLA GIRLS-11213.mp4' -c copy -f mp4 -bsf:a aac_adtstoasc 'file:#01 Who is in the pumpkin carriage - THE IDOLM@STER CINDERELLA GIRLS-11213.temp.mp4' [ffmpeg] Converting subtitles WARNING: You have requested to convert dfxp (TTML) subtitles into another format, which results in style information loss Deleting original file #01 Who is in the pumpkin carriage - THE IDOLM@STER CINDERELLA GIRLS-11213.mul.ttml (pass -k to keep) ``` --- - Single video: ```test:daisuki``` Note that **youtube-dl does not support sites dedicated to [copyright infringement](https://github.com/rg3/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free)**. In order for site support request to be accepted all provided example URLs should not violate any copyrights. --- ### Description of your *issue*, suggested solution and other information test:daisuki has a TTML subtitle http://bngnwww.b-ch.com/caption/35470338/1206/275503087581916/0817102633.xml. It contains multiple languages: ``` <div xml:lang="English"> <p begin="00:00:08.690" end="00:00:12.150" style="1"> It was just a little while ago... </p> ... </div> <div xml:lang="Korean"> <p begin="00:00:08.519" end="00:00:12.078" style="1"> μ–Όλ§ˆ μ „κΉŒμ§€ μš°λ¦¬λŠ” </p> ... </div> ``` Seems SRT does not support multiple languages in the same file? If so ```dfxp2srt``` should return a lang => subtitle dictionary and ```FFmpegSubtitlesConvertorPP``` need to handle multiple files. Ref: #4738
request,postprocessors,subtitles
low
Critical
210,892,165
go
os: Process.Signal on the current PID should signal the current thread
The Go standard library currently lacks an equivalent to the standard C `raise` function. The closest portable analogue is something like: ```go func raise(sig os.Signal) error { p, err := os.FindProcess(os.Getpid()) if err != nil { return err } return p.Signal(sig) } ``` Unfortunately, this pattern is somewhat error-prone: on many platforms (e.g. Linux), it can deliver the signal to any thread in the process group. If the purpose of raising the signal is to produce a stack trace or trigger the invocation of a C fatal-signal handler (e.g. by raising `SIGQUIT` or `SIGABRT`), that can result in the handler executing on a thread unrelated to the failure. It's tempting to request a new function call, `os.Raise`, for this purpose, but it seems like we could address this use-case automatically without an API change. We could have `(*os.Process).Signal` check whether the `Process` in question is the Go program itself and raise the signal synchronously to the current thread (e.g. by using the `tgkill` syscall on Linux, or calling `pthread_kill` or `raise` in cgo-enabled builds).
NeedsDecision
low
Critical
210,894,570
go
x/build/cmd/coordinator: report pkg/bin changes, binary size changes
It would be helpful when reviewing changes, particularly toolchain changes, to be able to easily see which pkg/bin files have changed since the parent commit--an easy reviewer's toolstash -cmp. It'd also be nice to have an automated report about the pkg/bin file size changes. Could we cheaply/easily add this information to the trybot final report? cc @bradfitz
Builders,NeedsInvestigation,FeatureRequest
low
Minor
210,954,541
TypeScript
Dom d.ts does not define event.target.parentNode
_From @linocatucci on February 28, 2017 19:25_ - VSCode Version: Code 1.9.1 (f9d0c687ff2ea7aabd85fb9a43129117c0ecf519, 2017-02-08T23:31:51.320Z) - OS Version: Darwin x64 16.4.0 - Extensions: |Extension|Author|Version| |---|---|---| |beautify|HookyQR|0.8.8| |jslint|ajhyndman|1.2.1| |jshint|dbaeumer|0.10.15| |vscode-eslint|dbaeumer|1.2.6| |githistory|donjayamanne|0.1.5| |auto-close-tag|formulahendry|0.3.9| |vscode-JS-CSS-HTML-formatter|lonefy|0.2.2| |vscode-icons|robertohuertasm|7.3.0| |open-in-browser|techer|0.0.3| --- Hello, with some code in VSCode the autocomplete and hints are not working. For instance with the following codeL `console.log(event.target.parentNode); ` Visual studio code does not show the options when I type in `event.target.ParentNode` or with `event.target. ` Can somebody help me? cheers, Lino Steps to Reproduce: 1. type in console.log(event.target.p -> parentNode is expected 2.type in event.ta -> target is expected. _Copied from original issue: Microsoft/vscode#21570_
Bug,Help Wanted,Domain: lib.d.ts,VS Code Tracked
low
Major
210,954,713
go
go/internal/srcimporter: src importer cannot handle re-import
The existing importers go out of their way to augment partially imported packages (types, etc.). A source importer doesn't do that - it uses go/types to always create a new package. If only the source importer is used, then (recursively), any package that is imported somewhere is imported as a whole, so all packages are complete upon import and there's never a need to augment a package. If we want to provide a "mixed-mode" importer, where some packages are imported from installed packages, and some from source, depending on which is newer, the above is not so simple anymore: A package may be imported from an installed location, which in turn may contain partial package information about another package. If that other package is imported from source, it must augment the partial package in the packages map rather than replace it. This matters only for types since they are the only objects that may be used in the construction of other package-level objects - they must be unique. One could expand the go/types API and provide a partially complete package that is then expanded. Or one could do a "full" import and then somehow merge the new with the old package (and update any types that need to be canonicalized - a tricky proposition). Or one could disallow "mixed-mode" imports (currently they are not supported anyway). Needs to be resolved before we can implement mixed-mode imports.
NeedsInvestigation
low
Minor