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
164,770,402
neovim
:connect to another Nvim server (dynamic detach/reattach, like screen/tmux)
With nvim's terminal mode, if it had the ability to detach and reattach, it could serve as a replacement for screen or tmux. This would require a few additional bits: - A `:detach` function, to stop running the text UI and daemonize into a --headless instance that will survive the current user session ending. - A command-line argument to list running nvim instances. - Command-line arguments to attach to a running nvim instance and start the text UI. These need three variations: one that just fails if the session already has an attached text UI, one that detaches any attached text UI first (like `screen -D -R`), and one that attaches without detaching any other attached text UI (like `screen -x`). (That last one is optional, but I'd find it quite useful.) cc @jameysharp
enhancement,gui,ui,tui,server,ui-extensibility
medium
Critical
164,806,808
rust
`#[may_dangle]`, a refined dropck escape hatch (tracking issue for RFC 1327)
Tracking issue for https://github.com/rust-lang/rfcs/pull/1327 - [x] Allow attributes on lifetime/type formal parameters (`generic_param_attrs` feature): https://github.com/rust-lang/rust/pull/34764 - [x] Add `#[may_dangle]` attribute for lifetime/type formal parameters on `unsafe impl<...> Drop` (`dropck_eyepatch` feature) - [x] Replace uses of `#[unsafe_destructor_blind_to_params]` attribute in libstd with `#[may_dangle]` #38664 - [x] Update nomicon to use `#[may_dangle]` instead of `#[unsafe_destructor_blind_to_params]` #39196 - [x] Remove support for `#[unsafe_destructor_blind_to_params]` attribute (with warning cycle before removal). - [x] Deprecated in #38970 - [x] need to replace remaining references (e.g. in test suite) to `#[unsafe_destructor_blind_to_params]` with `[may_dangle]` before we can actually remove the former. For docs explaining the feature, also see [the forge](https://forge.rust-lang.org/libs/maintaining-std.html#is-there-a-manual-drop-implementation).
B-RFC-approved,T-lang,B-unstable,C-tracking-issue,F-dropck_eyepatch,S-tracking-perma-unstable
medium
Critical
164,849,962
godot
When error in script and "Open dominant script on Scene change" is checked, related scene shoud be opened
**Operating system or device - Godot version:** **Issue description** (what happened, and what was expected): Was avoiding to open this issue for a very long time, mostly because I don't feel like a lot of people would benefit from this, but it's coming back to me constantly, so here we go: In general I'm not using script panel to much, it's quite confusing for me. As far as I know for people like me there is an option `Open dominant script on Scene change`, when this option is checked for 90% of time the script you are seeing is the script that is related to opened scene and this is cool. The problem occurs in those remaining 10% of time. The most common case when this happens is simply at the time when there is an error in the script: ![scene_script_relation](https://cloud.githubusercontent.com/assets/6129594/16733524/2e919490-4782-11e6-9c50-b4ee36c89c3b.png) In this example the error is inside the script that is related to SplashNew.tscn scene, but what I'm seeing when I'm looking at tabs is "BaseBall.tscn" and this is confusing me regularly. It would be super nice if Godot could open scene that's linked to script in which error occur. **Steps to reproduce:** **Link to minimal example project** (optional but very welcome):
enhancement,topic:editor,usability
low
Critical
164,854,599
TypeScript
New option to remove spaces around braces: insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces
_From @aymone on July 8, 2016 17:59_ - VSCode Version: 1.3 - OS Version: Ubuntu 16.04 - Language: JS Steps to Reproduce: 1.Create a simple object with functions shorthand like: ``` js const x = { a(){} }; ``` 2.Use VSCode auto format (ctrl+shift+i): ``` js const x = { a(){ } // why vscode add this extra space between braces? }; ``` Any way to disable this? _Copied from original issue: Microsoft/vscode#8965_
Bug,Help Wanted,Domain: Formatter,VS Code Tracked
medium
Critical
164,865,701
vscode
support font-size in DecorationRenderOptions
Feature request: support specifying the font size in `DecorationRenderOptions` and `ThemableDecorationAttachmentRenderOptions`.
feature-request,api,editor-api
medium
Major
164,876,200
flutter
control-C does not exit app on iOS device from `flutter run`
``` Application running. Type "h" or F1 for help and "q", F10, or ctrl-c to quit. Type "w" to print the widget hierarchy of the app, and "t" for the render tree. ^CApplication finished. ``` Seems we should either fix the instructions or fix the behavior. I don't really care which. :)
platform-ios,tool,P3,team-ios,triaged-ios
low
Major
164,914,484
TypeScript
Strict null checks for Map members
<!-- 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.0.0-beta **Code** ``` ts export interface INode { type: string; parentNode?: INode; } export interface IIdentifierNode extends INode { name: string; } public static isIdentifierNode (node: INode): node is IIdentifierNode { return node.type === NodeType.Identifier; } var namesMap = new Map<string, string>(); // main part if (Nodes.isIdentifierNode(node) && namesMap.has(node.name)) { node.name = namesMap.get(node.name); //`Type 'string | undefined' is not assignable to type 'string'.` } ``` **Expected behavior:** No errors **Actual behavior:** `Type 'string | undefined' is not assignable to type 'string'.` Looks like here no TypeGuards for Maps?
Suggestion,Needs Proposal
high
Critical
164,953,760
TypeScript
Sourcemap - names array empty for all files
**TypeScript Version:** 1.8.34.0 **Module System:** AMD **ECMAScript Version:** ECMAScript 5 **VS 2015 Update 3** All of my map files have the names array empty. I would expect that to have been populated. This has been an issue with VS2015 with all updates **Code** ``` ts class HomeIndex { someVar: number; constructor() { this.someVar = 0; } onLoad = () => { }; dispose() { }; } export = HomeIndex; ``` Generated map ``` js { "version": 3, "file": "Index.js", "sourceRoot": "", "sources": [ "Index.ts" ], "names": [], "mappings": ";;IAAA;QAII;YAIA,WAAM,GAAG;YACT,CAAC,CAAC;YAJE,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;QACrB,CAAC;QAKD,2BAAO,GAAP;QACA,CAAC;;QAEL,gBAAC;IAAD,CAAC,AAdD,IAcC;IAED,OAAS,SAAS,CAAC" } ``` **Expected behavior:** names array should contain values for members and variables **Actual behavior:** names array empty
Suggestion,Help Wanted,Experience Enhancement
high
Critical
164,997,041
You-Dont-Know-JS
es6 & beyond: ch2, fix inline code snippet to be less confusing
This text: "...with the `config.options.enable` assignment references." Change that to "...with the `config.options.XYZ` assignment references."
for second edition
medium
Minor
165,043,655
react
Attributes and properties for Custom Components
**Do you want to request a _feature_ or report a _bug_?** Feature **What is the current behavior?** Custom component's properties are always set as attribute. **What is the expected behavior?** Maybe React should watch at the static `observedAttributes` property for custom elements (https://w3c.github.io/webcomponents/spec/custom/) and then decide to set an attribute or an instance property. Otherwise, objects and array could be always passed as properties, in order to avoid `<custom-element prop="[object Object]"></custom-element>`.
Type: Feature Request,Component: DOM
high
Critical
165,068,045
vscode
Double click after curly brace to select the content
This is a feature-request. A common use case for me in Eclipse, is to double click on the right after a brace or a curly brace, to select all the content inside it. It's a fast way to select, indent, remove the content. It's a lot more handy to see the ending curly brace (especially for JS and other functionnally langugage). ![www gifcreator me_zovlan](https://cloud.githubusercontent.com/assets/3749428/16766721/07e53fda-483c-11e6-91dd-f108628db010.gif)
feature-request,editor-bracket-matching
medium
Major
165,070,163
TypeScript
Suggestion: should non-null assert propagate?
I was wondering whether `!` should be taken into account by the dataflow analysis, and I don't see why it shouldn't. It is like a cast that says "this value is not null", so from this point I guess the compiler could remove undefined/null from future uses. For example, I use `!` to work around #9631, so I have code that looks like (simplified): ``` ts protected dataArrayChanged(changes: ChangeRecord[]) { // #9631: TS incorrectly infers `change: ChangeRecord | undefined` for (const change of changes) { for (let i = 0; i < change!.removed.length; i++) this.dt.row(i).remove(); if (change!.addedCount > 0) this.dt.rows.add(this.data.slice(change!.index, change!.index + change!.addedCount)); } this.dt.draw(); } ``` Observe how I added 5 `!` to make `change` not null. The first one could have been enough. After all, once I say "`change` is not `undefined`", there is no reason to assume it could be until I modify the variable again. ``` ts // Let's say I know x is not undefined const x: number | undefined; // Here x: number | undefined, so x! is required x!.toString(); // Here x: number because of x! above x.toString(); // ok ```
Suggestion,Needs Proposal
medium
Major
165,130,384
neovim
Replace the builtin pager
- `nvim --version`: NVIM 0.1.4 ### Actual behaviour When doing e.g. `:map`, nvim uses the old clunky vim pager. Which cannot, for instance, _search text._ ### Expected behaviour Totally open - I'd be happy with `:terminal less` or putting the text-to-be-paged into a readonly temporary buffer so that I can stay in Vim interfaces. ### Steps to reproduce using `nvim -u NORC` 1. `runtime mappings.vim` 2. `:map` 3. Try to find the mapping you established years ago to bump the foldlevel 4. Despair
enhancement,ui,pager
medium
Critical
165,179,635
TypeScript
String methods should have `this` parameters in `lib.d.ts`
``` ts // @noImplicitThis: true String.prototype.indexOf = function(substr, start) { this./**/ } ``` Expected: Method suggestions. No error. Actual: Nothing. `this: any` error. Other types in lib.d.ts should probably also have `this` added too.
Suggestion,Help Wanted
low
Critical
165,250,541
go
cmd/asm: a flag to dump Prog initialization as Go code
When writing code for compiler backends, we sometimes need to manual create assembly instructions by initializing `cmd/internal/obj.Prog` structs directly. Even though the revamped `Addr` types makes the task much easier than it was, the process is still very error-prone and any mistakes made there is pretty hard to diagnose. I propose that we add an internal mode to cmd/asm that instead of dumping .o object file, it prints the required Prog initialization code to stdout. I first discussed this with @cherrymui and we both liked the idea. Ideally, the new mode should be able to accept instruction either from stdin, or better, from command line, so it is easier to use from within an editor. This mode might also serve as documentation for mapping instructions to Prog. /cc @robpike @randall77 @ianlancetaylor
Proposal,Proposal-Accepted,compiler/runtime
low
Critical
165,278,377
gin
Custom BindWith error managing
Hello @danslimmon, @DennyLoko, @sidbusy, @stxml, @dgsi, @kongfei605, @LeBronoMars and @tsirolnik, First of all, sorry for delay in answering, I was just a little bit busy with university (final exams). Regarding all the following issues (#629, #633, #636, https://github.com/danslimmon/gin/pull/1 and #661), here is what I suggest: - Because Gin now has the API frozen (doesn't allow breaking changes in functions or behavior), I can't change the behavior of `c.BindWith()` (#661, @sidbusy), however I like the idea, so keep reading. - I'll review and merge the PR #633 with the fix https://github.com/danslimmon/gin/pull/1 (@danslimmon, @DennyLoko). - I propose to add two function/aliases called: - `c.ShouldBindWith()` implementing #661, which will allow custom error managment. - `c.MustBindWith()` being an alias of `c.BindWith()` and soft deprecating the last one (just a message via `fmt.Println`), for a future change of behavior, by moving `c.ShouldBindWith()` back to `c.BindWith()`. Because I'm not a native english speaker, maybe the naming of the two new proposed functions sound strange or completely wrong, so I'm open to suggestion about this, and also about everything else in this message. Hope I did explained correctly. Tell me your thoughts.
enhancement
low
Critical
165,317,028
vscode
Offer code mark styles and gutter marks
_From @darkred on July 10, 2016 23:30_ _(Using VSCode 1.3.0 in win 10 x64 build 10586 with vscode-eslint extension 1.10.18)._ Currently the code marks(for errors and warnings) appear only as squiggly underline (i.e. as **spellchecker errors** in browsers, e.g. Firefox, Chrome): _(the error is in red, and the warning is in green)_ ![2016-07-11_020259](https://cloud.githubusercontent.com/assets/723651/16716650/b635a444-470b-11e6-82fc-90770e8bea05.png) My suggestion is to offer more code mark styles (ideally the **outline** style, as it highlights the errors/warnings the best way -see below- ) and **gutter marks** : _(with the errors to be in red, and the warnings to be in yellow, as ESLint itself uses these colors - not green)_ ![2016-07-11_020203](https://cloud.githubusercontent.com/assets/723651/16737733/59dedc70-479b-11e6-8da9-0789ade17143.png) ([here is another screenshot](https://sublimelinter.readthedocs.io/en/latest/_images/marks-outline-dark.png)) It's more easy to distinguish the errors this way. Thank you --- _For reference SublimeLinter3 package offers [five different code mark styles](https://sublimelinter.readthedocs.io/en/latest/mark_styles.html) :_ - fill, - outline _(the default style)_, - solid underline, - squiggly underline, and - stippled underline _and two types of gutter marks:_ - errors, and - warnings _Copied from original issue: Microsoft/vscode-eslint#99_
feature-request,ux
high
Critical
165,337,611
opencv
Invalid YML when storing strings containing control characters
### Please state the information for your system - OpenCV version: 3.1 ### In which part of the OpenCV library you got the issue? - persistence ### Expected behaviour Strings containing only FileStorage control characters like `[` or `{` should be correctly (de)serializable, below code should generate: ``` %YAML:1.0 key0: "[]" key1: "{}" key2: "some [text]" key3: "some {text}" key4: " {}" ``` ### Actual behaviour The control characters are interpreted. The file generated by the code below looks like this: ``` %YAML:1.0 key0: !!] - key1 - !!} key2: "some [text]" key3: "some {test}" key4: " {}" ``` ### Additional description ### Code example to reproduce the issue / Steps to reproduce the issue Please try to give a full example which will compile as is. ``` #include <opencv2/core.hpp> #include <iostream> //Below code will become a TEST later on #define EXPECT_NO_THROW(x) x #define ASSERT_STREQ(x,y) if(std::string(x) != std::string(y)) { std::cerr << "ERROR: " << x << "!=" << y << "." << std::endl;} int main(int argc, char **argv) { cv::FileStorage f("dummy.yml", cv::FileStorage::WRITE | cv::FileStorage::MEMORY); const int valueCount = 5; std::string values[5] = { "[]", "{}", "some [text]", "some {test}", " {}" }; for (size_t i = 0; i < valueCount; i++) { EXPECT_NO_THROW(f << cv::format("key%d", i) << values[i]); } cv::String serialized = f.releaseAndGetString(); std::cout << serialized << std::endl << std::endl; cv::FileStorage f2(serialized, cv::FileStorage::READ | cv::FileStorage::MEMORY); std::string valuesRead[valueCount]; for (size_t i = 0; i < valueCount; i++) { EXPECT_NO_THROW(f2[cv::format("key%d", i)] >> valuesRead[i]); ASSERT_STREQ(values[i].c_str(), valuesRead[i].c_str()); } return 0; } //main ```
bug,category: core,RFC
low
Critical
165,353,527
java-design-patterns
Asynchronous Retry pattern
**Description:** The Asynchronous Retry design pattern is aimed at handling transient failures in a reliable and efficient manner. This pattern allows an application to retry an operation asynchronously, ensuring that the application does not block waiting for an operation to complete. This is particularly useful in distributed systems where transient faults are common. **Main Elements of the Pattern:** 1. **Retry Logic:** Define a retry mechanism that can handle transient failures. This should include a backoff strategy to prevent overwhelming the system. 2. **Asynchronous Execution:** Implement the retry logic in a way that allows the application to continue executing other tasks while waiting for the retries to complete. 3. **Callback Mechanism:** Provide a way to notify the application when the operation either succeeds or exhausts all retry attempts. 4. **Configuration:** Allow configuration of retry parameters such as the number of attempts, delay between retries, and the backoff strategy. 5. **Error Handling:** Implement proper error handling to manage the final outcome if all retry attempts fail. **References:** - [Project Contribution Guidelines](https://github.com/iluwatar/java-design-patterns/wiki) - [Asynchronous Retry Pattern Overview](https://dzone.com/articles/asynchronous-retry-pattern) **Acceptance Criteria:** 1. Implement a robust and configurable asynchronous retry mechanism with support for various backoff strategies. 2. Ensure that the application can continue executing other tasks while the retry mechanism is in progress. 3. Provide a callback mechanism to handle the success or failure of the retried operation, including proper error handling for failed attempts.
info: help wanted,epic: pattern,type: feature
low
Critical
165,374,232
youtube-dl
Request Support for https://open.hpi.de/
## 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 _2016.07.13_. 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 **2016.07.13** ### 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) - [ ] Feature request (request for a new functionality) - [ ] Question - [ ] Other --- ### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your _issue_ --- ### 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 -v <your command line> [debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj'] [debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251 [debug] youtube-dl version 2016.07.13 [debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2 [debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4 [debug] Proxy map: {} ... <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: https://www.youtube.com/watch?v=BaW_jenozKc - Single video: https://youtu.be/BaW_jenozKc - Playlist: https://www.youtube.com/playlist?list=PL4lCao7KL_QFVb7Iudeipvc2BCavECqzc --- ### Description of your _issue_, suggested solution and other information Explanation of your _issue_ in arbitrary form goes here. Please make sure the [description is worded well enough to be understood](https://github.com/rg3/youtube-dl#is-the-description-of-the-issue-itself-sufficient). Provide as much context and examples as possible. If work on your _issue_ required an account credentials please provide them or explain how one can obtain them.
account-needed
low
Critical
165,390,329
go
proposal: Add an x/media package
# The Proposal Golang has an `x/image` "extension" library. Adding an `x/media` package for parsing video and audio transports (and possibly codecs) seems a logical extension. Interacting with media is an extremely common task today, having this as part of the standard library would probably be beneficial for all. # Proposed Implementation We at Comcast have recently open sourced our [aac parser](https://github.com/Comcast/gaad). We also are looking to open source our parsers for h.264, h.265, DD, DD+, and MPEG2-TS. We would like to work with the go community to make them available in a golang extensions package. These parsers are currently only for the framing and transports, not the actual decoding. ## Similar Items It appears the `x/image` has some ability to deal with the vp8 codec, but doesn't appear to deal with framing of any sort.
Proposal,Proposal-Hold
medium
Major
165,404,088
TypeScript
Typescript type annotations as comments
Typescript’s goal is simply be Javascript + Types. There are many use cases where one might want to use the excellent typechecker but not really have any emit stage. Projects already written in javascript work with allowJS. Typescript already supports parsing types from jsdoc comments. What would be really awesome is just comment annotating your javascript with types and the project gets the benefit of being type checked. This could be a boon for a lot of existing javascript projects. Getting intellisense, VSCode typechecking on the fly and a lot of language server awesomeness. e.g. ``` /// <reference path="..." /> class Hello { /*:: private*/ hello(message /*: string*/) /*: Promise<{}>*/{ const promise /*: Promise<void>*/ = null return /*:: <Promise<{}>>*/ null; } } ``` i.e /_: [type] */ /_:: [tscode] */
Suggestion,Needs Proposal,Domain: JavaScript
high
Critical
165,457,272
rust
Wrapping<_> implements ShX<usize> but wrapping_shX takes u32
This is mostly just slightly confusing. [`impl ShX for Wrapping<_>`](https://github.com/rust-lang/rust/blob/61d3b263a793b390f6231f08d862e8c71d04e3ef/library/core/src/num/wrapping.rs#L188-L205) (the code refers to #23545, I'm not sure how this is related). [`wrapping_shX`](https://github.com/rust-lang/rust/blob/master/src/libcore/num/mod.rs#L816-864)
T-libs-api,C-bug
low
Minor
165,462,210
youtube-dl
Feature request: "-v" reports the actual selected format
## 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 _2016.07.13_. 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 **2016.07.13** ### 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) - [ ] Site support request (request for adding support for a new site) - [ x] Feature request (request for a new functionality) - [ ] Question - [ ] Other --- "-v" does not currently report what format was selected. It would be nice if it did. All I get right now is ``` [debug] Invoking downloader on u'https://r6---sn-a5meknee.googlevideo.com/videoplayback/id/c7446f8d75c579c9/itag/135/source/yt_otf/requiressl/yes/initcwndbps/430000/pl/21/nh/IgpwcjAxLmxheDE2KgkxMjcuMC4wLjE/mn/sn-a5meknee/mm/31/ms/au/mv/m/ratebypass/yes/mime/video%2Fmp4/otfp/1/otf/1/lmt/1465968767332073/key/dg_yt0/mt/1468462601/signature/576BFF6BA424965A3211CB2BE907DD43D27D5AF8.5CE0AC5B1DF1B9B45CA0ED1CA1DDAA5FF71020D6/upn/ObSsecJ6LH4/sver/3/fexp/9407157,9413138,9416126,9416891,9419451,9422596,9424134,9428398,9429856,9431012,9433096,9433380,9433946,9435526,9435876,9435922,9436635,9437066,9437078,9437552,9437742,9438663,9438731,9439601,9439652,9440364,9440376/ip/108.192.89.65/ipbits/0/expire/1468484485/sparams/ip,ipbits,expire,id,itag,source,requiressl,initcwndbps,pl,nh,mn,mm,ms,mv,ratebypass,mime,otfp,otf,lmt/' [dashsegments] Total fragments: 1093 ```
request
low
Critical
165,523,413
TypeScript
Way of specifying non-enumerable properties
Object assign is defined like below in TS: ``` ts interface ObjectConstructor { /** * Copy the values of all of the enumerable own properties from one or more source objects to a * target object. Returns the target object. * @param target The target object to copy to. * @param source The source object from which to copy properties. */ assign<T, U>(target: T, source: U): T & U; } ``` Though from MDN it is only copying members that are enumerable: > The Object.assign() method is used to copy the values of all enumerable own properties from one or more source objects to a target object. It will return the target object. So if `U` above has non-enumerable members, TS will copy them anyway. This is slightly incorrect and unsafe. One issue I recently ran into was ``` ts const selection = Object.assign({}, window.getSelection()); ``` I was assuming I was copying all members of the `Selection` object to `{}`: ``` ts interface Selection { readonly anchorNode: Node; readonly anchorOffset: number; // etc ... } declare var Selection: { prototype: Selection; new(): Selection; } ``` Though it didn't copy any members at all, because the `Selection` object only contains non-enumerable members. ## Proposal Mark properties as non-enumerable ``` ts interface Selection { readonly nonenum anchorNode: Node; readonly nonenum anchorOffset: number; // etc ... } ``` And have an operator to get the only "enum side" of a type: ``` ts interface ObjectConstructor { /** * Copy the values of all of the enumerable own properties from one or more source objects to a * target object. Returns the target object. * @param target The target object to copy to. * @param source The source object from which to copy properties. */ assign<T, U>(target: T, source: U): T & enumsof U; } ```
Suggestion,Awaiting More Feedback
high
Critical
165,549,671
go
go/printer: confusing indentation for nested structs
Please answer these questions before submitting your issue. Thanks! 1. What version of Go are you using (`go version`)? go version go1.6.1 linux/amd64 2. What operating system and processor architecture are you using (`go env`)? GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="" GORACE="" GOROOT="/usr/lib/google-golang" GOTOOLDIR="/usr/lib/google-golang/pkg/tool/linux_amd64" GO15VENDOREXPERIMENT="1" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -gno-record-gcc-switches -fdebug-prefix-map=/tmp/go-build255917305=/tmp/go-build" CXX="g++" CGO_ENABLED="1" 3. What did you do? Run `gofmt` on a file containing this code, that has confusing indention ``` tests := []struct { name string input *StructA want string }{ {"empty", &StructA{ NestedB: &StructB{}, }, // <- Confusion indention "", // <- Confusion indention }, } ``` 1. What did you expect to see? The indention was changed to something less confusing. 2. What did you see instead? The indention is what gofmt intends, even though it is confusion.
NeedsInvestigation
medium
Critical
165,562,784
vscode
User configurable menus
We now allows extension writer to contribute menu items. The next logical step is to allow user to configure their menus - this is analog to the keybindings-story. One idea is to have a `menus.json` file which defines your menus: ``` json { "editor/context": [ { "command": "my command", "when": "editorHasSelection" }, { // more.. } ], "explorer/context": [ // more ... ] } ```
feature-request,api,menus
high
Critical
165,600,589
youtube-dl
Site request: Dish anywhere / sling player
## 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 _2016.07.13_. 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 **2016.07.13** ### 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) - [ ] Feature request (request for a new functionality) - [ ] Question - [ ] Other --- ### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your _issue_ --- ### 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 ```): ``` keybounceMBP:Keybounce michael$ youtube-dl -v "http://www.dishanywhere.com/shows/marvels_ultimate_spiderman_vs_the_sinister _6_p136571346?tab=dvr" [debug] System config: [] [debug] User config: [u'-o', u'%(title)s.%(ext)s', u'-f', u'\nbest[ext=mp4][height>431][height<=719]/\nbestvideo[ext=mp4][height=480]+bestaudio[ext=m4a]/\nbest[ext=mp4][height>340][height<=431]/\nbestvideo[ext=mp4][height>360][height<=576]+bestaudio/\nbest[height>340][height<=576]/\nbestvideo[height>360][height<=576]+bestaudio/\nbestvideo[height=360]+bestaudio/\nbest[ext=mp4][height>=280][height<=360]/\nbest[height<=576]/\nworst', u'--write-sub', u'--embed-subs', u'--recode-video', u'mp4', u'--mark-watched'] [debug] Command-line args: [u'-v', u'http://www.dishanywhere.com/shows/marvels_ultimate_spiderman_vs_the_sinister_6_p136571346?tab=dvr'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2016.07.13 [debug] Python version 2.7.5 - Darwin-13.4.0-x86_64-i386-64bit [debug] exe versions: ffmpeg 3.1.1, ffprobe 3.1.1, rtmpdump 2.4 [debug] Proxy map: {} [generic] marvels_ultimate_spiderman_vs_the_sinister_6_p136571346?tab=dvr: Requesting header WARNING: Falling back on generic information extractor. [generic] marvels_ultimate_spiderman_vs_the_sinister_6_p136571346?tab=dvr: Downloading webpage [generic] marvels_ultimate_spiderman_vs_the_sinister_6_p136571346?tab=dvr: Extracting information ERROR: Unsupported URL: http://www.dishanywhere.com/shows/marvels_ultimate_spiderman_vs_the_sinister_6_p136571346?tab=dvr Traceback (most recent call last): File "/Users/michael/bin/youtube-dl/youtube_dl/extractor/generic.py", line 1565, in _real_extract doc = compat_etree_fromstring(webpage.encode('utf-8')) File "/Users/michael/bin/youtube-dl/youtube_dl/compat.py", line 2525, in compat_etree_fromstring doc = _XML(text, parser=etree.XMLParser(target=_TreeBuilder(element_factory=_element_factory))) File "/Users/michael/bin/youtube-dl/youtube_dl/compat.py", line 2514, in _XML parser.feed(text) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed self._raiseerror(v) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror raise err ParseError: not well-formed (invalid token): line 40, column 724 Traceback (most recent call last): File "/Users/michael/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 681, in extract_info ie_result = ie.extract(url) File "/Users/michael/bin/youtube-dl/youtube_dl/extractor/common.py", line 347, in extract return self._real_extract(url) File "/Users/michael/bin/youtube-dl/youtube_dl/extractor/generic.py", line 2282, in _real_extract raise UnsupportedError(url) UnsupportedError: Unsupported URL: http://www.dishanywhere.com/shows/marvels_ultimate_spiderman_vs_the_sinister_6_p136571346?tab=dvr ``` --- ### 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**): Typical playlist (all recorded episodes of a series): http://www.dishanywhere.com/shows/the_late_show_with_stephen_colbert_p136124004?tab=dvr http://www.dishanywhere.com/shows/marvels_ultimate_spiderman_vs_the_sinister_6_p136571346?tab=dvr All on-demand episodes of a show http://www.dishanywhere.com/shows/marvels_ultimate_spiderman_vs_the_sinister_6_p136571346?tab=ondemand Typical specific episodes: On demand: http://www.dishanywhere.com/shows/marvels_ultimate_spiderman_vs_the_sinister_6_p136571346/episodes/4758048/2112288/ Normal recordings: http://www.dishanywhere.com/sling/8008/16789505 NB: This site requires a login, obviously. Less obviously: recordings will either wind up redirecting to local network (if you can talk directly to the recorder) or passing through dish's server (if you are not at home -- firewalls prevent direct contact with the receiver). --- ### Description of your _issue_, suggested solution and other information Explanation of your _issue_ in arbitrary form goes here. Please make sure the [description is worded well enough to be understood](https://github.com/rg3/youtube-dl#is-the-description-of-the-issue-itself-sufficient). Provide as much context and examples as possible. If work on your _issue_ required an account credentials please provide them or explain how one can obtain them.
site-support-request,tv-provider-account-needed
low
Critical
165,618,638
go
cmd/trace: the trace command should not contain hardcoded javascript
Please answer these questions before submitting your issue. Thanks! 1) What version of Go are you using (`go version`)? Latest master 1.7. 2) What operating system and processor architecture are you using (`go env`)? n/a, but darwin/linux amd64. 3) What did you do? I originally tried to use `go tool trace` in 1.6: - found that the bundled catapult trace viewer was so old as to need [a deprecated experimental browser api](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe) - followed the thread from [`misc/trace/README.md`](https://github.com/golang/go/blob/release-branch.go1.6/misc/trace/README.md) - after copying in a newer trace viewer bundle, it turned out that the api had shifted so much that the inline javascript was now broken From there I started hacking on my copy of the go 1.6 source, eventually I got a hold of the 1.7 source and found that at least all of the assets had already been upgraded (now including a polyfill for the ill-fated Object.observe). However the future surface area fur such drift had only increased since 1.6; compare: - before: https://github.com/golang/go/blob/release-branch.go1.6/src/cmd/trace/trace.go#L51 - after: https://github.com/golang/go/blob/master/src/cmd/trace/trace.go#L50 This is truly unfortunate since the only dynamic part of that entire "template" is a URL parameter for the XHR request to load data. 4) What did you expect to see? Principled separation between frontend code and server-side code. 5) What did you see instead? A hardcoded html+javascript "template" (not even an [html/template](https://golang.org/pkg/html/template/) I have a proposed change that I'm working to get into [Gerrit](https://go.googlesource.com) now.
NeedsFix,compiler/runtime
low
Critical
165,669,608
neovim
Echo output in a callback handler
When doing `:call s:test()` manually, it prints two lines. I'd expect the same to happen when called from a callback handler, but then, only the last line is printed (although both get logged in the message history of course). The same happens for all `:echo*` commands. Bug or is there are technical reason? It's as if there's an implicit `:redraw` after each `:echomsg`. ``` vim function! s:test() redraw echomsg 'foo' echomsg 'bar' endfunction " call s:test() call jobstart('true', {'on_exit': function('s:test')}) ```
bug,event-loop,display,messages
low
Critical
165,691,642
youtube-dl
Site Support Request: CBT Nuggets
## 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 _2016.07.13_. 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 **2016.07.13** ### 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) - [ ] Feature request (request for a new functionality) - [ ] Question - [ ] Other --- ### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your _issue_ --- ### If the purpose of this _issue_ is a _site support request_ please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**): - Single video: https://www.cbtnuggets.com/it-training/microsoft-windows-server-2012-training-70-410-r2/1?autoplay=1 - Playlist: https://www.cbtnuggets.com/it-training/microsoft-windows-server-2012-training-70-410-r2 Note: An account with a subscription is required. You can get a 1-week trial with a credit card.
account-needed
low
Critical
165,734,073
rust
Spurious (?) "trait bound not satisfied" with associated type constructors
I’m using the technique mentioned at https://github.com/rust-lang/rfcs/pull/1598/files/8e922c0cede49b0b07ac6fcf29ea736aab29acb9#r68995241 and used at https://github.com/nikomatsakis/nll/blob/master/graph-algorithms/src/lib.rs to have in a trait an associated type constructor that takes a lifetime parameter. rustc 1.12.0-nightly (7ad125c4e 2016-07-11) ``` rust pub trait TypeConstructor<'a> { type BorrowedNamespace; } pub trait SelectorImpl where Self: for<'a> TypeConstructor<'a> { // These two definitions should be equivalent (for `ExampleImpl`), but only the latter compiles. type Namespace: PartialEq + for<'a> PartialEq<<Self as TypeConstructor<'a>>::BorrowedNamespace>; // type Namespace: PartialEq + for<'a> PartialEq<&'a str>; // For illustration: fn get_namespace<'a>(&'a self) -> <Self as TypeConstructor<'a>>::BorrowedNamespace; } pub struct ExampleImpl; impl<'a> TypeConstructor<'a> for ExampleImpl { type BorrowedNamespace = &'a str; } impl SelectorImpl for ExampleImpl { type Namespace = String; fn get_namespace<'a>(&'a self) -> &'a str { unimplemented!() } } ``` ``` rust error: the trait bound `for<'a> std::string::String: std::cmp::PartialEq<<ExampleImpl as TypeConstructor<'a>>::BorrowedNamespace>` is not satisfied [--explain E0277] --> a.rs:22:6 |> 22 |> impl SelectorImpl for ExampleImpl { |> ^^^^^^^^^^^^ help: the following implementations were found: help: <std::string::String as std::cmp::PartialEq> help: <std::string::String as std::cmp::PartialEq<str>> help: <std::string::String as std::cmp::PartialEq<&'a str>> help: <std::string::String as std::cmp::PartialEq<std::borrow::Cow<'a, str>>> note: required by `SelectorImpl` error: aborting due to previous error ``` Since`<ExampleImpl as TypeConstructor<'a>>::BorrowedNamespace` is `&'a str` for any `'a`, I believe the bound `for<'a> std::string::String: std::cmp::PartialEq<<ExampleImpl as TypeConstructor<'a>>::BorrowedNamespace>` is equivalent to `for<'a> std::string::String: std::cmp::PartialEq<&'a str>`, which is the third bound that was found.
A-type-system,E-needs-test,T-compiler,C-bug,T-types
low
Critical
165,811,970
youtube-dl
Support for wenoo.net
## 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 _2016.07.13_. 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 **2016.07.13** ### Before submitting an _issue_ make sure you have: - [ ] 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 --- ### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your _issue_ --- ### 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 -v <your command line> [debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'-v', u'http://www.youtube.com/watch?v=BaW_jenozKcj'] [debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251 [debug] youtube-dl version 2016.07.13 [debug] Python version 2.7.11 - Windows-2003Server-5.2.3790-SP2 [debug] exe versions: ffmpeg N-75573-g1d0487f, ffprobe N-75573-g1d0487f, rtmpdump 2.4 [debug] Proxy map: {} ... <end of log> ``` --- Video link: http://wenoo.net/video/1f1d1d434f90869367a --- Hi there, so there's another successor of Zippcast aside from Vidbit that people have been using to upload videos on to. That site is Wenoo (http://wenoo.net). It's listed under "generic" but does not have a unique scraper, like for the description. Try the example video above and you'll see what I mean.
site-support-request
low
Critical
165,863,580
youtube-dl
[iqiyi] Support videos unavailable on TV (was: Error code:A00110)
I was able to watch , but you can not use YouTubeDL.EXE download file F:\yy\you>youtube-dl.exe http://www.iqiyi.com/v_19rrm8ddgg.html [iqiyi] temp_id: download video page [iqiyi] ba3f3aba19610a46d55734663b8cde23: Downloading JSON metadata ERROR: Unable to load data. Error code: A00110; please report this issue on http s://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 i ts complete output. F:\yy\you>youtube-dl.exe --verbos http://www.iqiyi.com/v_19rrm8ddgg.html [debug] System config: [] [debug] User config: [] [debug] Command-line args: ['--verbos', 'http://www.iqiyi.com/v_19rrm8ddgg.html' ] [debug] Encodings: locale cp936, fs mbcs, out cp936, pref cp936 [debug] youtube-dl version 2016.07.16 [debug] Python version 3.4.4 - Windows-2008ServerR2-6.1.7601-SP1 [debug] exe versions: none [debug] Proxy map: {} [iqiyi] temp_id: download video page [iqiyi] ba3f3aba19610a46d55734663b8cde23: Downloading JSON metadata ERROR: Unable to load data. Error code: A00110; please report this issue on http s://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 i ts complete output. Traceback (most recent call last): File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp46voakwt\bu ild\youtube_dl\YoutubeDL.py", line 682, in extract_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp46voakwt\bu ild\youtube_dl\extractor\common.py", line 347, in extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmp46voakwt\bu ild\youtube_dl\extractor\iqiyi.py", line 356, in _real_extract youtube_dl.utils.ExtractorError: Unable to load data. Error code: A00110; 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.
broken-IE
low
Critical
165,921,803
opencv
HOGDescriptor/Detection produces inconsistent results between CPU and OpenCL implementations
<!-- 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/Itseez/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.0 - Operating System / Platform => Debian testing - Compiler => gcc 5.4 ##### Detailed description We have been using a custom SVM in conjunction with the HOGDescriptor. The system seems to work as intended when run on the CPU (the default code path). Since the HOG is one of the bottlenecks in our applications, we decided to try offload the computation on to the GPU by using the HOG OpenCL kernel (with the new T-API inteterface this was only a few lines of code) - however this has lead to the system no longer working. The system returns zero detections. I've suspected it's related to the SVM and the input images. Since we aren't detecting pedestrians the ratios and image sizes are different from the default The next step was isolating the issue in a small unit test and confirmed that the detector returns different results between OpenCL and the CPU code. The last step was reproducing these inconsistent results using the default SVM. After many iterations I was able to get the default HOG to output different numbers for OpenCL and the CPU code. The attached code demonstrates it. However in the default case this seems to be an extreme edge case that's doesn't come up as readily as with our custom SVM. As you can see I rescale in the put image by the magic number 1.199009. Nonetheless I think it's directly related to our issue. Looking and visually comparing the kernel code to the CPU code is unfortunately a bit too difficult for me, so I'm asking for the community's help with this issue. Is this a known limitation of the OpenCV HOG OpenCL kernel? Is this a bug? Are there restrictions on the dimensions of the SVM and the input image? ##### Steps to reproduce the output will read: ``` locations found by CPU: 1 first location is: x - 349 y - 148 in: 0.28912 seconds locations found by OCL/GPU: 0 ``` You will need the input image called larroquette.png which comes with OpenCV (or OpenCV extras) and modify the imread(..) line accordingly ``` .cpp #include <opencv2/opencv.hpp> #include <opencv2/core/ocl.hpp> #include <chrono> using namespace cv; using namespace std::chrono; main() { cv::HOGDescriptor my_hog_descriptor_on_CPU; std::vector<cv::Rect> found_locations_by_CPU; cv::HOGDescriptor my_hog_descriptor_on_GPU; std::vector<cv::Rect> found_locations_by_OCL; my_hog_descriptor_on_CPU.setSVMDetector( HOGDescriptor::getDefaultPeopleDetector() ); my_hog_descriptor_on_GPU.setSVMDetector( HOGDescriptor::getDefaultPeopleDetector() ); UMat color_image; imread( "[PATH_TO_OPENCV]/opencv-3.0.0/bin/cv/cascadeandhog/images/larroquette.png", 1 ).copyTo(color_image); UMat gray_image; cv::cvtColor(color_image, gray_image, cv::COLOR_BGR2GRAY); auto m_DownSampleRate = 1.1990036;//1.199009; cv::resize(gray_image, gray_image, Size(), 1/m_DownSampleRate, 1/m_DownSampleRate); ocl::setUseOpenCL(false); auto startCPU = high_resolution_clock::now(); my_hog_descriptor_on_CPU.detectMultiScale(gray_image, found_locations_by_CPU, 0.); auto stopCPU = high_resolution_clock::now(); ocl::setUseOpenCL(true); auto startOCL = high_resolution_clock::now(); my_hog_descriptor_on_GPU.detectMultiScale(gray_image, found_locations_by_OCL, 0.); auto stopOCL = high_resolution_clock::now(); std::cout << "locations found by CPU: " << found_locations_by_CPU.size() << std::endl; if( !found_locations_by_CPU.empty() ) { std::cout << "first location is: x - " << found_locations_by_CPU.begin()->x << " y - " << found_locations_by_CPU.begin()->y << " in: " <<duration_cast<duration<double>>(stopCPU - startCPU).count() << " seconds" << std::endl; } std::cout << "locations found by OCL/GPU: " << found_locations_by_OCL.size() << std::endl; if( !found_locations_by_OCL.empty() ) { std::cout << "first location is: x - " << found_locations_by_OCL.begin()->x << " y - " << found_locations_by_OCL.begin()->y << " in: " <<duration_cast<duration<double>>(stopOCL - startOCL).count() << " seconds" << std::endl; } return 0; } ```
bug,category: objdetect,affected: 3.4,category: t-api
low
Critical
165,925,771
godot
RigidBody and RigidBody2D ignore scaling on runtime
**Operating system or device - Godot version:** Mageia 6 x64, Godot 2.0.4.1 and master HEAD. **Issue description** (what happened, and what was expected): RigidBody2D does not respect its scale parameter, or that of its parents. When scaling a RigidBody2D (directly or by scaling its parent), it shows properly scaled in the editor, but on runtime the scale is ignored. **Steps to reproduce:** 1. Add a RigidBody2D, with a Sprite to actually see its size 2. Scale it down or up 3. Run the project **Link to minimal example project** (optional but very welcome): `3.x` MRP (works in `master` too): [RigidBody2D_scaling_bug.zip](https://github.com/godotengine/godot/files/7505078/RigidBody2D_scaling_bug.zip) (Old 2.1 project: [RigidBody2D_scaling_bug.zip](https://github.com/godotengine/godot/files/367243/RigidBody2D_scaling_bug.zip)) The project has a root Node2D scaled by (0.2, 0.2), and RigidBody2D, StaticBody2D and KinematicBody2D children. When running the scene, you'll see that only the RigidBody2D does not respect its parent's scale.
bug,confirmed,topic:physics
high
Critical
165,934,247
opencv
OpenCV 3.1 cannot explicitly set OpenCL device
##### System information (version) I checked the following environment. - OpenCV => 3.1 - Operating System / Platform => Windows 10 64bit - Compiler => Visual Studio 2013 - CUDA Toolkit => 7.5(64bit) **addtional information** - [x] WITH_OPENCL - [ ] WITH_OPENCLAMDBLAS - [ ] WITH_OPENCLAMDFFT - [ ] WITH_OPENCL_SVM But, I think that there is same issue in other platforms. ##### Detailed description OpenCV 2.4.x can explicitly set OpenCL device by <code>cv::ocl::setDevice</code>. Because, context is defined as a [global variable](https://github.com/opencv/opencv/blob/2.4.13/modules/ocl/src/cl_context.cpp#L655). And, this variable is changed by [cv::ocl::setDevice](https://github.com/opencv/opencv/blob/2.4.13/modules/ocl/src/cl_context.cpp#L776). On the other hands, OpenCV 3.x cannot explicitly set OpenCL device. Because, <code>cv::ocl::setDevice</code> was removed from OpenCV 3.0. And, <code>cv::ocl::Device</code>'s constructor [sets context](https://github.com/opencv/opencv/blob/3.1.0/modules/core/src/ocl.cpp#L1877). But, this change does not affect the global. And, device id is not set [CoreTLSData](https://github.com/opencv/opencv/blob/3.1.0/modules/core/src/precomp.hpp#L272). ##### Steps to reproduce ``` .cpp #include <opencv2/core.hpp> #include <opencv2/core/ocl.hpp> #include <opencv2/imgproc.hpp> #include <opencv2/imgcodecs.hpp> int main(int argc, char** argv) { cv::ocl::Context context; cv::ocl::Device(context.device(1)); // NG cv::UMat img, gray; cv::imread("lena.jpg", cv::IMREAD_UNCHANGED).copyTo(img); cv::cvtColor(img, gray, cv::COLOR_BGR2GRAY); cv::imwrite("gray.jpg", gray); return 0; } ```
feature,category: core,category: t-api
low
Minor
165,940,517
nvm
Add --verbose option to help diagnose remote/install slowness
I ran into some slowness here, thought `nvm` was hanging since it took over 2 minutes to do an `nvm ls-remote`: https://github.com/creationix/nvm/issues/1157 A `--verbose` option for `nvm install`/`nvm ls-remote`/`nvm version-remote` would really be useful to enable end users to diagnose their own issues. Specifically, if DNS/network/disk issues can have a negative effect on `nvm`, it will be useful to collect that information to better place blame.
installing node,feature requests,pull request wanted
medium
Major
165,952,770
go
cmd/go: provide better error message when cross-compiling toolchain is required
1. What version of Go are you using (`go version`)? 510fb6397dfc93067dc90d42c58dfc5f8b995285: tip between 1.7rc1 and 1.7rc2 1. What operating system and processor architecture are you using (`go env`)? ``` GOARCH="amd64" GOBIN="/Users/josh/bin" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/josh" GORACE="" GOROOT="/Users/josh/go/tip" GOTOOLDIR="/Users/josh/go/tip/pkg/tool/darwin_amd64" CC="clang" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/pp/0010hzld5b12h_92j5th082r0000gn/T/go-build629103623=/tmp/go-build -gno-record-gcc-switches -fno-common" CXX="clang++" CGO_ENABLED="1" ``` 1. What did you do? `GOOS=android GOARCH=amd64 go install std cmd` 1. What did you expect to see? Success. 1. What did you see instead? ``` # cmd/addr2line warning: unable to find runtime/cgo.a /Users/josh/go/tip/pkg/tool/darwin_amd64/link: running clang failed: exit status 1 ld: unknown option: -z clang: error: linker command failed with exit code 1 (use -v to see invocation) # cmd/asm warning: unable to find runtime/cgo.a /Users/josh/go/tip/pkg/tool/darwin_amd64/link: running clang failed: exit status 1 ld: unknown option: -z clang: error: linker command failed with exit code 1 (use -v to see invocation) and so on ``` Running `GOOS=android GOARCH=amd64 go install -ldflags=-v std cmd`: ``` # cmd/cgo HEADER = -H4 -T0x401000 -D0x0 -R0x1000 searching for runtime.a in $WORK/runtime.a searching for runtime.a in /Users/josh/go/tip/pkg/android_amd64_shared/runtime.a searching for runtime/cgo.a in $WORK/runtime/cgo.a searching for runtime/cgo.a in /Users/josh/go/tip/pkg/android_amd64_shared/runtime/cgo.a warning: unable to find runtime/cgo.a 0.00 deadcode 0.03 pclntab=599713 bytes, funcdata total 119620 bytes 0.03 dodata 0.04 dwarf 0.07 symsize = 0 0.16 reloc 0.17 asmb 0.17 codeblk 0.17 datblk 0.18 sym 0.18 symsize = 122040 0.19 symsize = 122088 0.19 dwarf 0.21 headr host link: "clang" "-m64" "-gdwarf-2" "-Wl,-z,relro" "-pie" "-o" "/var/folders/pp/0010hzld5b12h_92j5th082r0000gn/T/go-build962217633/cmd/cgo/_obj/exe/a.out" "-rdynamic" "-Qunused-arguments" "/var/folders/pp/0010hzld5b12h_92j5th082r0000gn/T/go-link-534529285/go.o" /Users/josh/go/tip/pkg/tool/darwin_amd64/link: running clang failed: exit status 1 ld: unknown option: -z clang: error: linker command failed with exit code 1 (use -v to see invocation) and so on ``` This also causes `GOOS=android GOARCH=amd64 ./bootstrap.bash` to fail. Maybe this is expected (?), but it doesn't seem right to me.
help wanted,NeedsFix
low
Critical
165,962,620
youtube-dl
Issue downloading a video from smithsonian Channel with uses brightcove
### What is the purpose of your _issue_? - [x] Site support request (request for adding support for a new site) --- ### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your _issue_ --- ### 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 -v <your command line> [debug] System config: [] [debug] User config: [] [debug] Command-line args: [u'-v', u'http://www.smithsonianchannel.com/videos/nazi-temple-of-doom/22932'] [debug] Encodings: locale US-ASCII, fs utf-8, out US-ASCII, pref US-ASCII [debug] youtube-dl version 2016.07.16 [debug] Python version 2.7.10 - Darwin-15.5.0-x86_64-i386-64bit [debug] exe versions: ffmpeg 3.1.1, ffprobe 3.1.1 [debug] Proxy map: {} [generic] 22932: Requesting header WARNING: Falling back on generic information extractor. [generic] 22932: Downloading webpage [generic] 22932: Extracting information [generic] Brightcove video detected. [download] Downloading playlist: Nazi Temple of Doom [generic] playlist Nazi Temple of Doom: Collected 1 video ids (downloading 1 of them) [download] Downloading video 1 of 1 [brightcove:legacy] 5030831008001: Downloading webpage [brightcove:legacy] 5030831008001: Extracting information Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/local/bin/youtube-dl/__main__.py", line 19, in <module> File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 422, in main File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 412, in _real_main File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1775, in download File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 693, in extract_info File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 854, in process_ie_result File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 746, in process_ie_result File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 682, in extract_info File "/usr/local/bin/youtube-dl/youtube_dl/extractor/common.py", line 347, in extract File "/usr/local/bin/youtube-dl/youtube_dl/extractor/brightcove.py", line 274, in _real_extract File "/usr/local/bin/youtube-dl/youtube_dl/extractor/brightcove.py", line 302, in _get_video_info TypeError: 'NoneType' object has no attribute '__getitem__' ... <end of log> ```
site-support-request,tv-provider-account-needed
low
Critical
165,968,257
opencv
OpenCV protobuf error with CUDA8RC
With all the dependencies installed, I'm getting the following error while installing OpenCV in ubuntu 16.04: ``` [ 64%] Building CXX object modules/videoio/CMakeFiles/opencv_test_videoio.dir/test/test_video_pos.cpp.o [ 64%] Building CXX object modules/superres/CMakeFiles/opencv_test_superres.dir/test/test_main.cpp.o [ 64%] Building CXX object modules/superres/CMakeFiles/opencv_perf_superres.dir/perf/perf_main.cpp.o ../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(int, std::string const&, google::protobuf::io::CodedOutputStream*)' ../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::io::CodedOutputStream::WriteStringWithSizeToArray(std::string const&, unsigned char*)' ../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::WireFormatLite::ReadString(google::protobuf::io::CodedInputStream*, std::string*)' ../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::Message::GetTypeName() const' ../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::StringTypeHandlerBase::Delete(std::string*)' ../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::MessageFactory::InternalRegisterGeneratedFile(char const*, void (*)(std::string const&))' ../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(int, std::string const&, google::protobuf::io::CodedOutputStream*)' ../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::StringTypeHandlerBase::New()' ../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::empty_string_' ../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::WireFormatLite::WriteString(int, std::string const&, google::protobuf::io::CodedOutputStream*)' ../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::DescriptorPool::FindFileByName(std::string const&) const' ../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream*, std::string*)' ../../lib/libopencv_dnn.so.3.1.0: undefined reference to `google::protobuf::Message::InitializationErrorString() const' collect2: error: ld returned 1 exit status modules/dnn/CMakeFiles/opencv_test_dnn.dir/build.make:260: recipe for target 'bin/opencv_test_dnn' failed make[2]: *** [bin/opencv_test_dnn] Error 1 CMakeFiles/Makefile2:4905: recipe for target 'modules/dnn/CMakeFiles/opencv_test_dnn.dir/all' failed make[1]: *** [modules/dnn/CMakeFiles/opencv_test_dnn.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... [ 64%] Building CXX object modules/superres/CMakeFiles/opencv_perf_superres.dir/perf/perf_superres.cpp.o [ 64%] Building CXX object modules/superres/CMakeFiles/opencv_test_superres.dir/test/test_superres.cpp.o [ 64%] Building CXX object modules/highgui/CMakeFiles/opencv_test_highgui.dir/test/test_gui.cpp.o [ 64%] Building CXX object modules/fuzzy/CMakeFiles/opencv_test_fuzzy.dir/test/test_image.cpp.o [ 65%] Building CXX object modules/objdetect/CMakeFiles/opencv_test_objdetect.dir/test/test_cascadeandhog.cpp.o [ 65%] Building CXX object modules/videoio/CMakeFiles/opencv_perf_videoio.dir/perf/perf_output.cpp.o [ 65%] Building CXX object modules/objdetect/CMakeFiles/opencv_perf_objdetect.dir/perf/opencl/perf_hogdetect.cpp.o [ 65%] Building CXX object modules/videoio/CMakeFiles/opencv_test_videoio.dir/test/test_main.cpp.o [ 65%] Linking CXX executable ../../bin/opencv_perf_imgcodecs [ 65%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_test_imgcodecs.dir/test/test_drawing.cpp.o [ 65%] Building CXX object modules/highgui/CMakeFiles/opencv_test_highgui.dir/opencv_test_highgui_automoc.cpp.o [ 65%] Building CXX object modules/imgcodecs/CMakeFiles/opencv_test_imgcodecs.dir/test/test_grfmt.cpp.o [ 65%] Linking CXX executable ../../bin/opencv_test_highgui [ 65%] Built target opencv_perf_imgcodecs [ 65%] Building CXX object modules/shape/CMakeFiles/opencv_test_shape.dir/test/test_main.cpp.o [ 67%] Building CXX object modules/videoio/CMakeFiles/opencv_test_videoio.dir/test/test_positioning.cpp.o [ 67%] Building CXX object modules/videoio/CMakeFiles/opencv_test_videoio.dir/test/test_video_io.cpp.o [ 67%] Building CXX object modules/objdetect/CMakeFiles/opencv_perf_objdetect.dir/perf/opencl/perf_cascades.cpp.o [ 67%] Built target opencv_test_highgui [ 67%] Building CXX object modules/videoio/CMakeFiles/opencv_test_videoio.dir/test/test_ffmpeg.cpp.o [ 67%] Linking CXX executable ../../bin/opencv_test_fuzzy [ 67%] Building CXX object modules/videoio/CMakeFiles/opencv_test_videoio.dir/test/test_framecount.cpp.o [ 67%] Built target opencv_test_fuzzy [ 67%] Building CXX object modules/videoio/CMakeFiles/opencv_test_videoio.dir/test/test_fourcc.cpp.o [ 67%] Building CXX object modules/videoio/CMakeFiles/opencv_test_videoio.dir/test/test_basic_props.cpp.o [ 67%] Building CXX object modules/objdetect/CMakeFiles/opencv_test_objdetect.dir/test/opencl/test_hogdetector.cpp.o [ 67%] Linking CXX executable ../../bin/opencv_test_superres [ 67%] Building CXX object modules/videoio/CMakeFiles/opencv_perf_videoio.dir/perf/perf_input.cpp.o [ 67%] Linking CXX executable ../../bin/opencv_perf_superres [ 67%] Linking CXX executable ../../bin/opencv_test_shape [ 67%] Linking CXX executable ../../bin/opencv_test_videoio [ 67%] Built target opencv_perf_superres [ 67%] Built target opencv_test_superres [ 67%] Built target opencv_test_shape [ 67%] Built target opencv_test_videoio [ 67%] Linking CXX executable ../../bin/opencv_perf_objdetect [ 67%] Built target opencv_perf_objdetect [ 67%] Linking CXX executable ../../bin/opencv_perf_videoio [ 67%] Linking CXX executable ../../bin/opencv_test_objdetect [ 67%] Built target opencv_perf_videoio [ 67%] Built target opencv_test_objdetect [ 67%] Linking CXX executable ../../bin/opencv_test_imgcodecs [ 67%] Built target opencv_test_imgcodecs Makefile:160: recipe for target 'all' failed make: *** [all] Error 2 ```
bug,category: build/install,category: gpu/cuda (contrib)
low
Critical
165,972,855
neovim
rshada|wshada merges jumplists
- NVIM v0.1.5-539-g204f557 - Vim (version: ) behaves differently? Vim doesn't merge I like to use rshada|wshada to merge register content, but this also merges the jumplists. A combined jumplist with the most recent jumps is fine with me on nvim startup, but I like to keep my jumplists separated per window while using nvim. It seems that there is no option to merge registers but not to merge the jumplist, as " ' " (which should control it) is mandatory in the 'shada' option. ### Actual behaviour `:rshada` merges the jumplist ### Expected behaviour Make merging the jumplist optional ### Steps to reproduce using `nvim -u NORC` ``` seq 1 100 > a seq 101 200 > b nvim -u NORC -o a b /30 <C-w>-j /50 :wshada :q :rshada <C-o> Expected: jumps to 1 Result: jumps to 101 in file b ```
enhancement,editor-state
low
Major
165,987,432
youtube-dl
Add support for cartoonnetwork.com show pages
## 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 _2016.07.17_. 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 **2016.07.17** ### 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) - [ ] Feature request (request for a new functionality) - [ ] Question - [ ] Other --- ### The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your _issue_ --- ### 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 ```): ``` keybounceMBP:Ninjago michael$ youtube-dl -U Updating to version 2016.07.17 ... Updated youtube-dl. Restart youtube-dl to use the new version. keybounceMBP:Ninjago michael$ youtube-dl -v -F http://www.cartoonnetwork.com/video/ninjago/episodes/index.html [debug] System config: [] [debug] User config: [u'-o', u'%(title)s.%(ext)s', u'-f', u'\nbest[ext=mp4][height>431][height<=576]/\nbestvideo[ext=mp4][height=480]+bestaudio[ext=m4a]/\nbest[ext=mp4][height>340][height<=431]/\nbestvideo[ext=mp4][height>360][height<=576]+bestaudio/\nbest[height>340][height<=576]/\nbestvideo[height>360][height<=576]+bestaudio/\nbestvideo[height=360]+bestaudio/\nbest[ext=mp4][height>=280][height<=360]/\nbest[height<=576]/\nworst', u'--write-sub', u'--embed-subs', u'--recode-video', u'mp4', u'--mark-watched'] [debug] Command-line args: [u'-v', u'-F', u'http://www.cartoonnetwork.com/video/ninjago/episodes/index.html'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2016.07.17 [debug] Python version 2.7.5 - Darwin-13.4.0-x86_64-i386-64bit [debug] exe versions: ffmpeg 3.1.1, ffprobe 3.1.1, rtmpdump 2.4 [debug] Proxy map: {} [generic] index: Requesting header WARNING: Falling back on generic information extractor. [generic] index: Downloading webpage [generic] index: Extracting information ERROR: Unsupported URL: http://www.cartoonnetwork.com/video/ninjago/episodes/index.html Traceback (most recent call last): File "/Users/michael/bin/youtube-dl/youtube_dl/extractor/generic.py", line 1579, in _real_extract doc = compat_etree_fromstring(webpage.encode('utf-8')) File "/Users/michael/bin/youtube-dl/youtube_dl/compat.py", line 2525, in compat_etree_fromstring doc = _XML(text, parser=etree.XMLParser(target=_TreeBuilder(element_factory=_element_factory))) File "/Users/michael/bin/youtube-dl/youtube_dl/compat.py", line 2514, in _XML parser.feed(text) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1642, in feed self._raiseerror(v) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/xml/etree/ElementTree.py", line 1506, in _raiseerror raise err ParseError: not well-formed (invalid token): line 19, column 50 Traceback (most recent call last): File "/Users/michael/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 682, in extract_info ie_result = ie.extract(url) File "/Users/michael/bin/youtube-dl/youtube_dl/extractor/common.py", line 347, in extract return self._real_extract(url) File "/Users/michael/bin/youtube-dl/youtube_dl/extractor/generic.py", line 2303, in _real_extract raise UnsupportedError(url) UnsupportedError: Unsupported URL: http://www.cartoonnetwork.com/video/ninjago/episodes/index.html ``` I cannot believe that cartoonnetwork is not supported. This isn't even a locked show. I also cannot believe that a search for cartoonnetwork.com returned no hits. Zero open, zero closed. But it did. I cannot help but feel I'm doing something wrong ...
site-support-request,geo-restricted,tv-provider-account-needed
low
Critical
165,989,799
youtube-dl
Unable to download with a Dish provider, cookie file, and a supported site.
## 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 _2016.07.17_. 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 **2016.07.17** ### 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) - [x ] Site support request (request for adding support for a new site) - [ ] Feature request (request for a new functionality) - [ ] Question - [ ] Other --- I am having trouble watching TV shows that need logging in with Dish. A search showed a similar issue at https://github.com/rg3/youtube-dl/issues/9786 Basically: Attempting to isolate the needed cookies by making a new firefox profile, and going to my sites found that I was already logged in through Dish, without having to enter account name/password; this implies that abobe flash is handling the login. ``` keybounceMBP:TV michael$ youtube-dl -v -F --cookies ~/Dish-cookies.txt http://www.adultswim.com/videos/naruto- shippuden/guardian-of-the-iron-wall/ [debug] System config: [] [debug] User config: [u'-o', u'%(title)s.%(ext)s', u'-f', u'\nbest[ext=mp4][height>431][height<=576]/\nbestvideo[ext=mp4][height=480]+bestaudio[ext=m4a]/\nbest[ext=mp4][height>340][height<=431]/\nbestvideo[ext=mp4][height>360][height<=576]+bestaudio/\nbest[height>340][height<=576]/\nbestvideo[height>360][height<=576]+bestaudio/\nbestvideo[height=360]+bestaudio/\nbest[ext=mp4][height>=280][height<=360]/\nbest[height<=576]/\nworst', u'--write-sub', u'--embed-subs', u'--recode-video', u'mp4', u'--mark-watched'] [debug] Command-line args: [u'-v', u'-F', u'--cookies', u'/Users/michael/Dish-cookies.txt', u'http://www.adultswim.com/videos/naruto-shippuden/guardian-of-the-iron-wall/'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2016.07.17 [debug] Python version 2.7.5 - Darwin-13.4.0-x86_64-i386-64bit [debug] exe versions: ffmpeg 3.1.1, ffprobe 3.1.1, rtmpdump 2.4 [debug] Proxy map: {} [AdultSwim] guardian-of-the-iron-wall: Downloading webpage ERROR: This video is only available via cable service provider subscription that is not currently supported. You may want to use --cookies. Traceback (most recent call last): File "/Users/michael/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 682, in extract_info ie_result = ie.extract(url) File "/Users/michael/bin/youtube-dl/youtube_dl/extractor/common.py", line 347, in extract return self._real_extract(url) File "/Users/michael/bin/youtube-dl/youtube_dl/extractor/adultswim.py", line 148, in _real_extract expected=True) ExtractorError: This video is only available via cable service provider subscription that is not currently supported. You may want to use --cookies. ``` Note that I have a cookie file specified. I can visit adult swim or disney XD, and watch shows, without having to provider any more details. Yet it's not working here. My question: Is this because I have Dish as my provider, or is it because something is not being exported in my cookies? NB: I have self-destructing cookies installed, just to keep from accumulating tons of advertising cookies (each visit serves a new ad). Cookies kept: adobe.com, adultswim.com, cartoonnetwork.com, fwmrm.com, go.com, turner.com.
tv-provider-account-needed
low
Critical
166,050,458
opencv
Extract code snippets from documentation
Instead of adding code snippets to documetnation directly using `@code` Doxygen command it is better to paste code from compilable source file using `@snippet` command. All (or as many as possible) snippets should be extracted into separate static libraries or example programs to be checked during library build.
feature,category: documentation,affected: 3.4
low
Minor
166,127,702
rust
`rust-call` call ABI is not feature gated at call-sites
Note: This may be a feature, not a bug. But I wanted to make the point explicit. If I make a crate named `defs` with this: ``` rust #![feature(unboxed_closures)] pub extern "rust-call" fn foo(_: (), _: ()) { println!("defs::foo"); } ``` and then a bin crate `uses` with a dependency on `defs` and this for its `main.rs`: ``` rust extern crate defs; fn main() { println!("Hello"); defs::foo((), ()); println!("world!"); } ``` Compiling the former obviously provides the feature gate it needs to define something with the `rust-call` ABI. But compiling the latter does not require any feature gate, even though it is calling something via the `rust-call` ABI which is not stable. This may be fine, since the point of origin _is_ gated (apart from problems like #34900). But it seems worth discussion.
P-medium,A-stability,T-lang,C-bug,F-unboxed_closures
low
Critical
166,152,343
go
release: cannot install from .pkg into any dir except /usr/local/go
Please answer these questions before submitting your issue. Thanks! 1. What version of Go are you using (`go version`)? 1.7rc2 2. What operating system and processor architecture are you using (`go env`)? Mac OS 10.11.4, darwin amd64 3. What did you do? I installed 1.7rc2 from the pkg build (go1.7rc2.darwin-amd64.pkg). I had set GOROOT to a different directory, but it always installs to /usr/local/go. The documentation earlier, if I remember right, had a way to install to a different directory but even that is not there. Is there no way to install it to a different directory?
NeedsFix
low
Major
166,212,939
go
cmd/compile: lower % using multiply and subtract when the result of / is known
CL 25004 allows amd64 to compute a % b and a / b with a single instruction. However, rewriting code to use it currently risks a regression on architectures with a divmod instruction. We could probably do the rewrite at a generic level instead, and lower a % b to a - b \* (a / b) on architectures without divmod. Then we could use the clearer, faster formulation everywhere. cc @randall77 @MichaelTJones @martisch @bradfitz
Performance,compiler/runtime
low
Major
166,215,854
rust
Cannot link to `--crate-type dylib`
```sh cd $(mktemp -d) cat <<EOF > foo.rs pub fn foo() {} EOF cat <<EOF > bar.rs extern crate foo; fn main() { foo::foo(); } EOF rustc foo.rs --crate-type dylib rustc bar.rs -L . ``` ``` error: cannot satisfy dependencies so `std` only shows up once help: having upstream crates all available in one format will likely make this go away error: cannot satisfy dependencies so `core` only shows up once help: having upstream crates all available in one format will likely make this go away error: cannot satisfy dependencies so `collections` only shows up once help: having upstream crates all available in one format will likely make this go away error: cannot satisfy dependencies so `rustc_unicode` only shows up once help: having upstream crates all available in one format will likely make this go away error: cannot satisfy dependencies so `alloc` only shows up once help: having upstream crates all available in one format will likely make this go away error: cannot satisfy dependencies so `rand` only shows up once help: having upstream crates all available in one format will likely make this go away error: cannot satisfy dependencies so `libc` only shows up once help: having upstream crates all available in one format will likely make this go away error: cannot satisfy dependencies so `unwind` only shows up once help: having upstream crates all available in one format will likely make this go away error: cannot satisfy dependencies so `panic_unwind` only shows up once help: having upstream crates all available in one format will likely make this go away error: cannot link together two allocators: alloc_jemalloc and alloc_system error: aborting due to 10 previous errors ``` I believe that there's no reason this executable _couldn't_ be created, it should just use all dependencies through the dylib that was created in the previous step.
A-linkage,T-compiler,C-bug
low
Critical
166,216,739
flutter
Support peek/pop on iOS
Once we have 3D touch support (https://github.com/flutter/flutter/issues/4838) we can then enable developers to build "peek/pop". See http://www.apple.com/iphone-6s/3d-touch/ for more.
c: new feature,platform-ios,framework,a: fidelity,f: cupertino,f: routes,P2,team-ios,triaged-ios
low
Major
166,233,908
go
proposal: add a parseutils sub-package under x/net/html
When using `x/net/html` to parse a HTML Spec to generate Go code in the [colornames](http://godoc.org/golang.org/x/image/colornames) package, we wrote several [useful and fairly generalised functions](https://github.com/golang/image/blob/master/colornames/gen.go) to interact with HTML parse trees such as a generalised node matching function type, match function generators for nodes by atom type & attributes and functions to recursively search and find matching nodes in the parse tree. I have since then found these functions very useful in several other projects when using the experimental HTML parser. Therefore I was wondering if there is merit in providing these types of functions as a `parseutils` sub-package in the experimental repo. Happy to work on it.
Proposal,Proposal-Hold
low
Minor
166,275,837
youtube-dl
--playlist-items shouldn't apply on inner playlists
## 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 _2016.07.17_. 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 **2016.07.17** ### 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 --- ### Description of your _issue_, suggested solution and other information Explanation of your _issue_ in arbitrary form goes here. Please make sure the [description is worded well enough to be understood](https://github.com/rg3/youtube-dl#is-the-description-of-the-issue-itself-sufficient). Provide as much context and examples as possible. If work on your _issue_ required an account credentials please provide them or explain how one can obtain them. **Here is the command,** $ youtube-dl.exe -v --geo-verification-proxy MY_PROXY --playlist-items 3,4 -o "%(title)s-%(id)s.%(ext)s" http://www.youku.com/show_page/id_zee1e0fe402e211e6a080.html [debug] System config: [] [debug] User config: [] [debug] Command-line args: ['-v', '--geo-verification-proxy', 'proxy.uku.im:443', '--playlist-items', '3,4', '-o', '%(title)s-%(id)s.%(ext)s', 'http://www.youku.com/show_page/id_zee1e0fe402e211e6a080.html'] [debug] Encodings: locale cp936, fs mbcs, out cp936, pref cp936 [debug] youtube-dl version 2016.07.17 [debug] Python version 3.4.4 - Windows-10-10.0.10586 [debug] exe versions: none [debug] Proxy map: {} [youku:show] zee1e0fe402e211e6a080: Downloading webpage [youku:show] zee1e0fe402e211e6a080: Downloading episodes page 1 [download] Downloading playlist: 致青春 [youku:show] playlist 致青春: Collected 19 video ids (downloading 2 of them) [download] Downloading video 1 of 2 [youku] XMTY0MDc2MzE0OA: Downloading JSON metadata [download] Downloading playlist: 致青春 03 [youku] playlist 致青春 03: Collected 2 video ids (downloading 0 of them) [download] Finished downloading playlist: 致青春 03 [download] Downloading video 2 of 2 [youku] XMTY0MDc4MjA3Mg: Downloading JSON metadata [download] Downloading playlist: 致青春 04 [youku] playlist 致青春 04: Collected 2 video ids (downloading 0 of them) [download] Finished downloading playlist: 致青春 04 [download] Finished downloading playlist: 致青春 **This is a TV-play, I would like to download episodes 3 and 4, but you know many Chinese websites will split one video into several parts (2 parts of per episode in this TV-play), the program takes these parts as another playlist (sublist), so the arg "--playlist-items" is also executed in this sublist, so nothing is downloaded finally.** **If I choose to download episodes 2 and 3, I get** $ youtube-dl.exe -v --geo-verification-proxy MY_PROXY --playlist-items 2,3 -o "%(title)s-%(id)s.%(ext)s" http://www.youku.com/show_page/id_zee1e0fe402e211e6a080.html [debug] System config: [] [debug] User config: [] [debug] Command-line args: ['-v', '--geo-verification-proxy', 'proxy.uku.im:443', '--playlist-items', '2,3', '-o', '%(title)s-%(id)s.%(ext)s', 'http://www.youku.com/show_page/id_zee1e0fe402e211e6a080.html'] [debug] Encodings: locale cp936, fs mbcs, out cp936, pref cp936 [debug] youtube-dl version 2016.07.17 [debug] Python version 3.4.4 - Windows-10-10.0.10586 [debug] exe versions: none [debug] Proxy map: {} [youku:show] zee1e0fe402e211e6a080: Downloading webpage [youku:show] zee1e0fe402e211e6a080: Downloading episodes page 1 [download] Downloading playlist: 致青春 [youku:show] playlist 致青春: Collected 19 video ids (downloading 2 of them) [download] Downloading video 1 of 2 [youku] XMTYzOTM3NzY3Ng: Downloading JSON metadata [download] Downloading playlist: 致青春 02 [youku] playlist 致青春 02: Collected 2 video ids (downloading 1 of them) [download] Downloading video 1 of 1 [debug] Invoking downloader on 'http://k.youku.com/player/getFlvPath/sid/9468916432027122f88df_00/st/flv/fileid/0300010E015788549BCC15333EAACDA393A3F1-8D5B-1E8F-7024-A29608F897FE?K=9bd6e71062d0cffd2412ada1&ctype=12&hd=1&myp=0&ev=1&token= 4139&ypp=0&ep=eyaSEkCMUMoD5yPdjz8bZXrqfCNZXP4J9h%2BFgNIXALohT%2BC3nDrYte7DT%2FpBFfpsA1N1ZJryotOWaTYVYfg3rBoQ3jugT%2Frn%2FvLn5dxRzZYAbm8%2Be8qhwVSaQjP4&oip=2042948938' [download] Destination: 致青春 02-XMTYzOTM3NzY3Ng_part2.flv [download] 100% of 33.61MiB in 00:05 [download] Finished downloading playlist: 致青春 02 [download] Downloading video 2 of 2 [youku] XMTY0MDc2MzE0OA: Downloading JSON metadata [download] Downloading playlist: 致青春 03 [youku] playlist 致青春 03: Collected 2 video ids (downloading 1 of them) [download] Downloading video 1 of 1 [debug] Invoking downloader on 'http://k.youku.com/player/getFlvPath/sid/446891643906212051b3f_00/st/flv/fileid/0300010E0157885B69D8DA333EAACDF6921E67-4AE0-343F-84A7-83900A7B3699?K=0a2db5fe7804d539282b9522&ctype=12&hd=1&myp=0&ev=1&token= 2114&ypp=0&ep=diaSEkCMUMoD7CPZij8bZynjJnRZXP4J9h%2BFgNIXALohT%2BC3nEzXzum4Oo5BFfpsA1N1ZJ33otLmH0YTYfQy3GgQ3EqrT%2Fro%2BoHk5aVQzZAAFx5EccvevVScQjH1&oip=2042948938' [download] Destination: 致青春 03-XMTY0MDc2MzE0OA_part2.flv [download] 100% of 33.64MiB in 00:05 [download] Finished downloading playlist: 致青春 03 [download] Finished downloading playlist: 致青春 **You can see now only part 2 of every episode will be downloaded. So please fix this, the args should only affect the main playlist.**
bug
low
Critical
166,295,263
vscode
Git: Add support for staging a subset of deleted lines
From @kachkaev I can't find out how to select just two deleted lines out of 5 going sequentially and stage only the ones I want. Any time I select something and click that menu item, the whole block gets staged. The same happens when unstaging.
feature-request,git
medium
Critical
166,332,955
TypeScript
Inlined constrained type using control flow analysis
Some recent features like "String Literals" or "strict null check" in Typescript can be used to shift responsibility of checking the validity of a parameter from function/API developer's side to caller's side. And with control flow analysis, one can start with an discriminated union type and based on the flow of the code, compiler will determine or exclude some specific types. So, code like this- ``` typescript function checkResponse(response: String): boolean { if (response === null) throw new Error("Response cannot be null") if (response === "YES") return true if (response === "NO") return false throw new Error("Not valid response") } ``` can be converted to- ``` typescript function checkResponse(response: "YES"|"NO"): boolean { return (response === "YES") } ``` And compiler will ensure the caller will only be able to call the function with appropriate values. This increases integrity of code. (Although, caller should also be using Typescript in these cases, as the checking does not exist in compiler generated javascript code.) Now, I am proposing a Typescript feature with similar intention/result- shifting the responsibility of validation to upper(caller/consumer) side. What I am trying to propose is best described by an example. Using this feature code like this- ``` typescript function squareRoot(num: number): number { if (num < 0) throw new RangeError("Not valid number") var root: number // do the calculation return root } ``` will become something like- ``` typescript function squareRoot(num: number:[_ >= 0]): number { var root: number // do the calculation return root } ``` Here, a constraint is being attached `:[_ >= 0]` (syntax can be anything else, more fitting with Typescript) with it's parameter, and the range checking is omitted. Now, according the new feature, the compiler will show an error, if during this function call, it cannot be sure whether the parameter value satisfies the constraint or not using control flow analysis. So- ``` typescript squareRoot(0) //Ok. For constants, compiler can check validity by itself squareRoot(-1) //Error var userInput = Number(prompt()) squareRoot(userInput) //Error, compiler not sure if(userInput >= 0 ) squareRoot(userInput) //Ok if(userInput > 1000) squareRoot(userInput) //Ok if(userInput > -1 ) squareRoot(userInput) //Error, compiler not sure if(userInput < 0) return squareRoot(userInput) //Ok ``` And this is not only for range checking numbers. But any (pure- without side effect) function taking an object of type `T` and returning boolean can be attached to type `T`. So, checking if some string is a valid email or satisfies a regex pattern, or whether a file is writable or more complex check for a complex type, all are possible within the scope of this proposal. I am calling this idea **Constrained Type**\- a type with an attached constraint. Most of goals of this proposal can be achieved now in current language, using newly derived types/inheritance. But someone has to derive a child type for each of the constraints they want to check. The constructor in the derived type can then check and prevent invalid objects being created. But it seems doing too much for too little. It is cumbersome for both API developers and callers. And doing this by inheritance hides the base or actual type of the data to the API consumer. That's why we see very few of them. This proposal will make both the base type and the constraint easily visible to the consumer, as the constraint is inlined with the base type. It does not clog the base type, as it is not a part of it. And consumer/caller can then just declare a variable of base type and check to reach constraint satisfaction- a workflow very similar to what is currently practiced. There are some previous proposals like this- "Tag types" #4895 and "Refinement Types" #7599 (both by @aleksey-bykov). But what I understood from reading them (and I may be wrong), they are trying to track changes of some object to determine whether some condition holds at some point of code. This proposal has nothing to do with tracking states. It just proposes to describe attributes of data with more ease and increase integrity using compiler's ability to analyse control flows.
Suggestion,Awaiting More Feedback
low
Critical
166,392,740
vscode
Allow to save a list of opened editors in a group and switch between them
- VSCode Version: 1.3.1 - OS Version: all There are many times I have a set of open editors in the middle of working on something but need to stop and look at a completely different part of the project. Currently, I can: 1. Just open the new set of files I need, which clutters up the open editors 2. Close my open editors and open the new set of files, which makes it easier to work on the second part but very difficult to get back to the previous state when I need to It would be nice to be able to save a state of which editors and files are open to retrieve later so I could save the state, close everything, and switch to the new set of files, then easily restore the initial state when I'm finished. This is my main use case for wanting to be able to open multiple windows. See #7330 #2686
feature-request,workbench-editors
high
Critical
166,542,293
neovim
localized --version output ill formatted
- `nvim --version`: NVIM v0.1.5-608-g8c1fb99 - Vim (version: ) behaves differently? Yes, because VIM does not have any translations (at least on my system). - Operating system/version: macOS 10.11.5 - Terminal name/version: Terminal.App Version 2.6.1 - `$TERM`: xterm-256color ### Actual behavior ``` > export LANG=en_US.UTF-8 > nvim --version NVIM v0.1.5-608-g8c1fb99 Build type: Release [...] system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/local/Cellar/neovim/HEAD-8c1fb99/share/nvim" ``` ``` > export LANG=zh_TW.UTF-8 > nvim --version NVIM v0.1.5-608-g8c1fb99 Build type: Release [...] 系統 vimrc 設定檔: "$VIM/sysinit.vim" $VIM 預設值: "/usr/local/Cellar/neovim/HEAD-8c1fb99/share/nvim " ``` (Note the line break before the last `") ``` > export LANG=de_DE.UTF-8 > nvim --version NVIM v0.1.5-608-g8c1fb99 Build type: Release [...] System-vimrc-Datei: "$VIM/sysinit.vim" Voreinstellung für $VIM: " /usr/local/Cellar/neovim/HEAD-8c1fb99/share/nvim" ``` (Note the line break after `Voreinstellung für $VIM: "`) ### Expected behaviour Line breaks should be consistent in all localizations. ### Steps to reproduce using `nvim -u NORC` Unnecessary. ### Reasoning The neovim-dot-app project (a macOS GUI for nvim) uses the output of `nvim --version` during it's [build process](https://github.com/rogual/neovim-dot-app/blob/a0a96204a827e482033b6ef6969de332a0859554/Makefile#L6). I do realize that this is a bit dirty, but as far as I know there is no other way to get the fall-back path. So I recommend to either fix inconsistencies in the translations or introduce something like `nvim --fallbackpath`
bug-vim
low
Minor
166,544,932
nvm
nvm exec/run does not let signals through
Node.js server started with `nvm run` does not receive signals sent to shell script which executed nvm.
bugs,needs followup
low
Major
166,569,210
nvm
Unable to install 'Permission denied'
I have run the install script and gotten the following error: ``` {Wed Jul 20 07:19:50 CDT 2016} <ScaryTerry.ttys000> (master) [dzimm at ~/Codes/] [} curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.3/install.sh | bash % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 9128 100 9128 0 0 5020 0 0:00:01 0:00:01 --:--:-- 5018 => Downloading nvm from git to '/Users/nad/.nvm' => mkdir: /Users/nad/.nvm: Permission denied fatal: could not create leading directories of '/Users/nad/.nvm': Permission denied Failed to clone nvm repo. Please report this! ``` Useful information about my machine: ``` {Wed Jul 20 07:25:55 CDT 2016} <ScaryTerry.ttys000> [dzimm at ~/Codes] [} sw_vers ProductName: Mac OS X ProductVersion: 10.11.4 BuildVersion: 15E65 {Wed Jul 20 07:26:27 CDT 2016} <ScaryTerry.ttys000> [dzimm at ~/Codes] [} bash --version GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin15) Copyright (C) 2007 Free Software Foundation, Inc. ```
needs followup,installing nvm
low
Critical
166,625,760
go
x/net/websocket: Naming of TLSConfig
`Server` class of `net/httpConfig` uses the name `TLSConfig` for its `tls.config` variable whereas `Config` class of `x/net/websocket` uses `TlsConfig`. Can the inconsistent naming be resolved, or will it be kept due to backwards compatibility?
NeedsInvestigation
low
Major
166,711,553
react
Optimizing Compiler: Component Folding
This is like the final frontier for React but I never really wrote anything about it so I figured I'd create an issue. Basically, the idea is to utilize information about how React works to do [constant folding](https://en.wikipedia.org/wiki/Constant_folding) and [inlining](https://en.wikipedia.org/wiki/Inline_expansion) of components under certain conditions. Example Source: ``` js function Foo(props) { if (props.data.type === 'img') { return <img src={props.data.src} className={props.className} alt={props.alt} />; } return <span>{props.data.type}</span>; } Foo.defaultProps = { alt: "An image of Foo." }; ``` ``` js var CSSClasses = { bar: 'bar' }; module.exports = CSSClasses; ``` ``` js var Foo = require('Foo'); var Classes = require('Classes'); function Bar(props) { return <Foo data={{ type: 'img', src: props.src }} className={Classes.bar} />; } ``` By knowing what Foo and Classes is made up of, we can turn the Bar component into this: ``` js var Foo = require('Foo'); var Classes = require('Classes'); function Bar(props) { return <Foo data={{ type: 'img', src: props.src }} className={Classes.bar} />; } function Bar_optimized(props) { return <img src={props.src} className="Bar" alt="An image of Foo." />; } ``` [Dead-code elimination](https://en.wikipedia.org/wiki/Dead_code_elimination) then strips it down to just: ``` js function Bar_optimized(props) { return <img src={props.src} className="Bar" alt="An image of Foo." />; } ``` Now there are a bunch of different cases where this needs to bail out. For example, we need to know that the `CSSClasses` object and the `defaultProps` object is immutable, or we need to infer that it is immutable using [Escape analysis](https://en.wikipedia.org/wiki/Escape_analysis). With classes these bail out cases are even more complex. The problem is that current JS infrastructure is particularly bad at this kind of whole program or whole package linking. Node doesn't have a notion of per package private modules so anything can mutate anything by default. Transpilers such as Babel are set up to work on a single file at a time. They don't have access to the source of other files to do this analysis. [Rollup](https://github.com/rollup/rollup) is closer but is limited to a small set of static primitives. However, once smarter compilers become more prevalent in the JS world or we find ways to hack around the limitations, we can start building out more of these smarter compiler optimizations.
Component: Optimizing Compiler,React Core Team
high
Critical
166,713,601
react
Optimizing Compiler: Compiling to Internals
This optimization is a renderer specific optimization. It is about knowing how React will process a particular component in its internals and then inlining that internal work into the user code. It comes in two flavors. # Known Host Component ``` js function Foo(props) { if (props.data.type === 'img') { return <img src={props.data.src} className={props.className} />; } return <span className={props.className}>{props.children}</span>; } ``` Into this: ``` js function Foo_optimizedMount(props) { if (props.data.type === 'img') { var img = document.createElement('img'); img.className = props.className; img.src = props.data.src; return { node: img, listeners: ReactEventListeners.trap(img, 'error', 'load') }; } var span = document.createElement('span'); span.className = props.className; var children = ReactChildren.mountNestedChildrenIntoParent(this.props.children, span); return { node: span, children }; } function Foo_optimizedUpdate(instance, oldProps, newProps) { if (oldProps.data.type !== newProps.data.type) { Foo_optimizedUnmount(instance); return Foo_optimizedMount(newProps); } if (props.data.type === 'img') { img.className = props.className; img.src = props.data.src; return instance; } span.className = props.className; ReactChildren.updateNestedChildrenInParent(this.props.children, instance); return instance; } function Foo_optimizedUnmount(instance) { if (oldProps.data.type !== newProps.data.type) { Foo_optimizedUnmount(instance); return Foo_optimizedMount(newProps); } if (props.data.type === 'img') { ReactEventListeners.release(instance.listeners); } ReactChildren.unmountNestedChildrenInParent(instance); } ``` # Composite Components Similarly, composite components can pick different code branches to imperatively update its children. For example, a known constant value wouldn't be considered, and comparison of a single property can potentially bail out a tree. Although it is unclear if this has significant benefits over these two other optimizations: https://github.com/facebook/react/issues/3227 https://github.com/facebook/react/issues/7323
React Core Team
low
Critical
166,727,546
rust
u32 saturating_mul with small constant is slower than a multiply+compare
``` #![feature(test)] #![feature(core_intrinsics)] extern crate test; static mut XXX: u32 = 10; use test::Bencher; #[bench] fn bench_sat_mul(b: &mut Bencher) { b.iter(|| unsafe { for _ in 1..1000 { let mut r = std::intrinsics::volatile_load(&XXX); r = r.saturating_mul(3); std::intrinsics::volatile_store(&mut XXX, r); } }); } #[inline(always)] fn fast_saturating_mul(a: u32, b: u32) -> u32 { let r = a as u64 * b as u64; if r > 0xFFFFFFFF { 0xFFFFFFFF } else { r as u32 } } #[bench] fn bench_sat_mul_2(b: &mut Bencher) { b.iter(|| unsafe { for _ in 1..1000 { let mut r = std::intrinsics::volatile_load(&XXX); r = fast_saturating_mul(r, 3); std::intrinsics::volatile_store(&mut XXX, r); } }); } ``` Resulting timings (x86-64 Linux, Ivy Bridge processor): ``` test bench_sat_mul ... bench: 4,354 ns/iter (+/- 231) test bench_sat_mul_2 ... bench: 3,710 ns/iter (+/- 108) ``` Maybe not a perfect benchmark, but there's probably something worth looking at. ~~Originally reported at https://users.rust-lang.org/t/unexpected-performance-from-array-bound-tests-and-more/6376/5 .~~
I-slow,C-enhancement
low
Major
166,732,968
rust
u32 saturating_mul+compare slower than u64 mul+compare
``` rust #![feature(test)] #![feature(core_intrinsics)] extern crate test; static mut XXX: u32 = 10; use test::Bencher; #[bench] fn bench_sat_mul(b: &mut Bencher) { b.iter(|| unsafe { for _ in 1..1000 { let r = std::intrinsics::volatile_load(&XXX); let r2 = std::intrinsics::volatile_load(&XXX); let r = r.saturating_mul(r2); let r = if r > 1000000000 { 1000000000 } else { r }; std::intrinsics::volatile_store(&mut XXX, r); } }); } #[bench] fn bench_sat_mul_2(b: &mut Bencher) { b.iter(|| unsafe { for _ in 1..1000 { let r = std::intrinsics::volatile_load(&XXX); let r2 = std::intrinsics::volatile_load(&XXX); let r = r as u64 * r2 as u64; let r = if r > 1000000000 { 1000000000 } else { r as u32 }; std::intrinsics::volatile_store(&mut XXX, r); } }); } ``` Originally reported at https://users.rust-lang.org/t/unexpected-performance-from-array-bound-tests-and-more/6376/5 . The two different code sequences: ``` deac: f7 e2 mul %edx deae: 0f 40 c7 cmovo %edi,%eax deb1: 3d 00 ca 9a 3b cmp $0x3b9aca00,%eax deb6: 0f 47 c3 cmova %ebx,%eax ``` ``` df3c: 48 0f af f3 imul %rbx,%rsi df40: 48 81 fe 00 ca 9a 3b cmp $0x3b9aca00,%rsi df47: 0f 43 f2 cmovae %edx,%esi ``` There also seems to be some effect on loop unrolling.
I-slow,C-enhancement
low
Major
166,806,593
react
IE 11 and Edge no longer prompt to remember password on controlled form
**Do you want to request a _feature_ or report a _bug_?** Bug (regression) IE/Edge **What is the current behavior?** On React > v15.2.0, Edge and IE11 do not prompt the user to save the password for the form **Steps to reproduce** With react 15.1.0: https://jsfiddle.net/69z2wepo/49876/ With React 15.2.0: https://jsfiddle.net/69z2wepo/49877/ **What is the expected behavior?** The browser prompts the user to save their password for the form **Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** React > 15.2.0. It worked in React 15.2.0 IE 11, Edge
Type: Bug,Component: DOM
low
Critical
166,867,948
go
x/crypto/ssh: Additional information from HostKeyCallback or Handshake failure
Please answer these questions before submitting your issue. Thanks! 1. What version of Go are you using (`go version`)? 1.6.2 2. What operating system and processor architecture are you using (`go env`)? linux/amd64 3. What did you do? Set a custom callback for ClientConfig HostKeyCallback 4. What did you expect to see? My own error when creating a client connection that failed due to my HostKeyCallback. The server returns the error as-is https://github.com/golang/crypto/blob/master/ssh/server.go#L151 I wrongly assumed my error would be passed through in a similar fashion to how Bolt's API works, so this isn't a bug/issue so much as it is a small feature request. 5. What did you see instead? A new "generic" error wrapped by fmt.Errorf https://github.com/golang/crypto/blob/master/ssh/client.go#L77 So currently in the error I return from my HostKeyCallback I set additional information I'd like to retrieve later when making a client connection. Currently this is difficult because the error is always wrapped by fmt.Errorf at the line above. I know I can set additional state in my function (maybe a map with a mutex) or run a regex against the returned error to see if it contains my error, but neither of those seemed very good. My idea is to add a simple HandshakeError type that saves a reference to the original error and is returned in the client handshake (maybe the sever handshake too). Something like this https://play.golang.org/p/EjM5ijecz3 There are already other Error types in that package, and this one would print the same output if someone was expecting it. Alternatively removing the fmt.Errorf call would work, and would match how the ssh server returns the error from its handshake, which ever is best.
NeedsInvestigation
low
Critical
166,885,213
nvm
`nvm run` does not work with files whose names consist of digits
If file name consist only digits before point, `nvm run` doesn't work. How test: ``` bash mkdir /tmp/nvm_run cd /tmp/nvm_run echo 'console.log("hi")' > 123.js nvm run 123.js ``` Output: ``` N/A: version "123.js" is not yet installed. You need to run "nvm install 123.js" to install it before using it. ``` The following file names are also not work: - `123` - `1.2.3.js` - `1.2.3.4.5.6.js` - `1.2.3.js` - `v123.js` - `v1.23.js` - `v1.js` - `v1` `nvm debug`: ``` nvm --version: v0.31.3 $SHELL: /bin/bash $HOME: /home/dima $NVM_DIR: '/tmp/nvm' $PREFIX: '' $NPM_CONFIG_PREFIX: '' nvm current: v6.3.0 which node: $NVM_DIR/versions/node/v6.3.0/bin/node which iojs: which npm: $NVM_DIR/versions/node/v6.3.0/bin/npm npm config get prefix: $NVM_DIR/versions/node/v6.3.0 npm root -g: $NVM_DIR/versions/node/v6.3.0/lib/node_modules ``` Debian GNU/Linux testing (stretch)
bugs,pull request wanted
low
Critical
166,912,236
three.js
Compress RectAreaLight BRDF Data and include in three.js build files
This issue can serve as discussion for improving the preliminary RectAreaLight implementation being reviewed in #9234. Currently, the BRDF for the RectAreaLight implementation is approximated using float textures totaling ~80kb when the data is included as discrete, raw, float values. Methods to compress that data need to be explored in order for it to be viable to include the data directly in the three.js source. Possible methods include: - fit a 3d surface function to each of the five 2d float data sets - compress the data (e.g. via a kmeans vectorization, or precision reduction) @bhouston @WestLangley @tschw
Enhancement
medium
Critical
166,933,990
TypeScript
Proposal: Type Relationship API
They type checker has no public API for checking type relationships or for looking up types in a given scope. This can make writing semantic-analysis informed lint rules very difficult (either because you need to replicate a lot of logic, or because you simply don't have enough information). Since [tslint enabled semantic checks](https://github.com/palantir/tslint/commit/9248e056c1a652ee13597e68da26cacf0b87e134) we now have a popular consumer who would very much like to be able to perform meaningful semantic comparisons (See [this rule](https://github.com/palantir/tslint/pull/1394#issuecomment-234384650) for instance). # Proposal A small new set of public API methods on the type checker: ``` ts interface TypeChecker { isIdenticalTo(a: Type, b: Type): boolean; // Exposes internal identity relationship isSubtypeOf(a: Type, b: Type): boolean; // Exposes internal structural subtype relationship isAssignableTo(a: Type, b: Type): boolean; // Exposes internal assignable relationship isComparableTo(a: Type, b: Type): boolean; // Exposes internal comparable relationship isInstantiationOf(a: GenericType, b: GenericType): boolean; // While not an internal relationship, it is a straightforward semantic question to ask an answer which requires internal APIs to answer lookupGlobalType(name: string): Type; // Looks up a global symbol named "name" with meaning SymbolFlags.Type (Identical to getGlobalType but without the expected arity based return value) - returns unknownType on failure lookupTypeAt(name: string, position: Node): Type // Resolve a symbol lexically at the position specified with meaning SymbolFlags.Type (identical to resolveName, but with less levers) - returns unknownType on failure getAnyType(): IntrinsicType; getStringType(): IntrinsicType; getNumberType(): IntrinsicType; getBooleanType(): IntrinsicType; getVoidType(): IntrinsicType; getUndefinedType(): IntrinsicType; getNullType(): IntrinsicType; getESSymbolType(): IntrinsicType; getNeverType(): IntrinsicType; getUnknownType(): IntrinsicType; getStringLiteralType(text: string): StringLiteralType; // When numeric literal types merge, they should have a similar endpoint } ``` While this isn't a complete set of APIs for manipulating the type checker (I've left off an API to programatically create new types for comparison), it is enough to do meaningful analysis with existing types in the compilation without resorting to brittle (or often wrong) syntax-based solutions.
Suggestion,In Discussion,API
high
Critical
166,950,085
TypeScript
Proposal: Type Builder API
Alongside the relationship API proposed in #9879, it would be very useful to expose an API to programatically build types - this is useful for making comparisons between a build-in type, and a type structure which isn't a part of the original compilation (lint rules, language service extensions, and external tools could find this a very useful API surface, and this is almost a prerequisite for a type provider-like feature). I have a [protototype here](https://github.com/weswigham/TypeScript/tree/type-builder), and the new API surface (excluding anything covered by #9879) looks like this: ``` ts interface TypeChecker { getTypeBuilder(): TypeBuilder; } interface TypeBuilder { startEnumType(): EnumTypeBuilder<Type>; startClassType(): ClassTypeBuilder<Type>; startInterfaceType(): InterfaceTypeBuilder<Type>; startTupleType(): TupleTypeBuilder<Type>; startUnionType(): UnionTypeBuilder<Type>; startIntersectionType(): IntersectionTypeBuilder<Type>; startAnonymousType(): AnonymousTypeBuilder<Type>; startNamespace(): NamespaceBuilder<Symbol>; startSignature(): SignatureBuilder<Signature>; // create an unbound type parameter, optionally with a constraint, for use in generic creation createTypeParameter(name: string, constraint?: Lazy<Type>): TypeParameter; // Useful for constructing reusable generics in your structures - probably need to make the params/type lazy createTypeAlias(name: string, params: TypeParameter[], type: Type): Symbol; // This way consumers can fill out generics - probably need to make the type/type arguments lazy getTypeReferenceFor(type: GenericType, ...typeArguments: Type[]): TypeReference; // Unsure about this one. Maybe there's a better way to make programmatic clodules and such? mergeSymbols(symbolA: Symbol, symbolB: Symbol): void; } const enum BuilderMemberModifierFlags { None = 0, Public = 1 << 0, Protected = 1 << 1, Private = 1 << 2, Readonly = 1 << 3 } namespace TypeBuilderKind { export type Namespace = "Namespace"; export const Namespace: Namespace = "Namespace"; export type Signature = "Signature"; export const Signature: Signature = "Signature"; export type Anonymous = "Anonymous"; export const Anonymous: Anonymous = "Anonymous"; export type Interface = "Interface"; export const Interface: Interface = "Interface"; export type Class = "Class"; export const Class: Class = "Class"; export type Tuple = "Tuple"; export const Tuple: Tuple = "Tuple"; export type Union = "Union"; export const Union: Union = "Union"; export type Intersection = "Intersection"; export const Intersection: Intersection = "Intersection"; export type Enum = "Enum"; export const Enum: Enum = "Enum"; } type TypeBuilderKind = TypeBuilderKind.Namespace | TypeBuilderKind.Signature | TypeBuilderKind.Anonymous | TypeBuilderKind.Interface | TypeBuilderKind.Class | TypeBuilderKind.Tuple | TypeBuilderKind.Union | TypeBuilderKind.Intersection | TypeBuilderKind.Enum; type Lazy<T> = T | (() => T); interface BaseTypeBuilder<FinishReturnType> { finish(): FinishReturnType; } interface EnumTypeBuilder<FinishReturnType> extends BaseTypeBuilder<FinishReturnType> { addMember(name: string, value: number): this; addMember(name: string): this; isConst(flag: boolean): this; setName(name: string): this; } interface StructuredTypeBuilder<FinishReturnType> extends BaseTypeBuilder<FinishReturnType> { addMember(name: string, flags: BuilderMemberModifierFlags, type: Lazy<Type>): this; buildMember(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Enum): EnumTypeBuilder<this>; buildMember(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Class): ClassTypeBuilder<this>; buildMember(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Interface): InterfaceTypeBuilder<this>; buildMember(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Tuple): TupleTypeBuilder<this>; buildMember(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Union): UnionTypeBuilder<this>; buildMember(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Intersection): IntersectionTypeBuilder<this>; buildMember(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Anonymous): AnonymousTypeBuilder<this>; buildMember(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Namespace): NamespaceBuilder<this>; buildMember(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Signature): SignatureBuilder<this>; } interface ClassTypeBuilder<FinishReturnType> extends StructuredTypeBuilder<FinishReturnType>, TypeParameterBuilder { setName(name: string): this; setBaseType(type: Lazy<Type>): this; buildBaseType(kind: TypeBuilderKind.Class): ClassTypeBuilder<this>; buildBaseType(kind: TypeBuilderKind.Interface): InterfaceTypeBuilder<this>; buildBaseType(kind: TypeBuilderKind.Anonymous): AnonymousTypeBuilder<this>; buildBaseType(kind: TypeBuilderKind.Intersection): IntersectionTypeBuilder<this>; buildBaseType(kind: TypeBuilderKind.Union): UnionTypeBuilder<this>; addImplementsType(type: Lazy<Type>): this; buildImplementsType(kind: TypeBuilderKind.Class): ClassTypeBuilder<this>; buildImplementsType(kind: TypeBuilderKind.Interface): InterfaceTypeBuilder<this>; buildImplementsType(kind: TypeBuilderKind.Anonymous): AnonymousTypeBuilder<this>; buildImplementsType(kind: TypeBuilderKind.Intersection): IntersectionTypeBuilder<this>; buildImplementsType(kind: TypeBuilderKind.Union): UnionTypeBuilder<this>; addStatic(name: string, flags: BuilderMemberModifierFlags, type: Lazy<Type>): this; buildStatic(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Class): ClassTypeBuilder<this>; buildStatic(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Interface): InterfaceTypeBuilder<this>; buildStatic(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Tuple): TupleTypeBuilder<this>; buildStatic(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Union): UnionTypeBuilder<this>; buildStatic(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Intersection): IntersectionTypeBuilder<this>; buildStatic(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Anonymous): AnonymousTypeBuilder<this>; buildStatic(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Signature): SignatureBuilder<this>; // buildStatic(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Enum): EnumTypeBuilder<this>; // buildStatic(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Namespace): NamespaceBuilder<this>; addConstructSignature(sig: Lazy<Signature>): this; buildConstructSignature(): SignatureBuilder<this>; } interface ObjectTypeBuilder<FinishReturnType> extends BaseTypeBuilder<FinishReturnType> { addCallSignature(sig: Lazy<Signature>): this; buildCallSignature(): SignatureBuilder<this>; addConstructSignature(sig: Lazy<Signature>): this; buildConstructSignature(): SignatureBuilder<this>; addStringIndexType(name: string, flags: BuilderMemberModifierFlags, type: Lazy<Type>): this; buildStringIndexType(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Class): ClassTypeBuilder<this>; buildStringIndexType(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Interface): InterfaceTypeBuilder<this>; buildStringIndexType(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Tuple): TupleTypeBuilder<this>; buildStringIndexType(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Union): UnionTypeBuilder<this>; buildStringIndexType(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Intersection): IntersectionTypeBuilder<this>; buildStringIndexType(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Anonymous): AnonymousTypeBuilder<this>; buildStringIndexType(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Signature): SignatureBuilder<this>; addNumberIndexType(name: string, flags: BuilderMemberModifierFlags, type: Lazy<Type>): this; buildNumberIndexType(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Class): ClassTypeBuilder<this>; buildNumberIndexType(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Interface): InterfaceTypeBuilder<this>; buildNumberIndexType(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Tuple): TupleTypeBuilder<this>; buildNumberIndexType(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Union): UnionTypeBuilder<this>; buildNumberIndexType(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Intersection): IntersectionTypeBuilder<this>; buildNumberIndexType(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Anonymous): AnonymousTypeBuilder<this>; buildNumberIndexType(name: string, flags: BuilderMemberModifierFlags, kind: TypeBuilderKind.Signature): SignatureBuilder<this>; } interface TypeParameterBuilder { // This overload is useful for making a TypeParameter yourself and threading it back in (as a type) // elsewhere in order to flow generics through a generated type addTypeParameter(type: Lazy<TypeParameter>): this; addTypeParameter(name: string, constraint?: Lazy<Type>): this; buildTypeParameter(name: string, kind: TypeBuilderKind.Class): ClassTypeBuilder<this>; buildTypeParameter(name: string, kind: TypeBuilderKind.Interface): InterfaceTypeBuilder<this>; buildTypeParameter(name: string, kind: TypeBuilderKind.Tuple): TupleTypeBuilder<this>; buildTypeParameter(name: string, kind: TypeBuilderKind.Union): UnionTypeBuilder<this>; buildTypeParameter(name: string, kind: TypeBuilderKind.Intersection): IntersectionTypeBuilder<this>; buildTypeParameter(name: string, kind: TypeBuilderKind.Anonymous): AnonymousTypeBuilder<this>; buildTypeParameter(name: string, kind: TypeBuilderKind.Signature): SignatureBuilder<this>; } interface InterfaceTypeBuilder<FinishReturnType> extends ObjectTypeBuilder<FinishReturnType>, TypeParameterBuilder, StructuredTypeBuilder<FinishReturnType> { setName(name: string): this; addBaseType(type: Lazy<Type>): this; buildBaseType(kind: TypeBuilderKind.Class): ClassTypeBuilder<this>; buildBaseType(kind: TypeBuilderKind.Interface): InterfaceTypeBuilder<this>; } interface CollectionTypeBuilder<FinishReturnType> extends BaseTypeBuilder<FinishReturnType> { addType(type: Lazy<Type>): this; // buildMemberType(kind: TypeBuilderKind.Namespace): NamespaceBuilder<this>; // buildMemberType(kind: TypeBuilderKind.Enum): EnumTypeBuilder<this>; buildMemberType(kind: TypeBuilderKind.Class): ClassTypeBuilder<this>; buildMemberType(kind: TypeBuilderKind.Interface): InterfaceTypeBuilder<this>; buildMemberType(kind: TypeBuilderKind.Tuple): TupleTypeBuilder<this>; buildMemberType(kind: TypeBuilderKind.Union): UnionTypeBuilder<this>; buildMemberType(kind: TypeBuilderKind.Intersection): IntersectionTypeBuilder<this>; buildMemberType(kind: TypeBuilderKind.Anonymous): AnonymousTypeBuilder<this>; buildMemberType(kind: TypeBuilderKind.Signature): SignatureBuilder<this>; } interface TupleTypeBuilder<FinishReturnType> extends CollectionTypeBuilder<FinishReturnType> {} export interface UnionTypeBuilder<FinishReturnType> extends CollectionTypeBuilder<FinishReturnType> {} export interface IntersectionTypeBuilder<FinishReturnType> extends CollectionTypeBuilder<FinishReturnType> {} export interface AnonymousTypeBuilder<FinishReturnType> extends ObjectTypeBuilder<FinishReturnType> { addMember(name: string, type: Lazy<Type>): this; buildMember(name: string, kind: TypeBuilderKind.Enum): EnumTypeBuilder<this>; buildMember(name: string, kind: TypeBuilderKind.Class): ClassTypeBuilder<this>; buildMember(name: string, kind: TypeBuilderKind.Interface): InterfaceTypeBuilder<this>; buildMember(name: string, kind: TypeBuilderKind.Tuple): TupleTypeBuilder<this>; buildMember(name: string, kind: TypeBuilderKind.Union): UnionTypeBuilder<this>; buildMember(name: string, kind: TypeBuilderKind.Intersection): IntersectionTypeBuilder<this>; buildMember(name: string, kind: TypeBuilderKind.Anonymous): AnonymousTypeBuilder<this>; buildMember(name: string, kind: TypeBuilderKind.Namespace): NamespaceBuilder<this>; buildMember(name: string, kind: TypeBuilderKind.Signature): SignatureBuilder<this>; } interface NamespaceBuilder<FinishReturnType> extends BaseTypeBuilder<FinishReturnType> { setName(name: string): this; addExport(symbol: Lazy<Symbol>): this; addExport(name: string, type: Lazy<Type>): this; buildExport(name: string, kind: TypeBuilderKind.Class): ClassTypeBuilder<this>; buildExport(name: string, kind: TypeBuilderKind.Interface): InterfaceTypeBuilder<this>; buildExport(name: string, kind: TypeBuilderKind.Tuple): TupleTypeBuilder<this>; buildExport(name: string, kind: TypeBuilderKind.Union): UnionTypeBuilder<this>; buildExport(name: string, kind: TypeBuilderKind.Intersection): IntersectionTypeBuilder<this>; buildExport(name: string, kind: TypeBuilderKind.Anonymous): AnonymousTypeBuilder<this>; buildExport(name: string, kind: TypeBuilderKind.Signature): SignatureBuilder<this>; buildExport(name: string, kind: TypeBuilderKind.Enum): EnumTypeBuilder<this>; buildExport(name: string, kind: TypeBuilderKind.Namespace): NamespaceBuilder<this>; } interface SignatureBuilder<FinishReturnType> extends BaseTypeBuilder<FinishReturnType>, TypeParameterBuilder { setName(name: string): this; setConstructor(flag: boolean): this; addParameter(name: string, type: Lazy<Type>): this; buildParameter(name: string, kind: TypeBuilderKind.Class): ClassTypeBuilder<this>; buildParameter(name: string, kind: TypeBuilderKind.Interface): InterfaceTypeBuilder<this>; buildParameter(name: string, kind: TypeBuilderKind.Tuple): TupleTypeBuilder<this>; buildParameter(name: string, kind: TypeBuilderKind.Union): UnionTypeBuilder<this>; buildParameter(name: string, kind: TypeBuilderKind.Intersection): IntersectionTypeBuilder<this>; buildParameter(name: string, kind: TypeBuilderKind.Anonymous): AnonymousTypeBuilder<this>; buildParameter(name: string, kind: TypeBuilderKind.Signature): SignatureBuilder<this>; setRestParameter(name: string, type: Lazy<Type>): this; buildRestParameter(name: string, kind: TypeBuilderKind.Class): ClassTypeBuilder<this>; buildRestParameter(name: string, kind: TypeBuilderKind.Interface): InterfaceTypeBuilder<this>; buildRestParameter(name: string, kind: TypeBuilderKind.Tuple): TupleTypeBuilder<this>; buildRestParameter(name: string, kind: TypeBuilderKind.Union): UnionTypeBuilder<this>; buildRestParameter(name: string, kind: TypeBuilderKind.Intersection): IntersectionTypeBuilder<this>; buildRestParameter(name: string, kind: TypeBuilderKind.Anonymous): AnonymousTypeBuilder<this>; buildRestParameter(name: string, kind: TypeBuilderKind.Signature): SignatureBuilder<this>; setReturnType(type: Lazy<Type>): this; buildReturnType(kind: TypeBuilderKind.Class): ClassTypeBuilder<this>; buildReturnType(kind: TypeBuilderKind.Interface): InterfaceTypeBuilder<this>; buildReturnType(kind: TypeBuilderKind.Tuple): TupleTypeBuilder<this>; buildReturnType(kind: TypeBuilderKind.Union): UnionTypeBuilder<this>; buildReturnType(kind: TypeBuilderKind.Intersection): IntersectionTypeBuilder<this>; buildReturnType(kind: TypeBuilderKind.Anonymous): AnonymousTypeBuilder<this>; buildReturnType(kind: TypeBuilderKind.Signature): SignatureBuilder<this>; setThisType(type: Lazy<Type>): this; buildThisType(kind: TypeBuilderKind.Class): ClassTypeBuilder<this>; buildThisType(kind: TypeBuilderKind.Interface): InterfaceTypeBuilder<this>; buildThisType(kind: TypeBuilderKind.Tuple): TupleTypeBuilder<this>; buildThisType(kind: TypeBuilderKind.Union): UnionTypeBuilder<this>; buildThisType(kind: TypeBuilderKind.Intersection): IntersectionTypeBuilder<this>; buildThisType(kind: TypeBuilderKind.Anonymous): AnonymousTypeBuilder<this>; buildThisType(kind: TypeBuilderKind.Signature): SignatureBuilder<this>; setPredicateType(argument: string, constraint: Lazy<Type>): this; buildPredicateType(argument: string, kind: TypeBuilderKind.Class): ClassTypeBuilder<this>; buildPredicateType(argument: string, kind: TypeBuilderKind.Interface): InterfaceTypeBuilder<this>; buildPredicateType(argument: string, kind: TypeBuilderKind.Tuple): TupleTypeBuilder<this>; buildPredicateType(argument: string, kind: TypeBuilderKind.Union): UnionTypeBuilder<this>; buildPredicateType(argument: string, kind: TypeBuilderKind.Intersection): IntersectionTypeBuilder<this>; buildPredicateType(argument: string, kind: TypeBuilderKind.Anonymous): AnonymousTypeBuilder<this>; buildPredicateType(argument: string, kind: TypeBuilderKind.Signature): SignatureBuilder<this>; } ``` which, in the end, looks like this when used: ``` ts const c1 = builder.startClassType() .addMember("x", BuilderMemberModifierFlags.Readonly, checker.getNumberType()) .addMember("y", BuilderMemberModifierFlags.Readonly, checker.getNumberType()) .buildConstructSignature() .addParameter("x", checker.getNumberType()) .addParameter("y", checker.getNumberType()) .setReturnType(getc1) .finish() .buildImplementsType(TypeBuilderKind.Interface) .addMember("x", BuilderMemberModifierFlags.Readonly, checker.getAnyType()) .addMember("y", BuilderMemberModifierFlags.Readonly, checker.getAnyType()) .setName("PointLike") .finish() .buildStatic("from", BuilderMemberModifierFlags.Public, TypeBuilderKind.Signature) .buildParameter("point", TypeBuilderKind.Anonymous) .addMember("x", checker.getNumberType()) .addMember("y", checker.getNumberType()) .finish() .setReturnType(() => c1) .finish() .finish(); if (checker.isAssignableTo(c1, someOtherType)) { // ... } ``` The goal is to have a fluent API capable of creating an immutable version of any type or structure expressible within the type system. From my prototyping experience, there are only a handful of locations where a link or cache needed to be added to ensure the checker never needs to try to access an AST backing the types - so these "synthetic" or "declarationless" types actually tend to work fairly well within the checker once those are in-place. A few more links or hooks likely need to be added on top of those to ensure that the values are only retrieved lazily (rather than applied eagerly on API type creation). The laziness is actually super important for creating circularly referential types with an immutable API (otherwise a type can't really get a handle to it's finished self before it is done). Known shortcoming: There's no method (in the type definition I have posted here) for making a member mapped to a well-known symbol, such as `Symbol.iterator`. I think this would just surface as parameters for object/class/interface members names taking `string | WellKnownSymbol` and having a method for looking up well-known symbols, though. cc: @ahejlsberg @mhegazy @DanielRosenwasser @rbuckton I'd love to hear everyone's thoughts on this - the general fluent creation API I've been working off and on for the last few weeks, and I think it has real promise for letting consumers make valid types safely (and the intellisense support is top notch).
Suggestion,Awaiting More Feedback
medium
Major
166,957,044
vscode
Indent Guides Have Breaks Where CodeLens UI is Rendered
- VS Code Version: 1.4.0-insiders (a4522) - OS Version: Windows 10 1607 (Build 14393) Steps to Reproduce: 1. Enable indent guides in VS Code. 2. Open code file that uses CodeLens (C#, etc.) 3. Observe breaks in rendered indent guides where CodeLens UI is rendered. ![image](https://cloud.githubusercontent.com/assets/208549/17044738/a29a2468-4f77-11e6-8e85-9e3ddaa41e0e.png)
feature-request,code-lens,editor-indent-guides
medium
Critical
166,973,016
nvm
`nvm use` does not fully respect `--silent`
It runs `nvm_rc_version`, which echos "Found ..." and "Now using..." All output should be silenced (or introduce --silence-all or `nvm --quiet use` or something)
feature requests,needs followup
low
Major
167,016,600
vscode
Cursor Up and Down should place the cursor at end of line if it's current state is end of line
- Move the cursor to End of line by using `End` or `Cmd + Right` - Now doing Up or Down commands should place the cursor at the End. But currently VS Code is placing the cursor at `min(previousPos, lineLength)`
feature-request,api,VIM
low
Minor
167,039,715
TypeScript
Suggestion: Allow local types to be declared in interfaces
I have something like this: ``` export interface Reducer<State, Types extends Action<string, any>> { add<TypeName extends string, Payload>(action: { type: TypeName, reduce: (state: State, action: Payload) => State }): Reducer<State, Types | Action<TypeName, Payload>>; readonly cursorType: Cursor<State, Types>; } ``` The details aren't that important except to illustrate that a `Reducer` is immutable, and has an `add` method that returns another `Reducer`, but see that the return type has something extra "unioned" into it. By repeated chained calls to `add` I can build up a big nasty old type that would be ugly to have fully declare by hand. Fortunately type inference takes care of building the type for me, which is great. Then elsewhere in my code I want to be able to declare something called a "cursor", which needs to have a type that corresponds to the reducer's type. The cursor could be a field in a class so I need to be able to refer to the type so I can declare such a field. So I want to provide a simple way to declare a const of the type "correct kind of cursor for a given reducer", leveraging the work that the TS compiler already did for me with its type inference. My slightly hacky approach, as shown above, is to declare a readonly field `cursorType`. The value of this is at runtime is junk and should not be used! So I need a "here be dragons" comment on it. Its only purpose is to be prefixed with `typeof`, e.g.: ``` const R = getReducerSomehow(); class Test { constructor(public readonly myCursor: typeof R.cursorType) { } } ``` To fill in the `cursorType` field of a `Reducer` I have to do this filth: ``` newReducer.cursorType = {} as Cursor<State, Types>; ``` So `cursorType` really should never be used as a value. It doesn't even need to exist as a value. It will cause a runtime error if anyone tries to used it as a cursor. Ugh. But how else can I make this elaborately computed type available conveniently? I'm wondering if TS could allow: ``` export interface Reducer<State, Types extends Action<string, any>> { add<TypeName extends string, Payload>(action: { type: TypeName, reduce: (state: State, action: Payload) => State }): Reducer<State, Types | Action<TypeName, Payload>>; // not currently possible: type CursorType = Cursor<State, Types>; } ``` i.e. a `type` alias can be added to an interface. So now my implementation of `Reducer` no longer has to do anything. No nasty dummy runtime variable hack required. And my usage example becomes: ``` const R = getReducerSomehow(); class Test { constructor(public readonly myCursor: R.CursorType) { } } ``` That is, `CursorType` is a type that can be referred to _as if_ it was a member of an instance. Similar I guess to: ``` namespace N { export type S = string; } const s: N.S = "hi"; ``` In which `N` is an object at runtime and yet can also be used to find the type `S`.
Suggestion,Awaiting More Feedback
medium
Critical
167,097,667
rust
"Type annotations needed" with mixed lifetimes in trait bounds
This was encountered from a [derive plugin that created where bounds for all member types](https://github.com/serde-rs/serde/issues/443#event-731862636). Occurs on stable, beta, and nightly. ``` rust struct S<'a>(&'a ()); trait Tr { } impl<T> Tr for Option<T> { } impl<'a> Tr for S<'a> where Option<&'a str>: Tr, Option<&'static str>: Tr { } ``` ``` error: mismatched types [--explain E0308] --> <anon>:5:1 |> 5 |> impl<'a> Tr for S<'a> where Option<&'a str>: Tr, Option<&'static str>: Tr { } |> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch note: expected type `Tr` note: found type `Tr` note: the lifetime 'a as defined on the impl at 5:0... --> <anon>:5:1 |> 5 |> impl<'a> Tr for S<'a> where Option<&'a str>: Tr, Option<&'static str>: Tr { } |> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: ...does not necessarily outlive the static lifetime error: aborting due to previous error ``` [playpen repro](https://is.gd/UgB9SI)
A-type-system,C-enhancement,A-lifetimes,P-medium,T-lang,T-types
low
Critical
167,113,479
vscode
Problem matchers for error messages that span multiple lines
- VSCode Version: 1.4.0-insider 01a3f8 - OS Version: Windows 10 x64 I'm unable to get a message built up from several lines in the output. In the output below, I would like the message to contain the spec name, and the reason it failed. Any ideas if this is possible? I have the following output from NUnit: ``` Project dotnettesting (.NETCoreApp,Version=v1.0) was previously compiled. Skipping compilation. NUnit .NET Core Runner 3.4.0 Copyright (C) 2016 Charlie Poole Runtime Environment OS Platform: Windows OS Version: 10.0.10586 Runtime: win10-x64 Test Files c:\projects\dotnettesting\bin\Debug\netcoreapp1.0\dotnettesting.dll Errors and Failures 1) Failed : CalculatorSpec.ShouldFail Expected: 0 But was: 3 at CalculatorSpec.ShouldFail() in c:\projects\dotnettesting\Calculator.spec.cs:line 12 2) Failed : CalculatorSpec.Will_Fail Expected: 0 But was: 3 at CalculatorSpec.Will_Fail() in c:\projects\dotnettesting\Calculator.spec.cs:line 17 Run Settings WorkDirectory: c:\projects\dotnettesting Test Run Summary Overall result: Failed Test Count: 3, Passed: 1, Failed: 2, Inconclusive: 0, Skipped: 0 Failed Tests - Failures: 2, Errors: 0, Invalid: 0 Start time: 2016-07-22 19:16:50Z End time: 2016-07-22 19:16:51Z Duration: 0.362 seconds Results saved as c:\projects\dotnettesting\TestResult.xml SUMMARY: Total: 1 targets, Passed: 0, Failed: 1. ``` I have configured the following problem matcher: ``` json "pattern": [ { "regexp": "^\\d+\\) Failed.*$" }, { "regexp": "^(.*)$", "message": 1 }, { "regexp": "^(.*)$", "message": 1 }, { "regexp": "^at (.*\\(\\)) in (.*):line (\\d+)$", "location": 3, "file": 2 } ] ```
feature-request,tasks
medium
Critical
167,124,410
go
proposal: io/v2: CopyBuffer should avoid ReadFrom/WriteTo
Currently, io.CopyBuffer uses WriteTo if the src supports it and ReadFrom if the dst supports it, presumably to avoid an allocation. The problem is that there exist certain io.ReaderFrom that are not efficient 100% of the time. For example, consider the following implementation of ReadFrom: ``` go type myWriter struct { w io.Writer } func (mw *myWriter) ReadFrom(src io.Reader) (int64, error) { if r, ok := mw.w.(io.ReaderFrom); ok { return r.ReadFrom(src) } return io.Copy(struct{ io.Writer }{mw}, src) } ``` This is unfortunate as myWriter satisfies the io.ReaderFrom interface, but it's implementation is no better than io.Copy (always incurring an allocation) in some circumstances. In the case of io.CopyBuffer, I would argue that the user's expectation is that the buffer passed in is _always_ used. It has the detriment of an extra copy, but I believe the cost of that is much lower than the allocation that is already saved by the user providing the buffer. It main benefit is that it avoids any shenanigans that occur because of inefficient implementations of io.ReaderFrom and io.WriterTo. Alternative is to do anonymous struct value hack: ``` go io.CopyBuffer(struct{ io.Writer }{dst}, struct{ io.Reader }{src}, buf) ``` But, this hack is not intuitive to most people. Filed on behalf of @jkji
Performance,v2,Proposal
medium
Critical
167,194,919
TypeScript
how can i implement ts.CompilerOptions in a class?
![image](https://cloud.githubusercontent.com/assets/937933/17079355/a476d0be-50db-11e6-880f-7a92f3eabdbf.png) ``` typescript class implements ts.CompilerOptions { } ```
Docs
low
Major
167,245,251
go
x/tools/cmd/goyacc: endless loop on unterminated comment at EOF
1. What version of Go are you using (`go version`)? go version go1.6.2 windows/amd64 go version devel +10538a8 Fri Jul 22 22:23:14 2016 +0000 windows/amd64 1. What operating system and processor architecture are you using (`go env`)? set GOARCH=amd64 set GOBIN= set GOEXE=.exe set GOHOSTARCH=amd64 set GOHOSTOS=windows set GOOS=windows set GOPATH=C:\Users\rillig\go set GORACE= set GOROOT=C:\Users\rillig\gomaster set GOTOOLDIR=C:\Users\rillig\gomaster\pkg\tool\windows_amd64 set CC=gcc set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Program Files\cygwin\tmp\go-build959343002=/tmp/go-build -gno-record-gcc-switches set CXX=g++ set CGO_ENABLED=1 1. What did you do? printf '%%\nstart : /\* empty \* {}\n%%\n' > endless.y go tool yacc endless.y 1. What did you expect to see? endless.y:3: unterminated comment at EOF 1. What did you see instead? No output, and the process apparently hangs in an endless loop.
Tools
low
Critical
167,254,733
go
x/tools/refactor/rename: fails to move nested packages on Windows with error "invalid move destination ... package or subpackage <origpkg> already exists" (suspect backslash vs. forward slash issue)
**1) What version of Go are you using (`go version`)?** ``` go version go1.5.2 windows/amd64 ``` Note: One of my colleagues first hit this same problem on 1.6.2. I personally happen to be still be using go 1.5.2 and would prefer not to upgrade right now on my laptop, but I at least endeavored to get the latest gomvpkg (which is where I think the bug is) and still saw this problem. In other words, I don't think this is specific to my having a core of 1.5.2, and I think this problem is present in the latest versions. **2) What operating system and processor architecture are you using (`go env`)?** ``` set GOARCH=amd64 set GOBIN= set GOEXE=.exe set GOHOSTARCH=amd64 set GOHOSTOS=windows set GOOS=windows set GOPATH=C:\temp\golang_bug_report\refactor\work set GORACE= set GOROOT=C:\Go set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64 set GO15VENDOREXPERIMENT= set CC=gcc set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 set CXX=g++ set CGO_ENABLED=1 ``` **3) What did you do?** Try to move a nested package on Windows using gomvpkg, such as: ``` %GOPATH%\bin\gomvpkg -from github.com/user/originalhello -to github.com/user/newhello ``` Details below, including (hopefully) exact steps to reproduce at the bottom. **4) What did you expect to see?** The package moved. **5) What did you see instead?** Failed to move package, with error: gomvpkg: invalid move destination: github.com/user/newhello; package or subpackage github.com/user/originalhello already exists. ## Details When moving a nested package such as "github.com/user/originalhello", gomvpkg fails with error reporting that the _original_ package already exists, such as: gomvpkg: invalid move destination: github.com/user/newhello; package or subpackage github.com/user/**originalhello** already exists. On Linux, moving the same nested packages seems to work. I suspect that the code is getting confused about backslash vs. slash on Windows, which causes a strings.Replace to fail, which then causes the code to think that the destination is the same as the source, which then causes sanity checking to fail, which then causes a failure to move the package as well as an error stating the (incorrect) destination already exists. (The primary problem is that the package move fails -- the fact that the error message is complaining that the _original_ package exists is a little confusing, given that upon reading the error message one might think "Of course the original package exists, but why is that causing a failure??". But I think that's due to the later code I think appropriately being paranoid and I think appropriately detecting that the earlier code had come up with an incorrect destination). Note: I am guessing that this particular failure is neither fixed by nor caused by #16384 ("refactor/rename: fix two bugs related to MS Windows' path separator") that was merged ~9 days ago. I could reproduce this particular failure both before the fix for #16384, as well as I seemed to still be able to reproduce this particular failure after updating to get the fix for #16384. I'll confess I'm still relatively new to Go, so please take with a healthy dose of salt, but I'm guessing this is the problematic code: https://github.com/golang/tools/blob/ed69e84b1518b5857a9f4e01d1f9cefdcc45246e/refactor/rename/mvpkg.go#L83 ``` go // Ensure directories have a trailing separator. dest := strings.Replace(pkg, filepath.Join(from, ""), filepath.Join(to, ""), 1) destinations[pkg] = filepath.ToSlash(dest) ``` If you set up a simple 'github.com/user/originalhello' package (detailed steps at end), and then do: ``` %GOPATH%\bin\gomvpkg -from github.com/user/originalhello -to github.com/user/newhello ``` Then, the corresponding values of the main variables in the snippet above will be: ``` pkg: "github.com/user/originalhello" from: "github.com/user/originalhello" to: "github.com/user/newhello" ``` And then strings.Replace will fail because `from` and `to` are first transformed to backslash on Windows by filepath.Join, with sample string values that are then passed into strings.Replace (substituting sample string values in here for illustration) would be: ``` go "github.com/user/originalhello" := strings.Replace("github.com/user/originalhello", "github.com\\user\\originalhello", "github.com\\user\\newhello", 1) ``` Note that the strings.Replace in this case is a no-op due to the mismatch between backslash vs. forward slash (that is, strings.Replace returns a string containing **originalhello**, rather than the expected **newhello**). The net result is the destination ends up incorrectly being the **same** as the source: ``` the destination for pkg: "github.com/user/originalhello" is destinations[pkg]: "github.com/user/originalhello" ``` Which I think then triggers this error in the later validation code that sees the incorrect _destination_ of 'originalhello' already exist: gomvpkg: invalid move destination: github.com/user/newhello; package or subpackage github.com/user/**originalhello** already exists. Detailed steps to reproduce at the end, including a few fmt.Print's that I used to output (more or less) the more detailed explanatory text above. ## Possible fix I'm definitely not 100% sure of this, but I suspect one fix might be to change from 'filepath.Join' to be 'path.Join' given I **think** that `pkg`, `from`, and `to` are import paths (with forward slashes) at this point and not locations on disk (with back slashes). ``` diff diff --git a/refactor/rename/mvpkg.go b/refactor/rename/mvpkg.go index cd416c5..e44b975 100644 --- a/refactor/rename/mvpkg.go +++ b/refactor/rename/mvpkg.go @@ -81,8 +81,8 @@ func Move(ctxt *build.Context, from, to, moveTmpl string) error { } // Ensure directories have a trailing separator. dest := strings.Replace(pkg, - filepath.Join(from, ""), - filepath.Join(to, ""), + path.Join(from, ""), + path.Join(to, ""), 1) destinations[pkg] = filepath.ToSlash(dest) } ``` That at least seemed to solve it for me, and "go test golang.org/x/tools/refactor/rename" still passes with that change (on Windows, anyway). If that is the proper fix, then it might be the case that the subsequent "destinations[pkg] = filepath.ToSlash(dest)" might no longer be needed, but I did not look at that aspect carefully at all (nor did I try to test removing that filepath.ToSlash) Or, if the appropriate fix is not changing filepath.Join to path.Join here, then I would guess the fix is otherwise to make the slash & backslash transformations consistent so that the strings.Replace succeeds. ## Detailed steps to reproduce Either follow these steps, or in theory pasting this into a Windows command prompt should work: ``` batch REM Follow steps from "How to Write Go Code" to set up a workspace, except REM name your package 'originalhello' rather than 'hello': mkdir C:\temp\golang_bug_report\refactor\work set GOPATH=C:\temp\golang_bug_report\refactor\work echo %GOPATH% mkdir %GOPATH%\src\github.com\user REM Create a hello world in github.com/user/originalhello: mkdir %GOPATH%\src\github.com\user\originalhello REM Create a file named hello.go in %GOPATH%\src\github.com\user\originalhello\hello.go, e.g.,: notepad %GOPATH%\src\github.com\user\originalhello\hello.go ``` // --------------------------- // sample file contents for hello.go: // --------------------------- ``` go package originalhello import "fmt" func main() { fmt.Printf("Hello, world.\n") } ``` And then continue on: ``` batch REM Confirm we can build this go install github.com/user/originalhello REM Get gomvpkg go get golang.org/x/tools/cmd/gomvpkg REM Run it! Try to rename .../originalhello to .../newhello, which incorrectly fails: %GOPATH%\bin\gomvpkg -from github.com/user/originalhello -to github.com/user/newhello ``` For me these steps then cause following error: gomvpkg: invalid move destination: github.com/user/newhello; package or subpackage github.com/user/originalhello already exists. ## Sample fmt.Println to dump incorrect Windows behavior of gomvpkg As mentioned above, here are the sample fmt.Print's that I used to try to illustrate the incorrect behavior when called on Windows with a nested package. (Apologies in advance if this is confusing, but these fmt.Print's include some explanatory text that assume the presence of the bug and that the bug is being triggered via the detailed steps to reproduce above. In other words, these are the fmt.Print's I happen to use to generate the more detailed text for my explanation above in this bug write up, so sending these along as well in case helpful): ``` diff diff --git a/refactor/rename/mvpkg.go b/refactor/rename/mvpkg.go index cd416c5..46c651a 100644 --- a/refactor/rename/mvpkg.go +++ b/refactor/rename/mvpkg.go @@ -83,10 +83,30 @@ func Move(ctxt *build.Context, from, to, moveTmpl string) error { dest := strings.Replace(pkg, filepath.Join(from, ""), filepath.Join(to, ""), 1) destinations[pkg] = filepath.ToSlash(dest) + + fmt.Printf("\nWith these inputs:\n\n") + fmt.Printf(" pkg: %q\n", pkg) + fmt.Printf(" from: %q\n", from) + fmt.Printf(" to: %q\n", to) + + fmt.Printf("\nReplace will fail when 'to' and 'from' are transformed to backslash on Windows:\n\n") + fmt.Printf(` %q := strings.Replace(%q, + %q, + %q, + 1)`, + destinations[pkg], + pkg, + filepath.Join(from, ""), + filepath.Join(to, "")) + + fmt.Printf("\n\nNet result is destination ends up incorrectly being same as source:\n\n") + fmt.Printf(" destination for: %q\n", pkg) + fmt.Printf(" is: %q\n\n", destinations[pkg]) + } ```
Tools,Refactoring
low
Critical
167,258,874
rust
path attribute on modules is useless in nested modules
My crate has some test support data in `tests/support/mod.rs`. When trying to load this module for unit tests like this: ``` rust mod tests { #[path="../tests/support/mod.rs"] mod support; } ``` I get an error like this: ``` error: couldn't read "src/tests/../tests/support/mod.rs": No such file or directory (os error 2) ``` In fact, specifying pretty much any path is going to fail, because the `src/tests/` directory does not exist, because I'm using a nested module and not a separate file. When using nested modules, I think the path at which relative path resolution should start should be the directory that the actual source file is in.
C-enhancement,A-diagnostics,P-low,E-mentor,T-compiler,E-medium
medium
Critical
167,442,730
flutter
Flutter should offer some way to test at a minimum size
@sethladd has recently started filing bugs about our Material Widgets looking wrong on an iPod touch (which is slightly less wide than the Nexus 5s many of us test on). Many of these bugs could presumably be caught by some automated system which at least tested to make sure views didn't throw exceptions at known resolutions. @Hixie says the hardest part about this is a "minimum size" and is less worried about the continuum of sizes above that. Example bugs include #5003 or #5019 (particularly #5019 looks like it could be caught in an automated fashion. FYI @yjbanov
a: tests,framework,f: material design,P2,team-design,triaged-design
low
Critical
167,464,152
flutter
Update license collection script to perform line wrapping and indentation normalization
This would improve both the rendering of the licenses and reduce the total number of licenses, which would reduce the executable size.
c: new feature,engine,P3,team-engine,triaged-engine
low
Minor
167,491,157
godot
3D KinematicBody is not correctly detecting collision with PlaneShape
**Operating system or device - Godot version:** Windows 10 64bit - Godot 2.1 RC1 **Issue description** (what happened, and what was expected): The KinematicBody `is_colliding()` function does not return true when the body is colliding with an object that has a PlaneShape collision shape. It does still get stopped by the object, but doesn't report the collision. **Steps to reproduce:** Create a StaticBody with a PlaneShape collision. Create a KinematicBody with a simple BoxShape collision, and add a script to it to move into the StaticBody. Print `is_colliding()`
bug,confirmed,topic:physics
low
Major
167,523,952
go
encoding/xml: panics with Field index out of range when XMLName is in embedded struct
Please answer these questions before submitting your issue. Thanks! 1. What version of Go are you using (`go version`)? `go version devel +67f799c Tue Jul 26 00:18:42 2016 +0000 linux/amd64` But it also affects the version of 1.6 on the playground at the moment. 1. What operating system and processor architecture are you using (`go env`)? ``` GOARCH="amd64" GOBIN="/home/sam/bin" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/sam" GORACE="" GOROOT="/home/sam/src/go" GOTOOLDIR="/home/sam/src/go/pkg/tool/linux_amd64" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build800221808=/tmp/go-build -gno-record-gcc-switches" CXX="g++" CGO_ENABLED="1" ``` 1. What did you do? When attempting to unmarshal XML into a struct that is composed of another struct that has an XMLName field that has a field number greater than or equal to the number of fields in the original struct, `finfo.Value` panics because reflect tries to get the value of the field in the parent struct at the location of `XMLName` in the child struct (which has a field index that is out of bounds when applied to the parent struct). For example, this contrived example panics: ``` go package main import ( "encoding/xml" ) type IQ struct { Type string `xml:"type,attr"` XMLName xml.Name `xml:"iq"` } func main() { resp := struct { IQ }{} xml.Unmarshal([]byte(`<iq/>`), &resp) } ``` ([Playground](https://play.golang.org/p/XY2iCSSduO)) but if we move the fields around: ``` go type IQ struct { XMLName xml.Name `xml:"iq"` Type string `xml:"type,attr"` } ``` it works ([Playground](https://play.golang.org/p/EUMfU7TFyi))
NeedsInvestigation,early-in-cycle
low
Critical
167,532,785
go
x/net/http2: Server doesn't respect client's flow control
Go's http2.Server doesn't respect the client's flow control. It accounts for it partly, and enforces the other direction (that the client can't send too much to the server), but does not ever deduct its own credit when sending DATA frames, and doesn't wait for flow control when doing so. In the process of fixing #16481 I had expected a test like this to hang: ``` go body := strings.Repeat("a", 16<<10) st := newServerTester(t, func(w http.ResponseWriter, r *http.Request) { println(r.RemoteAddr) // Write out a 16KB body which the client won't ever read. io.WriteString(w, body) }, optOnlyServer) defer st.Close() tr := &Transport{TLSClientConfig: tlsConfigInsecure} defer tr.CloseIdleConnections() // Verify we can do this over 4 times without hanging: for i := 0; i < 10; i++ { println(i) req, _ := http.NewRequest("GET", st.ts.URL, nil) res, err := tr.RoundTrip(req) if err != nil { t.Fatal(err) } res.Body.Close() println(i, "done") } ``` But it didn't. Add a test like that back once the http2.Server respects flow control.
NeedsFix
low
Minor
167,622,244
opencv
OpenCV Stereo SGBM release/debug results differ
<!-- 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.1 - Operating System / Platform => Windows 7 64 Bit - Compiler => Visual Studio 2015 - CPU => Intel Core i7 3770 (MMX, SSE, SSE2 ..., AVX) ##### Detailed description We observe different disparity maps calculated using 64 bit release and debug versions of the same example based on the SGBM stereo algorithm. Thanks for your help!! Silvano ##### Steps to reproduce Stereo pipeline configuration is described in the provided example. [opencv_sgbm_rel_dbg.zip](https://github.com/opencv/opencv/files/384020/opencv_sgbm_rel_dbg.zip)
bug,category: calib3d,affected: 3.4
low
Critical
167,662,910
opencv
crash at cv::TiffDecoder::readData(cv::Mat&)
based on opencv-2.4.10. my code was: ``` #include <opencv2/opencv.hpp> #include <iostream> #include <sys/time.h> using namespace std; using namespace cv; int main (int argc, char **argv) { cv::Mat img = cv::imread (argv[1], -1); cout << img.channels () << endl; return 0; } ``` the input image was http://img4y4.oss-cn-hangzhou.aliyuncs.com/imgs/201607/5790dc3534394.jpg . the program crashed and core dumped. ```Program terminated with signal 11, Segmentation fault. #0 0x00007f1fd15ab8dd in cv::TiffDecoder::readData(cv::Mat&) () from /usr/local/lib/libopencv_highgui.so.2.4```
bug,affected: 2.4,category: imgcodecs
low
Critical
167,685,620
youtube-dl
Embedded Videos Not Supported/Detected + Possible Solution
### Make sure you are using the _latest_ version: run `youtube-dl --version` and ensure your version is _2016.07.26.2_. 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 **2016.07.26.2** ### 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 --- ## A bit of background I'm an avid youtube-dl user and every once in a while I try to download a video. It sometimes happens that the video is embedded from another site (similar to YouTube), but youtube-dl doesn't detect it. This makes me have to dig through the source code to find the code for the embedded player and enter that into youtube-dl and this gets a bit annoying after 100 videos. Luckily pretty much all embedded YouTube players are supported, but others are not. So my question is, why can't we detect those as well? There is already a list of the supported sites so wouldn't it only be a matter of checking those domains in the source code and seeing if they're found in an attribute? ### So what the hell can we do? One way is to manually find and add support for every single embed that youtube-dl currently supports - the other is to automate it like I'm going to describe below: So let's say that I enter this page: http://unsupported-embed.com/video?id=123 and youtube-dl doesn't support it. Youtube-dl would then find all the attributes containing URLs (e.g <iframe src="**http://free-video-embeds.com**"></iframe>), add them to an array, loop through the array and check in the supported site list to find the embed. Once and if the embedded player is found it runs a new query for that URL to finally get the video. Now this could be a bit heavy to run in default so we it could simply be added as a super useful parameter like `--extensive-embed-search`. ## Currently Supported Embed [YouTube](http://www.webdevout.net/test?0XP&raw) [Vimeo](http://www.webdevout.net/test?0XN&raw) ## Currently Unsupported Embed [Twitter](https://dev.twitter.com/web/embedded-video) [Yahoo](https://www.yahoo.com/tv/39-agents-of-s-h-i-1430049850908726.html) [LiveLeak](http://www.webdevout.net/test?0XS&raw) [Ebaum's World](http://www.webdevout.net/test?0XR) [USANetwork](http://www.usanetwork.com/mrrobot/videos/rami-malek-talks-mr-robot-season20) **...and many more**
request
medium
Critical
167,740,665
TypeScript
Private/protected properties on siblings in union types
**TypeScript Version:** 1.8.9 **Code** ``` ts class Example { protected width = 0; constructor(sibling: Example | HTMLCanvasElement) { console.log(sibling.width); } } ``` **Expected behavior:** No errors. **Actual behavior:** Error: `Property 'width' does not exist on type 'Example | HTMLCanvasElement'. Line 4, column 31` The reason this error occurs is that the `width` property is `protected` on `Example` but `public` on `HTMLCanvasElement`. However, the error is confusing for two reasons: 1. The `width` property is available on both component properties in this situation. If the `sibling` parameter had a type of either `Example` or `HTMLCanvasElement`, the code would compile. 2. The error message doesn't explain why the property does not exist on the type. Understanding the error requires the knowledge that properties are only available on union types if they have the same privacy level, even if those properties would be accessible in the component types in the active context. I am not sure if there are situations in which the desired behavior is a compilation error when accessing a potentially protected property on a union type if that property is accessible on all component types. I can't think of any, and so I think the ideal situation would be that the compiler does not throw an error here. However, I think it would be an adequate solution to improve the error message. (I apologize if this has been reported/discussed before. I searched but couldn't find anything exactly along these lines.)
Suggestion,Help Wanted,Domain: Error Messages
low
Critical
167,833,378
godot
negative scale changed into rotation after a spatial node is translated using the 3d viewport gizmo
**Operating system or device - Godot version:** 2.1rc1 official win64 2.1beta official win64 2.0.4.1 stable official win64 2.0.2stable official win64 **Issue description** (what happened, and what was expected): When you set a negative scale for a Spatial node and move it using the 3d viewport gizmo, the inspector set the scale positive and change the Rotation to -180° on some axis. **Steps to reproduce:** Create a new scene with a TestCube. Set its scale to (-2, 1, 1) using the Inspector. Translate it to (3, 0, 0) using the 3d viewport gizmo. Look at the Inspector. - Scale became ( 2, 1, 1 ) - Rotation became ( -0, 0, -180 ) On the other hand, if you set the Translation using the Inspector, there is no such behavior. **Link to minimal example project** (optional but very welcome):
enhancement,topic:editor,usability,documentation
low
Major
167,896,578
flutter
Material components: Ability to long-press a menu icon to open menu, follow finger
A user should be able to long-press the three-dot menu icon in the upper right, and have the menu open. Then, the user should be able to move their finger down to an item and have the selection indicator follow their finger. All without lifting their finger. This behavior also applies to drop-down buttons, as seen in Buttons, Dropdown.
c: new feature,framework,f: material design,from: review,P2,team-design,triaged-design
low
Major
167,909,665
flutter
Once a drawer is transitioning out, don't let it grab taps on its components
A design review asked us for the following enhancement: Once a user triggers a transition to remove the left drawer from the screen, that drawer's components (e.g. checkboxes on the drawer) should no longer grab any inputs or taps. The reasoning: once you've requested the drawer to be removed, you no longer want to interact with its components.
framework,f: material design,from: review,P2,team-design,triaged-design
low
Minor
167,984,634
TypeScript
Trade-offs in Control Flow Analysis
Some rough notes from a conversation @ahejlsberg and I had earlier about trade-offs in the control flow analysis work based on running the real-world code (RWC) tests. For obvious reasons I'll be comparing what Flow does with similar examples to compare and contrast possible outcomes. The primary question is: When a function is invoked, what should we assume its side effects are? One option is to be _pessimistic_ and reset all narrowings, assuming that any function might mutate any object it could possibly get its hands on. Another option is to be _optimistic_ and assume the function doesn't modify any state. Both of these seem to be bad. This problem spans both locals (which might be subject to some "closed over or not" analysis) and object fields. #### Optimistic: Bad behavior on locals The TypeScript compiler has code like this: ``` ts enum Token { Alpha, Beta, Gamma } let token = Token.Alpha; function nextToken() { token = Token.Beta; } function maybeNextToken() { if (... something ...) { nextToken(); } } function doSomething() { if (token !== Token.Alpha) { maybeNextToken(); } // is this possible? if (token === Token.Alpha) { // something happens } } ``` Optimistically assuming `token` isn't modified by `maybeNextToken` incorrectly flags `token === Token.Alpha` as an impossibility. However, in other cases, this is a _good_ check to do! See later examples. #### Optimistic: Bad behavior on fields The RWC suite picked up a "bug" that looked like this: ``` ts // Function somewhere else declare function tryDoSomething(x: string, result: { success: boolean; value: number; }): void; function myFunc(x: string) { let result = { success: false, value: 0 }; tryDoSomething(x, result); if (result.success === true) { // %% return result.value; } tryDoSomething(x.trim(), result); if (result.success === true) { // ?? return result.value; } return -1; } ``` The `??` line here is _not_ a bug in the user code, but we thought it was, because after the `%%` block runs, the only remaining value in `result.success`'s domain is `false`. #### Pessimistic: Bad behavior on locals We found actual bugs (several!) in partner code that looked like this: ``` ts enum Kind { Good, Bad, Ugly } let kind: Kind = ...; function f() { if (kind) { log('Doing some work'); switch (kind) { case Kind.Good: // unreachable! } } } ``` Here, we detected the bug that `Kind.Good` (which has the falsy value `0`) is not in the domain of `kind` at the point of the `case` label. However, if we were fully pessimistic, we couldn't know that the global function `log` doesn't modify the global variable `kind`, thus incorrectly allowing this broken code. #### Pessimistic: Bad behavior on fields, example 1 [A question on flowtype SO is a good example of this](http://stackoverflow.com/questions/38531182/weird-method-cannot-be-called-on-possibly-null-undefined-value) A smaller example that demonstrates the behavior: ``` ts function fn(arg: { x: string | null }) { if (arg.x !== null) { alert('All is OK!'); // Flow: Not OK, arg.x could be null console.log(arg.x.substr(3)); } } ``` The problem here is that, pessimistically, something like this might be happening: ``` ts let a = { x: 'ok' }; function alert() { a.x = null; } fn(a); ``` #### Pessimistic: Bad behavior on fields, example 2 The TS compiler has code that looks like this (simplified): ``` ts function visitChildren(node: Node, visit: (node: Node) => void) { switch(node.kind) { case SyntaxKind.BinaryExpression: visit(node.left); visit(node.right); // Unsafe? break; case SyntaxKind.PropertyAccessExpression: visit(node.expr); visit(node.name); // Unsafe? break; } } ``` Here, we discriminated the `Node` union type by its `kind`. A pessimistic behavior would say that the second invocations are unsafe, because the call to `visit` may have mutated `node.kind` through a secondary reference and invalidated the discrimination. ### Mitigating with (shallow) inlining / analysis Flow does some assignment analysis to improve the quality of these errors, but it's obviously short of a full inlining solution, which wouldn't be even remotely practical. Some examples of how to defeat the analysis: ``` ts // Non-null assignment can still trigger null warnings function fn(x: string | null) { function check1() { x = 'still OK'; } if (x !== null) { check1(); // Flow: Error, x could be null console.log(x.substr(0)); } } ``` ``` ts // Inlining is only one level deep function fn(x: string | null) { function check1() { check2(); } function check2() { x = null; } if (x !== null) { check1(); // Flow: No error console.log(x.substr(0)); // crashes } } ``` #### Mitigating with `const` parameters A low-hanging piece of fruit is to allow a `const` modifier on parameters. This would allow a much faster fix for code that looks like this: ``` ts function fn(const x: string | number) { if (typeof x === 'string') { thisFunctionCannotMutateX(); x.substr(0); // ok } } ``` #### Mitigating with `readonly` fields The `visitChildren` example above might be mitigated by saying that `readonly` fields retain their narrowing effects even in the presence of intervening function calls. This is technically unsound as you may have both a `readonly` and non-`readonly` alias to the same property, but in practice this is probably very rare. #### Mitigating with other options Random ideas that got thrown out (will add to this list) but are probably bad? - `pure` modifier on functions that says this function doesn't modify anything. This is a bit impractical as we'd realistically want this on the vast majority of all functions, and it doesn't really solve the problem since lots of functions only modify _one_ thing so you'd really want to say "`pure` except for `m`" - `volatile` property modifier that says this "this property will change without notice". We're not C++ and it's perhaps unclear where you'd apply this and where you wouldn't.
Discussion
high
Critical
168,002,065
go
cmd/compile: print better error message when assigning to keywords
I saw a new programmer struggle with the following: ``` go func main() { map := "f" fmt.Println(map) } ``` which is an invalid program since `map` is a keyword. However, the error being printed is currently: ``` prog.go:6: syntax error: unexpected :=, expecting [ prog.go:7: syntax error: unexpected ), expecting [ prog.go:8: syntax error: unexpected }, expecting ] ``` It should really print a more helpful error message: ``` prog.go:6: identifier cannot be a keyword: map ``` /cc @griesemer
compiler/runtime
low
Critical
168,008,669
go
reflect: NamedOf
Consider adding a function to the reflect package for creating a new named type with a method set: ``` func NamedOf(t Type, name string, methods []Method) Type ``` (Broken out from #4146.)
NeedsFix,FeatureRequest,compiler/runtime
medium
Critical
168,027,617
go
x/crypto/ssh/agent: Support ssh.Signer for AddedKey
## 1. What version of Go are you using (`go version`)? go1.7rc3 ## 3. What did you do? I want to use a `crypto.Signer` as a private key for an SSH Agent. This would allow using keys that are stored on an HSM or have other reasons that a full `*rsa.PrivateKey` is not available. Creating an `ssh.Signer` from a `crypto.Signer` is provided by the [ssh.NewSignerFromSigner](https://godoc.org/golang.org/x/crypto/ssh#NewSignerFromSigner) function, but because of the `agent.Agent` interface, they are not possible to add to the SSH Agent. This is likely a change needed for #16304. ## 4. What did you expect to see? https://godoc.org/golang.org/x/crypto/ssh/agent#AddedKey The `agent.AddedKey` struct is used in the `agent.Agent` interface, through the `Add()` method. `AddedKey` asks for a Private Key (using `interface{}`), and optionally an SSH Certificate `*ssh.Certificate`. The `keyring` implementation of Add() then converts these into an [`ssh.Signer` interface](https://godoc.org/golang.org/x/crypto/ssh#Signer) : https://github.com/golang/crypto/blob/bc89c496413265e715159bdc8478ee9a92fdc265/ssh/agent/keyring.go#L127-L152 I believe any other implementations of the `agent.Agent` interface also follow this pattern, because the other methods of the interface require `ssh.Signer` as a return value. Happy to submit a CL if there is agreement on how to best do this.
NeedsInvestigation
low
Minor
168,078,204
go
cmd/trace: execution tracer is essentially not documented
I was able to find only 3 short mentions: - [Command trace](https://golang.org/cmd/trace/) - [Package trace](https://golang.org/pkg/runtime/trace/) - [Go 1.5 changelog](https://golang.org/doc/go1.5#trace_command) They are not very helpful. Compare this to how race detector ([article](https://golang.org/doc/articles/race_detector.html), [blog post](https://blog.golang.org/race-detector)) or pprof ([blog post](https://blog.golang.org/profiling-go-programs)) is documented. People on Reddit even think that [trace tool flopped](https://www.reddit.com/r/golang/comments/3isl6n/is_there_a_go_15_trace_tool_tutorial/). #11605 mentions future blog post, but it never materialised.
Documentation,NeedsInvestigation,compiler/runtime
medium
Critical
168,080,689
rust
Rust should allow specifying a custom .def file
… on Windows. Especially for `cdylib`s.
A-linkage,O-windows,T-compiler,C-feature-request
low
Minor
168,090,540
opencv
camera_calibration app fails fisheye calibration
Note I've accidentaly posted this as [issue #742](https://github.com/opencv/opencv_contrib/issues/742) in opencv_contrib. I've already closed it. Sorry for the noise. ##### System information - OpenCV => 3.1 https://github.com/opencv/opencv/commit/8cdd91cd236f88915eb34658527f511f8a321e86 - Operating System / Platform => Ubuntu Linux 14.04.4 x64 - Compiler => `gcc (Ubuntu/Linaro 4.7.3-12ubuntu1) 4.7.3` ##### Detailed description opencv offers a fisheye camera model. Currently the only in-tree sample application that allows camera calibration for these cameras is [samples/cpp/tutorial_code/calib3d/camera_calibration/camera_calibration.cpp](https://github.com/opencv/opencv/blob/master/samples/cpp/tutorial_code/calib3d/camera_calibration/camera_calibration.cpp). Although it has a (undocumented) configuration option for the fisheye model, calibration fails to return sensible results with at least one data-set (see below). `cv::fisheye` is still in active development and subject to [some,](http://answers.opencv.org/question/87904/camera_calibrationcpp-fisheye-calibration-aborted/) [headache](http://answers.opencv.org/question/80255/unknow-exception-when-using-fisheyecalibrate-function/), and issues #5389 With the recent interest in VR, AR, the use if `cv::fisheye`, will increase. As camera_calibration.cpp is part of the tutorials, it is the go-to place for newcomers. Having a working reference example for fisheye calibration in-tree would be beneficial for both users, and development. ##### Steps to reproduce - build opencv with samples (`cmake -DBUILD_EXAMPLES=1`) - download this example [data-set](https://github.com/derlunz/opencv-fisheye-calibration-set) - call `BUILD_PATH/bin/cpp-tutorial-camera_calibration config-fisheye.xml` - examine the undistorted image view at the end of the calibration process - examine the resulting file `out_camera_fisheye_data.xml` - the resulting camera parameters are clearly bogus, as can be seen, at the end of the calibration process. - lens distortion parameters returned by `cv::fisheye::calibrate` are all 0.0 - estimated camera parameters look sensible - undistorted images view at the end of the calibration process does not show a correctly undistorted images.
bug,category: calib3d,affected: 3.4
low
Minor
168,150,856
rust
Make LLVM better at using XMM registers to perform structure moves
Here's a small snippet of Servo code from block flow fragmentation: ``` servo[0x100bf974e] <+6638>: mov r10b, byte ptr [rbp - 0x729] servo[0x100bf9755] <+6645>: mov r9, qword ptr [rbp - 0x728] servo[0x100bf975c] <+6652>: mov rax, qword ptr [rbp - 0x720] servo[0x100bf9763] <+6659>: mov rdi, qword ptr [rbp - 0x718] servo[0x100bf976a] <+6666>: mov r8, qword ptr [rbp - 0x6c8] servo[0x100bf9771] <+6673>: mov rdx, qword ptr [rbp - 0x710] servo[0x100bf9778] <+6680>: mov qword ptr [rbp - 0x710], rdx servo[0x100bf977f] <+6687>: mov qword ptr [r13 + 0x78], r8 servo[0x100bf9783] <+6691>: mov qword ptr [r13 + 0x80], rdi servo[0x100bf978a] <+6698>: mov qword ptr [r13 + 0x88], rax servo[0x100bf9791] <+6705>: mov qword ptr [r13 + 0x90], r9 servo[0x100bf9798] <+6712>: mov byte ptr [r13 + 0x98], r10b servo[0x100bf979f] <+6719>: mov al, byte ptr [rbp - 0x34a] servo[0x100bf97a5] <+6725>: mov byte ptr [r13 + 0x9f], al servo[0x100bf97ac] <+6732>: mov ax, word ptr [rbp - 0x34c] servo[0x100bf97b3] <+6739>: mov word ptr [r13 + 0x9d], ax servo[0x100bf97bb] <+6747>: mov eax, dword ptr [rbp - 0x350] servo[0x100bf97c1] <+6753>: mov dword ptr [r13 + 0x99], eax servo[0x100bf97c8] <+6760>: mov eax, dword ptr [r13 + 0x15c] servo[0x100bf97cf] <+6767>: test ah, 0x6 servo[0x100bf97d2] <+6770>: je 0x100bf9949 ; <+7145> ``` I see this all over the place. It should be using XMM registers instead. This is bad because: (a) it clogs up the instruction stream; (b) it's an inefficient way to perform structure moves; (c) it kills tons of registers, resulting in spills elsewhere (notice rax, rdx, rdi, r8, r9, and r10 are all dead for no good reason); (d) it puts pressure on the register allocator, making compile times worse. Is there some way to get LLVM to emit the right thing here? cc @eddyb @brson
A-LLVM,I-slow,C-enhancement,A-codegen,O-x86_64,I-compiletime,T-compiler,E-help-wanted,C-optimization,O-x86_32
low
Major