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
309,118,332
neovim
:substitute and preserve case of replaced text
FEATURE REQUEST: New flag for the substitute command (:substitute / :s) to perform search and replace while keeping the case. Hello, in Vim/NeoVim/MacVim/gVim there is currently no built-in solution to run search-and-replace in a way that the replacement text has the same lower and upper case letters as the replaced text. We suggest to add a new flag [k] that enables this behaviour. k == keep EXAMPLE: ------------- foo Foo FOO ------------- :%s/foo/bar/k ------------- bar Bar BAR ------------- I guess the k flag would implicitly also activate the i flag. Additionally it could also be activated globally by extending the options "ignorecase" and "smartcase" with a new setting e.g. "keepcase". There is a plug-in called abolish.vim by Tim Pope that provides this feature, but we have the opinion that it could be built-in. https://github.com/tpope/vim-abolish Even the "enemy" has it built-in. http://ergoemacs.org/emacs/emacs_find_replace.html Thanks for thinking about it. Best regards, International Vim User Group on Telegram
enhancement,needs:vim-patch
medium
Major
309,135,932
rust
Confusing error message when returning impl Trait with multiple lifetimes
Given ```rust use std::fmt::Debug; fn foobar<'a, 'b>(foo: &'a str, bar: &'b str) -> impl Debug + 'a + 'b { (foo, bar) } fn main() { let foo = "hello".to_owned(); let bar = "world".to_owned(); println!("{:?}", foobar(&foo, &bar)); } ``` you currently (`rustc 1.26.0-nightly (188e693b3 2018-03-26)`) get the errors ``` error[E0623]: lifetime mismatch --> foo.rs:3:50 | 3 | fn foobar<'a, 'b>(foo: &'a str, bar: &'b str) -> impl Debug + 'a + 'b { | ------- ^^^^^^^^^^^^^^^^^^^^ | | | | | ...but data from `foo` is returned here | this parameter and the return type are declared with different lifetimes... error[E0623]: lifetime mismatch --> foo.rs:3:50 | 3 | fn foobar<'a, 'b>(foo: &'a str, bar: &'b str) -> impl Debug + 'a + 'b { | ------- ^^^^^^^^^^^^^^^^^^^^ | | | | | ...but data from `bar` is returned here | this parameter and the return type are declared with different lifetimes... ``` This not being an allowed syntax was briefly [mentioned by @nikomatsakis](https://github.com/rust-lang/rust/issues/34511#issuecomment-373423999) in #34511, quoting the relevant part of the comment: > This is kind of annoying to do; we can't use `'cx + 'gcx`. We can I suppose make a dummy trait: > > ```rust > trait Captures<'a> { } > impl<T: ?Sized> Captures<'a> for T { } > ``` > > and then return something like this `impl Iterator<Item = &'tcx Foo> + Captures<'gcx> + Captures<'cx>`. As far as I recall/can discover this limitation was never followed up on in that thread. --- After some RFC spelunking I cannot find anything restricting a type bound to having at most a single lifetime bound, [RFC 192 Appendix B](https://github.com/rust-lang/rfcs/blob/90a6f4e6901277e90f333e8228bef68a0db2e492/text/0192-bounds-on-object-and-generic-types.md#appendix-b-why-object-types-must-have-exactly-one-bound) may be relevant, but I don't believe that the `Trait` part of `impl Trait` is an "object type", it seems to me to be a "type parameter bound". Re-reading the `impl Trait` RFC series doesn't appear to clear this up, exactly what sort of syntax `Trait` is is never explicitly named, the [original RFC](https://github.com/rust-lang/rfcs/blob/master/text/1522-conservative-impl-trait.md#syntax) simply says > The proposed syntax is `impl Trait` in return type position, composing like trait objects to forms like `impl Foo+Send+'a`. It seems to me that supporting multiple lifetime bounds on `impl Trait` should be fine, conceptually it seems to be the equivalent of: ```rust use std::fmt::Debug; fn foobar<'a, 'b, T: Debug + 'a + 'b>(foo: &'a &'b T) { println!("{:?}", foo); } fn main() { let foo = "hello world"; { let bar = &foo; { let baz = &bar; foobar(baz); } } } ``` --- Whether or not `impl Trait` can be extended to support multiple lifetimes, it seems like there should be an error message that the form `impl Foo + 'a + 'b` is not valid currently, rather than some weird lifetime mismatch errors.
C-enhancement,A-diagnostics,A-lifetimes,T-compiler,A-impl-trait
low
Critical
309,197,578
godot
RichTextLabel::_process_line error makes Godot unresponsive during One-Click Deploy
<!-- Please search existing issues for potential duplicates before filing yours: https://github.com/godotengine/godot/issues?q=is%3Aissue --> **Godot version:** <!-- Specify commit hash if non-official. --> 3.02 **Issue description:** <!-- What happened, and what was expected. --> I have changed nothing in my program, but out of nowhere I can't One-Click Deploy my app to my phone without Godot freezing and the terminal goes to an endless loop saying: "error: richtextlabel::_process_line: index line=0 out of size" This may not be enough info, but again everything was running fine, then out of nowhere this is occurring.
bug,topic:editor,usability,high priority
medium
Critical
309,210,382
rust
Tracking issue for generalized two-phase borrows
This can be sort-of considered a tracking issue for the implementation of rust-lang/rfcs#2025 Right now, two phase borrow support can only handle the very simple case where there is exactly one activation point. In particular, this means we can't expose two-phase borrows to user code since the following wouldn't work: ```rust let x = &mut some_val; if some_cond { *x = 1; } else { *x = 2; } ``` We also intentionally limit two-phase borrows to a very narrow subset of its possible applications; specifically cases where the compiler is injecting mutable auto borrows which are used as method/function parameters. In practice, this covers the following cases: - using `x.some_method()` syntax, where some_method takes &mut self - using `Foo::some_method(&mut x, ...)` syntax - binary assignment operators (+=, -=, *=, etc.) Note this does /not/ include `IndexMut` operations at this time Basically, things that desugar to method calls with a mutable self parameter with the exception of `IndexMut`. The intention with these restrictions is leverage two-phase borrows to make MIR borrowck accept AST borrowck can, without introducing too much new flexibility (ref #48431 for a more detailed discussion of how and why this came to be). The eventual intention (per rust-lang/rfcs#2025) is to extend this to the general case outlined above, which is what this issue tracks.
C-enhancement,P-medium,A-NLL,C-tracking-issue,NLL-complete,S-tracking-design-concerns,T-types
low
Major
309,251,903
vscode
Issue reporter - disable extensions should be a button and not a link
Testing #46595 It is great that you can disable all extensions from the issue reporter. However, I got tricked by the fact that the action is triggered by a link. ![image](https://user-images.githubusercontent.com/172399/38014976-a2a1c358-326a-11e8-8914-369124d0e96c.png) I was expecting that the link points me to some documentation for how to do it. I therefore suggest that the link is replaced with a button `disable all extensions`. There could still be a link that points to the documentation for how to enable/disable extension (should cover the uninstall/install from the command line when an extension runs amoc on startup).
feature-request,issue-reporter
low
Minor
309,270,196
rust
Reject bounds in type aliases with edition 2024
I propose to make the `type_alias_bounds` lint deny-by-default with the next edition. See <https://github.com/rust-lang/rust/issues/21903> for more information on the issue being linted, and https://github.com/rust-lang/rust/pull/48326 and https://github.com/rust-lang/rust/pull/48909 for the PRs implementing the lint. Cc @nikomatsakis @Manishearth (and Manish told me to also Cc someone else but I forgot whom)
A-type-system,C-enhancement,A-trait-system,T-lang,WG-epoch,T-types
medium
Critical
309,319,897
You-Dont-Know-JS
Async & Performance Chapter 3: Promises - ReferenceError instead of TypeError
https://github.com/iDanbo/You-Dont-Know-JS/blob/master/async%20%26%20performance/ch3.md#swallowing-any-errorsexceptions ```javascript var p = new Promise( function(resolve,reject){ resolve( 42 ); } ); p.then( function fulfilled(msg){ foo.bar(); console.log( msg ); // never gets here :( }, function rejected(err){ // never gets here either :( } ); ``` I get a `ReferenceError: foo is not defined` instead of `TypeError`. Is it a typo? As I understood, the error will be caught anyway because of the spec changes, so running the code in Chrome will give `Uncaught (in promise) ReferenceError: foo is not defined`. But where is the `TypeError`?
for second edition
medium
Critical
309,357,514
rust
Try different Deref/PartialEq orderings before erroring
I just got this error: ```rust djc@djc-mbp cargo $ cargo check Compiling cargo v0.27.0 (file:///Users/djc/src/cargo) error[E0308]: mismatched types --> src/cargo/core/summary.rs:150:58 | 150 | dependencies.iter().find(|d| d.name() == dep_name) | ^^^^^^^^ expected struct `core::interning::InternedString`, found &str | = note: expected type `core::interning::InternedString` found type `&str` ``` `InternedString` implements `Deref<Target = str>`, so I'd expected that this could somehow be made to work. `*d.name() == *dep_name` seems to work, but dereferencing explicitly always feels bad. Is there a better way out here? If not, could this solution be suggested? cc @estebank @ehuss
C-enhancement,A-diagnostics,T-compiler,A-inference,D-confusing
low
Critical
309,360,955
youtube-dl
Unable to extract OpenGraph title
## 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 this: `[x]`) - Use the *Preview* tab to see what your issue will actually look like --- ### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2018.03.26.1*. If it's not, read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected. - [x ] I've **verified** and **I assure** that I'm running youtube-dl **2018.03.26.1** ### Before submitting an *issue* make sure you have: - [x ] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [ x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones - [x ] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser ### What is the purpose of your *issue*? - [x ] Bug report (encountered problems with youtube-dl) - [ ] Site support request (request for adding support for a new site) - [ ] Feature request (request for a new functionality) - [ ] Question - [ ] Other --- ### 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 the `-v` flag to **your command line** you run youtube-dl with (`youtube-dl -v <your command line>`), copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```): ``` [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['-v', 'https://www.prosieben.de/tv/late-night-berlin-mit-klaas-heufer-umlauf/video/13-ganze-folge-late-night-berlin-3-ganze-folge'] [debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252 [debug] youtube-dl version 2018.03.26.1 [debug] Python version 3.4.4 (CPython) - Windows-10-10.0.16299 [debug] exe versions: none [debug] Proxy map: {} [prosiebensat1] tv/late-night-berlin-mit-klaas-heufer-umlauf/video/13-ganze-folge-late-night-berlin-3-ganze-folge: Downloading webpage ERROR: Unable to extract OpenGraph title; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type youtube-dl -U to update. Be sure to call youtube-dl with the --verbose flag and include its complete output. Traceback (most recent call last): File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph9lcnopy\build\youtube_dl\YoutubeDL.py", line 785, in extract_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph9lcnopy\build\youtube_dl\extractor\common.py", line 440, in extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph9lcnopy\build\youtube_dl\extractor\prosiebensat1.py", line 450, in _real_extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph9lcnopy\build\youtube_dl\extractor\prosiebensat1.py", line 398, in _extract_clip File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph9lcnopy\build\youtube_dl\extractor\common.py", line 920, in _og_search_title File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph9lcnopy\build\youtube_dl\extractor\common.py", line 908, in _og_search_property File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph9lcnopy\build\youtube_dl\extractor\common.py", line 808, in _search_regex youtube_dl.utils.RegexNotFoundError: Unable to extract OpenGraph title; 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. ... <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.prosieben.de/tv/late-night-berlin-mit-klaas-heufer-umlauf/video/13-ganze-folge-late-night-berlin-3-ganze-folge - Single video: https://www.prosieben.de/tv/late-night-berlin-mit-klaas-heufer-umlauf/video/12-ganze-folge-late-night-berlin-2-ganze-folge Note that **youtube-dl does not support sites dedicated to [copyright infringement](https://github.com/rg3/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free)**. In order for site support request to be accepted all provided example URLs should not violate any copyrights. --- ### Description of your *issue*, suggested solution and other information 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* requires account credentials please provide them or explain how one can obtain them. Last week I was able to download the second link I gave above (with an older version of youtube-dl.exe). But today both links provided doesn't work (anymore), giving me the OpenGraph-Error. Thanks for reading my issue!
geo-restricted
low
Critical
309,406,293
puppeteer
Headless PDF printing inconsistent page width and height
I'm currently encountering some potential rounding issues with the PDF page size where I have to use an additional few 10ths of a millimetre on the width and height for the pages, the `@page`s declaration in my CSS, and also the CSS height of my `section`s to render (mostly) correctly. Even after adding the extra mm to cover the issue, the width then increases by about 1-2mm on either side of the page, only when Puppeteer is used to generate the PDF, but not when printed as PDF directly from my local Chrome (65.0.3325.181). The removal of the additional mm breaks the layout in both local Chrome and puppeteer rendered PDFs. Possibly similar issue to #666. **Tell us about your environment:** * Puppeteer version: 1.2.0 * Platform / OS version: MacOS 10.13.3 * URLs (if applicable): https://gist.github.com/Jarrydcrawford/9b64fc289e58d990aa4a8990331538e4 * Node.js version: 8.10.0 **What steps will reproduce the problem?** ```js const puppeteer = require('puppeteer'); const fs = require('fs'); const DELTA = 0.27; // closest additional mm to not break layout (async () => { let browser; try { browser = await puppeteer.launch({ headless: true, args: [ '--no-sandbox', '--disable-setuid-sandbox', '--disable-gpu', '--hide-scrollbars', '--disable-web-security', ], }); const page = await browser.newPage(); await page.goto( `data:text/html,${fs.readFileSync('index.html').toString('utf8')}`, ); await page.pdf({ path: './index.pdf', displayHeaderFooter: false, printBackground: true, pageRanges: '1-2', height: 139 + DELTA + 3 + 3 + 'mm', // Additional page margins of 3mm width: 550 + DELTA + 3 + 3 + 'mm', // Additional page margins of 3mm margin: { top: 0, right: 0, bottom: 0, left: 0, }, }); await browser.close(); } catch (err) { if (browser) { await browser.close(); } throw err; } })(); ``` 1. `node index.js`. 2. Open PDF. 3. Open HTML file directly in Chrome browser. 4. Print as PDF. 5. Compare (may have to zoom in to see). **What is the expected result?** PDF should not have any margin/whitespace on the page edges. **What happens instead?** There is a horizontal page gap on either side of each page of about 1mm. Should not need to use any additional mm adjustment - raw sizes should render as expected.
bug,upstream,chromium,confirmed
high
Critical
309,428,051
pytorch
Repeated 'python setup.py install' with clang leads to -lcpuinfo not found
Steps to reproduce: ``` docker run -it registry.pytorch.org/pytorch/pytorch-linux-xenial-py3-clang5-asan:169 /bin/bash cd ~ git clone https://github.com/pytorch/pytorch cd pytorch CC=clang CXX=clang++ LDSHARED='clang --shared' LDFLAGS=-stdlib=libstdc++ NO_CUDA=1 python setup.py build_deps develop CC=clang CXX=clang++ LDSHARED='clang --shared' LDFLAGS=-stdlib=libstdc++ NO_CUDA=1 python setup.py build_deps develop ``` Error message: ``` /usr/bin/ld: cannot find -lcpuinfo clang: error: linker command failed with exit code 1 (use -v to see invocation) src/ATen/CMakeFiles/ATen.dir/build.make:3388: recipe for target 'src/ATen/libATen.so.1' failed make[2]: *** [src/ATen/libATen.so.1] Error 1 CMakeFiles/Makefile2:147: recipe for target 'src/ATen/CMakeFiles/ATen.dir/all' failed make[1]: *** [src/ATen/CMakeFiles/ATen.dir/all] Error 2 Makefile:129: recipe for target 'all' failed make: *** [all] Error 2 ``` cc @malfet @seemethere @walterddr
module: build,triaged
low
Critical
309,466,162
youtube-dl
"OSError: Failed to write string" // Bilibili // Windows 7 x64 // Python 3.6.1
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2018.03.26.1** - [x] I have at least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [x] I have [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones - [x] I have checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser ### What is the purpose of your *issue*? - [x] I'm filing a bug report (encountered problems with youtube-dl) ### Log ``` G:\[T] == TORRENTS COMPLETE ==>youtube-dl --verbose https://www.bilibili.com/video/av19673092/ [debug] System config: [] [debug] User config: ['-o', 'G:/DOWNLOADED/%(title)s.%(ext)s', '-f', 'bestvideo[height<=?1080][vcodec!=?vp9][ext=mp4]+bestaudio[ext=m4a]/best[height<=?1080][ext =mp4]/best', '--merge-output-format', 'mkv'] [debug] Custom config: [] [debug] Command-line args: ['--verbose', 'https://www.bilibili.com/video/av19673092/'] [debug] Encodings: locale cp1252, fs utf-8, out utf-8, pref cp1252 [debug] youtube-dl version 2018.03.26.1 [debug] Python version 3.6.1 (CPython) - Windows-7-6.1.7601-SP1 [debug] exe versions: ffmpeg N-65476-ge18d9d9, ffprobe N-65476-ge18d9d9, phantomjs 2.1.1 [debug] Proxy map: {} [BiliBili] 19673092: Downloading webpage [BiliBili] 19673092: Downloading video info page Traceback (most recent call last): File "e:\python3\3.6.1x64\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "e:\python3\3.6.1x64\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "E:\Python3\3.6.1x64\Scripts\youtube-dl.exe\__main__.py", line 9, in <module> File "e:\python3\3.6.1x64\lib\site-packages\youtube_dl\__init__.py", line 471, in main _real_main(argv) File "e:\python3\3.6.1x64\lib\site-packages\youtube_dl\__init__.py", line 461, in _real_main retcode = ydl.download(all_urls) File "e:\python3\3.6.1x64\lib\site-packages\youtube_dl\YoutubeDL.py", line 1989, in download url, force_generic_extractor=self.params.get('force_generic_extractor', False)) File "e:\python3\3.6.1x64\lib\site-packages\youtube_dl\YoutubeDL.py", line 796, in extract_info return self.process_ie_result(ie_result, download, extra_info) File "e:\python3\3.6.1x64\lib\site-packages\youtube_dl\YoutubeDL.py", line 892, in process_ie_result self.to_screen('[download] Downloading playlist: %s' % playlist) File "e:\python3\3.6.1x64\lib\site-packages\youtube_dl\YoutubeDL.py", line 495, in to_screen return self.to_stdout(message, skip_eol, check_quiet=True) File "e:\python3\3.6.1x64\lib\site-packages\youtube_dl\YoutubeDL.py", line 509, in to_stdout self._write_string(output, self._screen_file) File "e:\python3\3.6.1x64\lib\site-packages\youtube_dl\YoutubeDL.py", line 498, in _write_string write_string(s, out=out, encoding=self.params.get('encoding')) File "e:\python3\3.6.1x64\lib\site-packages\youtube_dl\utils.py", line 1408, in write_string if _windows_write_string(s, out): File "e:\python3\3.6.1x64\lib\site-packages\youtube_dl\utils.py", line 1392, in _windows_write_string raise OSError('Failed to write string') OSError: Failed to write string ``` --- I feel that no further description is necessary. I can otherwise download from other sources just fine -- only Bilibili seems to have this issue. I was also unable to find "OSError" or "failed to write string" in conjunction w/ Bilibili anywhere in the issues.
cant-reproduce
low
Critical
309,525,270
neovim
writedelay cannot be canceled
Using `:set writedelay=10` and then calling `:redraw!` cannot be canceled using `Ctrl-c`: Neovim will stop the delayed redrawing, but appears to still apply the delays, i.e. it takes a while until the screen is updated and it accepts input again. Vim behaves better in this regard. NVIM v0.2.3-901-ga9c94f7bb
bug,ui
low
Major
309,536,934
pytorch
[feature request] DC-ASGD (Delay Compensated Asynchronous Stochastic Gradient Descent)
DC-ASGD is an optimizer described in this [paper](https://arxiv.org/abs/1609.08326) Frameworks like [MXNET](https://mxnet.apache.org/api/python/optimization/optimization.html#mxnet.optimizer.DCASGD) have the feature, are there plans to implement this feature into PyTorch? If approved by community, I would like to start the process of a feature request. I'm happy to create a pull request and implement the code after discussion.
oncall: distributed,module: optimizer,triaged
low
Major
309,537,688
go
cmd/compile: opt: reuse interface payload during interface conversion
The current representation of interface values is a two-word (type, data) pair where data is always a reference; multiword values such as strings must be copied to a hidden variable whose address is saved in the data field. The compiler is currently smart about avoiding unnecessary allocations in some cases, such as this one: ``` func f(x interface{}) interface{} { return x.(string) } ``` However, if the interface type has methods, the compiler does not appear to perform this optimization: ``` type S string func (S) f() {} type I interface{ f() } func f(x interface{}) I { return x.(S) // calls runtime.convT2Istring } ``` It would be nice if it did; I suspect the hard part is mostly done already. The fact that assigning a string value to an interface variable allocates memory caught me out when I first noticed it in a profile.
Performance,compiler/runtime
low
Major
309,580,132
flutter
Friction adding swift plugin to objective-c project
`flutter create` a non-swift project In `pubspec.yaml`, add a swift plugin such as `flutter_iap`. 1. `flutter run` warns about `use_frameworks!` from `pod install`. Easy to resolve so far. 2. Building gives `The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. This setting can be set in the build settings editor.` error. Seems like swift pod developers need to specify `s.pod_target_xcconfig = { 'SWIFT_VERSION' => <a version above 2.3 for it to work with Xcode 9> }` in their podspec. Added temporary hack in Podfile with ```ruby post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['SWIFT_VERSION'] = '3.2' end end end ``` and re-`pod install` 3. ``` #import "Headers/flutter_iap-umbrella.h" ^ .../ios/Pods/Target Support Files/flutter_iap/flutter_iap-umbrella.h:13:9: error: include of non-modular header inside framework module 'flutter_iap': '.../.pub-cache/hosted/pub.dartlang.org/flutter_iap-1.0.1/ios/Classes/FlutterIapPlugin.h' ``` Add ```ruby pre_install do |installer| # workaround for https://github.com/CocoaPods/CocoaPods/issues/3289 Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {} end ``` and ```ruby post_install do |installer| installer.pods_project.targets.each do |target| # workaround for https://github.com/CocoaPods/CocoaPods/issues/7463 target.headers_build_phase.files.each do |file| file.settings = { 'ATTRIBUTES' => ['Public'] } end end end ``` to make it work. Wonder if we can add some automatic handling of swift plugins in the default objective-c project's Podfile
platform-ios,tool,a: first hour,t: xcode,P2,a: plugins,team-ios,triaged-ios
low
Critical
309,633,280
youtube-dl
[ninateka] "unsupported" error.
Hello, I am using windows version 2018.03.26. This site http://ninateka.pl/ return "unsupported" error. **url examples:** http://ninateka.pl/film/2007-macbeth http://ninateka.pl/film/swiadkowie-albo-nasza-mala-stabilizacja-jerzy-jarocki **Below one feedback:** youtube-dl -v "http://ninateka.pl/film/2007-macbeth" [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['-v', 'http://ninateka.pl/film/2007-macbeth'] [debug] Encodings: locale cp1250, fs mbcs, out cp852, pref cp1250 [debug] youtube-dl version 2018.03.26.1 [debug] Python version 3.4.4 (CPython) - Windows-10-10.0.16299 [debug] exe versions: none [debug] Proxy map: {} [generic] 2007-macbeth: Requesting header WARNING: Could not send HEAD request to http://ninateka.pl/film/2007-macbeth: HTTP Error 500: Internal Server Error [generic] 2007-macbeth: Downloading webpage WARNING: Falling back on generic information extractor. [generic] 2007-macbeth: Extracting information ERROR: Unsupported URL: http://ninateka.pl/film/2007-macbeth Traceback (most recent call last): File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph9lcnopy\build\youtube_dl\YoutubeDL.py", line 785, in extract_info File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph9lcnopy\build\youtube_dl\extractor\common.py", line 440, in extract File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph9lcnopy\build\youtube_dl\extractor\generic.py", line 3143, in _real_extract youtube_dl.utils.UnsupportedError: Unsupported URL: http://ninateka.pl/film/2007-macbeth Thanks for your answer.
site-support-request
low
Critical
309,675,038
react-native
zIndex in a List
<!-- We use GitHub Issues exclusively for tracking bugs in React Native. Questions? Visit http://facebook.github.io/react-native/help.html If this issue is about documentation or the website, please file it at: https://github.com/facebook/react-native-website/issues/new --> - [x] I have reviewed the [documentation](https://facebook.github.io/react-native) - [x] I have searched [existing issues](https://github.com/facebook/react-native/issues) - [x] I am using the [latest React Native version](https://github.com/facebook/react-native/releases) <!-- Describe your issue in detail. --> This is actually a reopen of my #16878 issue. I've got some thumbs up, so I think I am not the only one with this issue. This time I updated my example project to a pure rn project with the latest release ([rn Branche](https://github.com/TheNoim/zIndexBug/tree/rn)) ## Environment <!-- Required. Run `react-native info` in your terminal and paste its contents here. --> ``` info React Native Environment Info: System: OS: macOS High Sierra 10.13.6 CPU: (8) x64 Intel(R) Core(TM) i7-4790K CPU @ 4.00GHz Memory: 94.53 MB / 16.00 GB Shell: 5.3 - /bin/zsh Binaries: Node: 10.12.0 - ~/.nvm/versions/node/v10.12.0/bin/node Yarn: 1.16.0 - ~/.nvm/versions/node/v10.12.0/bin/yarn npm: 6.9.0 - /usr/local/bin/npm Watchman: 4.9.0 - /usr/local/bin/watchman SDKs: iOS SDK: Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1 Android SDK: API Levels: 23 Build Tools: 23.0.1 IDEs: Xcode: 10.1/10B61 - /usr/bin/xcodebuild npmPackages: react: 16.8.3 => 16.8.3 react-native: 0.59.8 => 0.59.8 npmGlobalPackages: react-native-cli: 2.0.1 react-native-git-upgrade: 0.2.7 ``` ## Steps to Reproduce <!-- Required. Let us know how to reproduce the issue. Include a code sample, share a project, or share an app that reproduces the issue using [Snack](https://snack.expo.io/). --> 1. Make a list (FlatList or Array.map, it happens with both) 2. The renderItem should get an onPress event 3. The onPress event changes the style to a high zIndex and position absolute ## Expected Behavior I expect that the component with the high zIndex is over every other component. ## Actual Behavior <!-- Write what happened. Include screenshots if needed. If this is a regression, let us know. --> It seems like it ignores the zIndex property. The behavior is exactly like I would not apply any zIndex. I can remove the zIndex and I get the same result. [Google Drive Link](https://drive.google.com/file/d/1sqsjFTZwLdMe4zWzq8QV7ouV2xW84Lc2/view?usp=sharing) to a screenshot. ### Reproducible Demo [Github Demo Project rn Branche](https://github.com/TheNoim/zIndexBug/tree/rn) This is just an extract out of my current rn project. [Expo Link](https://expo.io/@noim/zindexbug) (Not on the latest rn version) [Google Drive Video which show the issue](https://drive.google.com/file/d/15KRnOCOdWQhnQMA9IIforTDjcZH_k3jD/view?usp=sharing)
Help Wanted :octocat:,Issue: Author Provided Repro,Component: FlatList,Bug
medium
Critical
309,700,531
youtube-dl
Add support for orfium.com
- [x] I've **verified** and **I assure** that I'm running youtube-dl **2018.03.26.1** ### Before submitting an *issue* make sure you have: - [x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones - [x] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser ### What is the purpose of your *issue*? - [ ] Bug report (encountered problems with youtube-dl) - [x] Site support request (request for adding support for a new site) - [ ] Feature request (request for a new functionality) - [ ] Question - [ ] Other ### If the purpose of this *issue* is a *bug report*, *site support request* or you are not completely sure provide the full verbose output as follows: ``` $ youtube-dl -v https://www.orfium.com/track/694466/misery-aciou/ [debug] System config: [] [debug] User config: [] [debug] Custom config: [] [debug] Command-line args: ['-v', 'https://www.orfium.com/track/694466/misery-aciou/'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2018.03.26.1 [debug] Python version 3.5.4 (CPython) - Linux-4.15.1-gentoo-x86_64-AMD_Ryzen_7_1800X_Eight-Core_Processor-with-gentoo-2.4.1 [debug] exe versions: ffmpeg 3.3.6, ffprobe 3.3.6 [debug] Proxy map: {} [generic] misery-aciou: Requesting header WARNING: Falling back on generic information extractor. [generic] misery-aciou: Downloading webpage [generic] misery-aciou: Extracting information [generic] a281276f-8126-48aa-98ad-9121c282e6eb-1522252311-preview: Requesting header [debug] Default format spec: bestvideo+bestaudio/best [debug] Invoking downloader on 'https://cdn.orfium.com/tracks/a281276f-8126-48aa-98ad-9121c282e6eb-1522252311-preview.mp3' [download] Destination: a281276f-8126-48aa-98ad-9121c282e6eb-1522252311-preview-a281276f-8126-48aa-98ad-9121c282e6eb-1522252311-preview.mp3 [download] 100% of 2.33MiB in 00:00 ``` --- ### 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 track: https://www.orfium.com/track/694466/misery-aciou/ --- ### Description of your *issue*, suggested solution and other information Site seems to be new, less horrible version of soundcloud. Generic fallback extractor pulls 1m preview tracks. Even though full tracks are easily available and scheme seems to be pretty straightforward: Preview - https://cdn.orfium.com/tracks/a281276f-8126-48aa-98ad-9121c282e6eb-1522252311-preview.mp3 Full track - https://cdn.orfium.com/tracks/a281276f-8126-48aa-98ad-9121c282e6eb-1522252307.mp3 Could not find a single playlist on the site though - every lookup returns empty. Not sure if they are implemented yet.
site-support-request
low
Critical
309,701,010
vue
root opts attributes support
### What problem does this feature solve? The desired opts feature should offer the possibility to provide data from the markup (mostly from backend) to the vue instance. So you can pass options/params from outside the vue scope. Example use case: https://forum.vuejs.org/t/passing-props-to-root-instances-in-2-0/244 Right now this requires custom helpers/code to pipe the data through to the component. Much better would be a more comfortable way similar the way riot does it with opts http://riotjs.com/api/#mounting ### What does the proposed API look like? Since the instance root is not a custom tag (compared to riot) I can imagine using prefixed attributes e.g. `data-opt-[NAME]` So the root may look like this: ```html <div id="myRoot" data-opt-firstname="John" data-opt-lastname="Smith"></div> ``` and within the template you can access it as ``` <template> <span>Hello {{ opts.firstname }} {{ opts.lastname }}</span> </template> ``` <!-- generated by vue-issues. DO NOT REMOVE -->
feature request
low
Major
309,716,937
pytorch
Well documented, safe method to deserialize model parameters from untrusted sources
Hi, I propose to add a safe way to store/load model weights (safe = can safely use weights downloaded from the internet). My vision: - a serialization mechanism that is currently officially supported uses pickle (protocol=2) to store/load weights. Usage described [here](http://pytorch.org/docs/master/notes/serialization.html) - pickle is unsafe - pytorch supports exporting to ONNX, but not importing # Proposal Use ONNX format, but use only initializers field to store a model's state. ## Pros - Safe - Relies on already existing format with good tooling; needed protobuf-code is already in pytorch source. If needed, weights can be read from other languages - Proposed implementation (see later) stores parameters that are met in the model state several times, loading does not break this situation (if parameters used the same tensor, they use the same tensor after loading) - Proposed implementation was checked to normally import / export all (largest) torchvision models: inception_v3, alexnet, densenet201, resnet152, squeezenet1_1, vgg19_bn. ## Cons - No support for serialization of sparse tensors. AFAIK, ONNX has no support for SparseTensors so far. Hacks possible to save indices and values, but it is better to wait for official support of sparse tensors in ONNX. ## Proposed implementation ```python import torch from onnx import ModelProto, GraphProto, numpy_helper, load_from_string def save_model_state(model, filename): graph = GraphProto() # exporting only once exported_ids = set() for name, tensor in model.state_dict().items(): if id(tensor) in exported_ids: continue else: exported_ids.add(id(tensor)) try: numpy_value = tensor.clone().cpu().numpy() except: raise RuntimeError("Parameter {}, tensor: {} can't be dumped. \ Sparse tensors can't be saved".format(name, tensor)) # cloning to avoid moving tensor from/to GPU initializer = numpy_helper.from_array(numpy_value, name=name) graph.initializer.extend([initializer]) with open(filename, mode='wb') as f: f.write(ModelProto(graph=graph).SerializeToString()) def load_model_state(model, filename, strict=True): with open(filename, mode='rb') as f: graph_loaded = load_from_string(f.read()).graph # exporting only once imported_ids = set() own_state = model.state_dict() for initializer in graph_loaded.initializer: name = initializer.name if name in own_state: try: tensor = own_state[name] numpy_value = numpy_helper.to_array(initializer) tensor.copy_(tensor.new(numpy_value)[:], broadcast=False) imported_ids.add(id(tensor)) except Exception: raise RuntimeError('While copying the parameter named {}, ' 'whose dimensions in the model are {} and ' 'whose dimensions in the checkpoint are {}.' .format(name, own_state[name].size(), numpy_value.shape)) elif strict: raise KeyError('unexpected key "{}" in state_dict'.format(name)) if strict: # checking that all tensors were covered for name, tensor in own_state.items(): if id(tensor) not in imported_ids: raise KeyError('missing keys in state_dict: "{}"'.format(name)) ``` Comment on implementation: - wasn't able to use pytorch's ONNX classes, so used onnx package. Probably, worth fixing cc @ezyang @gchanan @mruberry @BowenBao @neginraoof @houseroad @spandantiwari @lara-hdr
feature,module: pickle,module: serialization,triaged,onnx-triaged,topic: security
low
Critical
309,717,121
scrcpy
Request: even on split window mode, changing orientation changes the window size
Steps: 1. Have 2 windows on Windows OS, side by side, using the split window mode: https://www.digitaltrends.com/computing/how-to-split-your-screen-in-windows-10/ One of Chrome (for example), and one of this tool. 2. On the device, change its orientation. There is an issue with this: The window of the tool exits split mode, and if it was portrait, its window is even partially outside of the screen. See video: [ice_video_20180329-142158.zip](https://github.com/Genymobile/scrcpy/files/1859844/ice_video_20180329-142158.zip) What I'd like, is the ability to stay on same window size, especially on this case.
feature request,window
low
Minor
309,852,775
TypeScript
Support max-line-length in organize imports
Referenced in https://github.com/Microsoft/TypeScript/issues/22974 > By the way, I ran "organize imports" on about 800 files. Works really well other than this problem and it puts imports that were previously on multiple lines onto one... so that will break my linting rule for "max-line-length". Luckily it's easy to write a script to investigate and break them back onto multiple lines 😄
Suggestion,Domain: Formatter,Domain: Organize Imports,Experience Enhancement
high
Critical
309,858,329
angular
Animations jump around during router-outlet transitions
<!-- PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION. ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION. --> ## I'm submitting a... <!-- Check one of the following options with "x" --> <pre><code> [ ] Regression (a behavior that used to work and stopped working in a new release) [X] Bug report <!-- Please search GitHub for a similar issue or PR before submitting --> [ ] Feature request [ ] Documentation issue or request [ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre> ## Current behavior <!-- Describe how the issue manifests. --> When switching router pages by clicking navigation links(Projects<-->Users), the leaving component instantly teleports below where the entering component would be, creating a disjointing appearance during animation. ## Expected behavior <!-- Describe what the desired behavior would be. --> The leaving component should leave from its current position and not teleport anywhere unless specified in the animations metadata. The desired behavior is to create a seamless transition. ## Minimal reproduction of the problem with instructions <!-- For bug reports please provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the problem via --> https://stackblitz.com/edit/angular-fjxwoq?file=styling-assignment%2Fapp.component.ts ## What is the motivation / use case for changing the behavior? <!-- Describe the motivation or the concrete use case. --> To create a seamless transition for animating between router pages. ## Environment <pre><code> Angular version: 5.2.8 Angular Animations: 5.2.9 <!-- Check whether this is still an issue in the most recent Angular version --> Browser: - [X ] Chrome (desktop) version XX - [ ] Chrome (Android) version XX - [ ] Chrome (iOS) version XX - [ ] Firefox version XX - [ ] Safari (desktop) version XX - [ ] Safari (iOS) version XX - [ ] IE version XX - [ ] Edge version XX For Tooling issues: - Node version: 9.5.0 - Platform: Windows 7 </code></pre> Others: <!-- Anything else relevant? Operating system version, IDE, package manager, HTTP server, ... --> I've tried using position:'fixed' in the hosting components and while the the disjointing is fixed, the end state results in a disappearing component. If I add style({transform:'translateY(-100%)'}) to the leaving component, leaving users page appears smooth but that means leaving another page(Servers) with a greater height looks terrible.
type: bug/fix,area: animations,freq1: low,P4
low
Critical
309,928,006
flutter
Add a performance watchdog / diagnosis tool
Some sort of low-invasiveness profile runtime tool like https://developers.google.com/speed/pagespeed/insights/ that can print hints to console or to a formatted file. Example outputs: - Widget subtree descendent of widget X exceeded 5ms during build time. `build()` call site: Y. Widget subtree: Z. - The same widget subtree was rebuilt X times consecutively and hasn't changed. Call site: Y. Consider avoiding unnecessary rebuilds. - Widget rebuilds exceeding 2ms was triggered more than X consecutive times as result of a ScrollNotification listener or while laying out a RenderViewport subclass. Consider Y - The same render object subtree was repainted X times consecutively and hasn't changed its content of Y complexity. Consider using a RepaintBoundary at Z or use W. etc etc.
c: new feature,tool,framework,c: performance,P2,team-framework,triaged-framework
low
Major
310,044,981
flutter
Document how centerSlice works, and how to use .9.png images with Flutter, with samples
## Steps to Reproduce I'm trying to use a .nine picture: ![image](https://user-images.githubusercontent.com/454020/38142129-d3e1c10c-346d-11e8-82af-78a1f75849d8.png) The Code: ```dart return new Stack(children: <Widget>[ new Positioned( child: new Image.asset("images/label_bg_left_9.png", fit: BoxFit.fill, centerSlice: new Rect.fromLTRB(6.0, 1.0, 17.0, 49.0)), left: 0.0, right: 0.0, top: 0.0, bottom: 0.0), new Container( child: new Text("#" + label.text, style: new TextStyle(fontSize: 12.0, color: Colors.white), textAlign: TextAlign.center), padding: const EdgeInsets.fromLTRB(2.0, 2.0, 32.0, 2.0)) ]); ``` I got an wrong image like this, the right side was expanded: ![image](https://user-images.githubusercontent.com/454020/38142209-10528a5e-346e-11e8-88bc-37f98591d756.png) Do you know why I got this problem? The expected result should be like this: ![image](https://user-images.githubusercontent.com/454020/38142239-2a04633c-346e-11e8-88ed-25ce61d14771.png) ## Flutter Doctor The flutter is modified by myself, forked from the Flutter beta branch v0.1.5. The modifications I made may not affect this problem, only for my compile errors. ``` [✓] Flutter (Channel unknown, v0.1.6-pre.24, on Mac OS X 10.12.6 16G1212, locale zh-Hans-HK) • Flutter version 0.1.6-pre.24 at /Users/guoyou/projects/fwn_idlefish/flutter • Framework revision 14b5b6f63a (15 hours ago), 2018-03-30 08:08:43 +0800 • Engine revision ead227f118 • Dart version 2.0.0-dev.28.0.flutter-0b4f01f759 [✓] Android toolchain - develop for Android devices (Android SDK 27.0.3) • Android SDK at /Users/guoyou/Library/Android/sdk • Android NDK at /Users/guoyou/Library/Android/sdk/ndk-bundle • Platform android-27, build-tools 27.0.3 • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08) [✓] iOS toolchain - develop for iOS devices (Xcode 9.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 9.1, Build version 9B55 • ios-deploy 1.9.2 • CocoaPods version 1.3.0 [✓] Android Studio (version 3.0) • Android Studio at /Applications/Android Studio.app/Contents • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08) [✓] IntelliJ IDEA Community Edition (version 2017.2.3) • Flutter plugin installed • Dart plugin version 172.3968.27 [!] Connected devices ! No devices available ```
c: crash,framework,d: api docs,customer: alibaba,a: images,P2,team-framework,triaged-framework
low
Critical
310,057,436
rust
Salvage clone shim cleanup and carry it to completion
Cc @rust-lang/wg-codegen @rust-lang/wg-compiler-performance #48063
C-cleanup,A-codegen,I-compiletime,T-compiler,A-MIR,WG-llvm
low
Major
310,061,927
rust
Add compiler-internal lints
There are various "patterns" we don't want in the compiler out of one reason or another. I'm using this issue to collect them and create lints for detecting those patterns. The lints will only be available while building the compiler via a -Z flag. The flag will be enabled by the bootstrap script, so we don't have to worry about accidentally running them for users. * [x] forbid uses of `HashSet` or `HashMap` (suggest `FxHash*`) * [ ] suggest using `TyCtxtAt` over `TyCtxt` + `Span` as arguments * [ ] calling `clone` on `Copy` types (https://github.com/rust-lang/rust/issues/27266) * [ ] do not use `features_untracked` when a tcx is in scope * [x] do not use `TyKind::Foo`, use `ty::Foo` instead * [x] do not use `TyKind` as a type outside the `sty` module, use `Ty` instead * [ ] don't use `TyS` outside `rustc::ty::sty` * [ ] don't use `Vec::new()` use `vec![]` * [x] don't use `==` for span contexts, use `eq_ctxt` instead (https://github.com/rust-lang/rust/pull/116787) * [ ] prefer `param_env_reveal_all_normalized` over `parram_env(did).with_reveal_all_normalized()` (https://github.com/rust-lang/rust/pull/121387#issuecomment-1963666972) * [ ] require `'tcx` to be the last lifetime in generic args of type decls, functions and impls (see #130294) https://github.com/rust-lang/rust/labels/E-easy * [ ] forbid storing a `TyCtxt` and a `Session` in the same struct or use both in function args. Only use tcx https://github.com/rust-lang/rust/labels/E-easy
A-lints,E-mentor,T-compiler,E-help-wanted,C-tracking-issue,A-contributor-roadblock,S-tracking-impl-incomplete
medium
Major
310,073,046
rust
doctests marked with 'no_run' permit ICEs
irc discussion: https://botbot.me/mozilla/rust-docs/2018-03-30/?msg=98430464&page=1 run this example: https://doc.rust-lang.org/nightly/std/fs/fn.read_string.html at the time of writing it ICEs, but doctests don't catch it because it's marked `no_run`
T-rustdoc,C-bug,A-doctests
low
Major
310,097,853
pytorch
Test suite should test implementations
This issue was prompted by #6132. To explain the situation, let us consider the situation of convolution. Today, we have a number of tests for convolution. The majority of these tests go through the "official" convolution interface, which is what all of our users use. However, inside the implementation of convolution, there are a large number of if-statements which specify which particular implementation we use, depending on some settings. This too, is also a good idea, because we want our users to get the best kernels without thinking about it. However, when it comes time to test these kernels, we now have some very ugly code: ``` # test that forwards of module runs correctly without cuDNN if self.cudnn: with torch.backends.cudnn.flags(enabled=False): module(input) for p in module.parameters(): test_case.assertIsInstance(p, torch.cuda.FloatTensor) test_case.assertEqual(p.get_device(), 0) ``` Essentially, we need to *indirectly* force the dispatch code one way or another, to make sure we test all of the actual kernel implementations. This makes it very easy to miss test configurations where you (a) forget to toggle between implementations or (b) the toggling code is wrong and you're not exercising a codepath that you actually wanted to test. The basic situation is that there are two orthogonal things we want to test: 1. An integration test: we want to test that the actual function all of our users use for convolution actually works. 2. An implementation test: we want to test that each of our individual kernels is correct. The current test suite conflates the two. It would be good if it did not.
module: tests,triaged
low
Minor
310,106,354
pytorch
[feature request] SIGNUM an optimizer that takes the sign of gradient or momentum.
The SIGNUM is an optimizer that takes the sign of gradient or momentum. Please see the detailed description of SIGNUM in the original paper at: https://arxiv.org/abs/1802.04434 I would like to start the process of a feature request if accepted by the community.And I am willing to create a pull request and implement the code after discussion. cc @vincentqb
module: optimizer,triaged
low
Minor
310,116,420
rust
macros can observe raw identifier state [discuss]
In https://github.com/rust-lang/rust/pull/48942, @Lymia landed raw identifiers; "equality" in this implementation includes observing the "raw" state. Therefore, macros can observe if `r#foo` was used or not: ```rust #![feature(raw_identifiers)] macro_rules! foo { (a) => { 1 }; (r#a) => { 2 }; } fn main() { println!("{}", foo!(a)); println!("{}", foo!(r#a)); } ``` This makes a certain measure of sense, but also makes me nervous, and I wanted to open an issue to discuss. For example, @Manishearth proposed making identifiers "raw" in macros when they are serialized, thus ensuring consistent interpretation as we cross editions. I'm not entirely sure of the implications of this but it does make me nervous for users to be able to distinguish `foo` and `r#foo`.
A-macros,T-compiler,C-feature-request,WG-epoch
low
Major
310,228,399
rust
Error message gives a (depreciated/unimplemented) -Z flag
Currently, when a macro fails, it gives this error: ``` note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) ``` However, when running this: ``` cargo run -Z external-macro-backtrace ``` This error is given: ``` error: unknown `-Z` flag specified: external-macro-backtrace ``` version: 1.26.0-nightly (2018-03-19)
C-enhancement,A-diagnostics,T-compiler,T-cargo,D-confusing
low
Critical
310,235,684
rust
Suboptimal inlining decisions
I suspect this can happen in more cases, but here is how I observed this: ```rust pub fn foo() -> Box<[u8]> { vec![0].into_boxed_slice() } ``` This compiles to: ```asm sub rsp, 56 lea rdx, [rsp + 8] mov edi, 1 mov esi, 1 call __rust_alloc@PLT test rax, rax je .LBB2_1 mov byte ptr [rax], 0 mov edx, 1 add rsp, 56 ret .LBB2_1: (snip oom handling) ``` Which is pretty much to the point. Now duplicate the function, so that you now have two functions calling `into_boxed_slice()`, and the compiler decides not to inline it at all anymore. Which: - adds the full blown `Vec::into_boxed_slice` implementation (63 lines of assembly) - adds `ptr::drop_in_place` - and changes the function above to: ```asm sub rsp, 56 lea rdx, [rsp + 8] mov edi, 1 mov esi, 1 call __rust_alloc@PLT test rax, rax je .LBB4_1 mov byte ptr [rax], 0 mov qword ptr [rsp + 8], rax mov qword ptr [rsp + 16], 1 mov qword ptr [rsp + 24], 1 lea rdi, [rsp + 8] call <alloc::vec::Vec<T>>::into_boxed_slice add rsp, 56 ret .LBB4_1: (snip oom handling) ``` The threshold to stop inlining seems pretty low for this particular case, and even if it might make sense for some uses across the codebase to not be inlined, when the result of inlining is clearly beneficial, it would be good if we could still inline the calls where it's a win.
C-enhancement,A-codegen,T-compiler,WG-llvm
low
Major
310,261,178
nvm
nvm says 'no .nvmrc file found' when the problem is that the version inside of said .nvmrc is not installed.
- Operating system and version: CentOS 7, nvm latest version - `nvm debug` output: <details> <!-- do not delete the following blank line --> ```sh $SHELL: /bin/bash $HOME: /home/kenny $NVM_DIR: '$HOME/.nvm' $PREFIX: '' $NPM_CONFIG_PREFIX: '' $NVM_NODEJS_ORG_MIRROR: '' $NVM_IOJS_ORG_MIRROR: '' shell version: 'GNU bash, version 4.2.46(2)-release (x86_64-redhat-linux-gnu)' uname -a: 'Linux 3.10.0-693.21.1.el7.x86_64 #1 SMP Wed Mar 7 19:03:37 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux' OS version: curl: /bin/curl, curl 7.29.0 (x86_64-redhat-linux-gnu) libcurl/7.29.0 NSS/3.28.4 zlib/1.2.7 libidn/1.28 libssh2/1.4.3 wget: /bin/wget, GNU Wget 1.14 built on linux-gnu. git: /bin/git, git version 1.8.3.1 grep: alias grep='grep --color=auto' /bin/grep (grep --color=auto), grep (GNU grep) 2.20 awk: /bin/awk, GNU Awk 4.0.2 sed: /bin/sed, sed (GNU sed) 4.2.2 cut: /bin/cut, cut (GNU coreutils) 8.22 basename: /bin/basename, basename (GNU coreutils) 8.22 rm: /bin/rm, rm (GNU coreutils) 8.22 mkdir: /bin/mkdir, mkdir (GNU coreutils) 8.22 xargs: /bin/xargs, xargs (GNU findutils) 4.5.11 nvm current: v9.10.1 which node: $NVM_DIR/versions/node/v9.10.1/bin/node which iojs: which: no iojs in ($NVM_DIR/versions/node/v9.10.1/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:$HOME/.local/bin:$HOME/bin) which npm: $NVM_DIR/versions/node/v9.10.1/bin/npm npm config get prefix: $NVM_DIR/versions/node/v9.10.1 npm root -g: $NVM_DIR/versions/node/v9.10.1/lib/node_modules ``` </details> - `nvm ls` output: <details> <!-- do not delete the following blank line --> ```sh v9.7.0 -> v9.10.1 default -> node (-> v9.10.1) node -> stable (-> v9.10.1) (default) stable -> 9.10 (-> v9.10.1) (default) iojs -> N/A (default) lts/* -> lts/carbon (-> N/A) lts/argon -> v4.9.1 (-> N/A) lts/boron -> v6.14.1 (-> N/A) lts/carbon -> v8.11.1 (-> N/A) ``` </details> - How did you install `nvm`? (e.g. install script in readme, Homebrew): `wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash` nvm says 'no .nvmrc file found' when the problem is that the version inside of said .nvmrc is not installed. I have a systemd service that calls nvm like this. `/home/kenny/.nvm/nvm-exec nodemon ./src/index.js` the output was: `Mar 31 21:06:00 vm5 start.sh[3021]: No NODE_VERSION provided; no .nvmrc file found` the contents of the .nvmrc file are: `v9.7.0` The error disappeared after running `nvm install 9.7.0 --reinstall-packages-from=node` I got the thing to work but I want to inform you that the error message is wrong it should say that the version inside the `.nvmrc` is not installed, not that there is no `.nvmrc` file.
bugs,pull request wanted
low
Critical
310,270,274
material-ui
Implement theme level states design tokens
Material Design provides a page: https://material.io/design/interaction/states.html#usage on how to style the different states. States are visual representations used to communicate the status of a component or an interactive element. The components to handle: - [x] Pagination - [x] Select - [x] TreeView - [x] Chip #24915 - [x] Autocomplete #23323 - [ ] Button - [ ] List - [ ] Switch - [ ] Radio - [ ] Checkbox - [ ] IconButton - [ ] Accordion - [ ] Rating - [ ] Slider - [ ] Tabs Related issues: - #5186: list states - #19343: disabled state - #17493: button states
umbrella
medium
Major
310,280,733
neovim
infercase for command mode?
I don't believe this behavior can be implemented with a plugin (though I've been wrong pretty much every time I've said that when it comes to vim), but it would be helpful to have an `infercase`-like option that would enable tab completion for command mode, but without turning off case sensitivity. Currently, `infercase` can be used together with `wildignorecase` to enable smart-case tab completion for regular completions but not for vim commands, while `ignorecase` can be used to enable case-insensitive tab completions for both commands and regular completions, but additionally makes `/` searches case-insensitive. The easiest option is to have either `infercase` or `wildignorecase` (or both together) enable case-insensitive or smart-case tab completion for command mode commands as well, but I don't want to suggest something that some may be vehemently opposed to. If it's any consolation, I don't see (which _probably_ only means I'm wrong and I'm showing my ignorance here) how this can break any scripts or plugins since this would affect TTY behavior only.
enhancement,completion
low
Minor
310,283,776
rust
Incorrect error message about enum variant when trying to call a Result
Test case [(playground link)](https://play.rust-lang.org/?gist=2fdc42baa9d1920ebc04d4a253418354&version=nightly): ```rust fn foo() -> Result<i32, i32> { Ok(42) } fn main() { foo()(); } ``` The real issue is an extra set of parentheses after `foo()`, which should produce an error because `Result<i32, i32>` is not a function. However, rustc (stable and current nightly) produces this error message: ``` error[E0618]: expected function, found enum variant `foo()` --> src/main.rs:6:5 | 6 | foo()(); | ^^^^^^^ not a function help: `foo()` is a unit variant, you need to write it without the parenthesis | 6 | foo(); | ^^^^^ ``` - The first line is confusing and semi-incorrect: although `foo()` does evaluate to a value of enum type, it's not a specific variant, and "found enum variant `foo()`" makes it seem like `foo` itself is an enum. - The line after `help:` is incorrect: neither of the variants of the `Result` enum is a unit variant. - The suggested fix is correct, which is nice :)
A-diagnostics,T-compiler,D-papercut
low
Critical
310,286,430
neovim
Add new literal arguments mode to :command
This is a suggestion for an additional command mode like `<f-args>` and `<q-args>` (let's say `<l-args>`) that would provide all arguments as-is to the command, without any interpretation or expansion and without any reserved characters requiring escaping. The number of characters that need to be escaped while trying to pass a regex expression to a command that has its own quoting policy can be both incredibly verbose. This would ideally even apply to characters like `\` or `%`, so it would need to be used extremely carefully, obviously.
enhancement
low
Minor
310,287,775
pytorch
Note about unusual stride situations in dev docs / make it easier to test for this in the library
On its face, strides are pretty simple: given strides `s`, the memory location of the indices `x` is `sum(s[i] * x[i] for i in dim)`. It's also fairly simple to say when strides are contiguous: that is when `s[i] == product(s[j] for j in range(0, i))`. And then the standard application of strides is to let you get non-contiguous views into an underlying contiguous tensor. But there are also some weirder, less obvious stride situations: Broadcasting is achieved by having zero strides. So, e.g., ``` >>> torch.tensor(range(0,3)).expand(2,3) 0 1 2 0 1 2 [torch.LongTensor of size (2,3)] >>> torch.tensor(range(0,3)).as_strided(size=(2,3), stride=(0,1)) 0 1 2 0 1 2 [torch.LongTensor of size (2,3)] ``` And the technical definition of strides permits weird, overlapping striding, e.g., ``` >>> torch.tensor(range(0,7)).as_strided(size=(2,2,2), stride=(3,2,1)) (0 ,.,.) = 0 1 2 3 (1 ,.,.) = 3 4 5 6 [torch.LongTensor of size (2,2,2)] ``` It would be good to have a developer doc describing all of this, as well as adding functions making it easier to test for certain stride situations, to make it easier to work with external libraries and specialized kernels. An example is in the cuFFT interface https://github.com/pytorch/pytorch/pull/6118 where only non-overlapping striding is supported. CC @SsnL cc @jlin27 @mruberry @VitalyFedyunin @jamesr66a @ppwwyyxx
module: docs,triaged,module: memory format
low
Minor
310,301,676
go
x/build/cmd/coordinator: store CL number in the query parameters
If the build completes, you get this message: > TryBot result not found (already done, invalid, or not yet discovered from Gerrit). Check Gerrit for results. If we stored the CL number in the URL (for example `commit=deadbeef&cl=123456`), and we couldn't find the commit number, we could assume the build is complete and either redirect you back to it, or provide a link to the right CL from the complete farmer build.
Builders
low
Minor
310,328,167
node
net: Don't unlink unix socket on server.close()
* **Platform**: Linux Right now before an unix socket is closed [its file is also unlinked by libuv](https://github.com/nodejs/node/blob/master/deps/uv/src/unix/pipe.c#L125). This behavior seems to go against the [current docs](https://nodejs.org/api/net.html#net_identifying_paths_for_ipc_connections), which explicitly mention that the socket would persist until unlinked (seems to imply this doesn't happen automatically). This behavior has already been discussed multiple times in past, and every time the result of the conversation appears to have been that it is a [bad](https://github.com/nodejs/node-v0.x-archive/issues/3686) [idea](https://github.com/nodejs/node-v0.x-archive/issues/3540). Some problems this behavior causes: - It makes restarts with little downtime very hard to implement, since normally you would unlink the old socket in your new process immediately before listening to your new one. However, if your old process calls ``server.close()`` afterwards, it will unlink your *new* socket. Bummer. - A simple workaround would be *not* calling ``server.close()``, however now you lose the ability to wait for old connection to die before exiting, and also the ability to not accept new connections before you exit. The best way to work around this problem I've found so far appears to be this ``safeListen``: ```js // Edit: Replaced old workaround with a better one. Now we // just rename the socket after creating it, so libuv can't know // about the new path and thus can't unlink it. const fs = require('fs'); function safeListen(httpServer, path, callback) { callback = callback || function(error) { if (error) { httpServer.emit('error', error); } }; const tmpPath = path + '.' + process.pid + '.tmp'; httpServer.listen(tmpPath, (error) => { if (error) { return callback(error); } fs.rename(tmpPath, path, (error) => { if (error) { httpServer.close(() => {}); return callback(error); } callback(null, httpServer); }); }); }; ```
help wanted,net
low
Critical
310,333,232
godot
Particles with "one shot" enabled gets "emitting" turned off
<!-- Please search existing issues for potential duplicates before filing yours: https://github.com/godotengine/godot/issues?q=is%3Aissue --> **Godot version:** [098c7ba4f9c49b472b9417819144378081996874](url) (current master) **Issue description:** <!-- What happened, and what was expected. --> When using the node Particles2D or Particles, and having both properties "Emitting" and "One Shot" enabled, if saving the configuration somehow (for instance by moving the focus away from the node), "Emitting" becomes false *in the editor*, and does not play when the game is run either. See also the GIF below: ![particles_emitting_one_shot_bug_2018-04-01_2](https://user-images.githubusercontent.com/26661991/38174695-a5f9cae0-35d1-11e8-9c12-083287cb5c1a.gif) **Proposed fix** I think the regression happened in https://github.com/godotengine/godot/commit/1f609b7a8221f623ae0c051cbaf44f955c8d97bb. I do not know what the purpose of that commit was; it seems a pure regression AFAICT. That said, I do not know Godot or its particle system very well, so this might be wrong. I have tested a simple reversion, and that seemed to work: In the editor, "emitting" was kept and not discarded, and "one shot" worked when running the game.
enhancement,topic:editor,confirmed,topic:particles
medium
Critical
310,351,805
rust
Cryptic LTO-related error message when performing `include_bytes!` on large files
When trying to include a large (> 500MiB) binary in a program, the compiler crashes with an error message relating to LTO (Link time optimization?) I tried this code: ```rust fn main() { // the file below was generated with // $ dd if=/dev/urandom of=output.dat bs=1M count=640 let v = include_bytes!("../output.dat").to_vec(); println!("{}", v.len()); } ``` I expected to see this happen: MWE to compile and run correctly with `cargo run --release` and output `671088640` Instead, this happened: Cargo emits error: ``` $ cargo run --release Compiling mwe v0.0.0 (file:///home/noxim/repos/mwe) error: failed to prepare thin LTO context: Malformed block error: aborting due to previous error error: Could not compile `mwe`. ``` ## Meta Rustc: ``` rustc 1.25.0 (84203cac6 2018-03-25) binary: rustc commit-hash: 84203cac67e65ca8640b8392348411098c856985 commit-date: 2018-03-25 host: x86_64-unknown-linux-gnu release: 1.25.0 LLVM version: 6.0 ``` Backtrace and --verbose: ``` $ RUST_BACKTRACE=1 cargo run --release --verbose Compiling mwe v0.0.0 (file:///home/noxim/repos/mwe) Running `rustc --crate-name mwe src/main.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C metadata=b0f84b8595e7a39c -C extra-filename=-b0f84b8595e7a39c --out-dir /home/noxim/repos/mwe/target/release/deps -L dependency=/home/noxim/repos/mwe/target/release/deps` error: failed to prepare thin LTO context: Malformed block error: aborting due to previous error error: Could not compile `mwe`. Caused by: process didn't exit successfully: `rustc --crate-name mwe src/main.rs --crate-type bin --emit=dep-info,link -C opt-level=3 -C metadata=b0f84b8595e7a39c -C extra-filename=-b0f84b8595e7a39c --out-dir /home/noxim/repos/mwe/target/release/deps -L dependency=/home/noxim/repos/mwe/target/release/deps` (exit code: 101) ```
A-codegen,A-diagnostics,T-compiler,C-bug
low
Critical
310,356,892
vue
Provide a way to define different name for prop attribute
### What problem does this feature solve? In most of cases, it's not really comfortable to use `initialProp` as prop name, for example, or have `normalizedProp` inside a component, which takes some passed prop and transforms it. Code looks bloated and reminds more workaround than a good solution. Having ability to change attribute name of prop would be great. Something like: ```javascript rawProp: { attributeName: "prop" } ``` ### What does the proposed API look like? ```html <component size="md"> ... </component> ``` ```javascript computed: { size: { switch (this.rawSize) { ... } // returns something in case blocks } }, props: { rawSize: { attributeName: "size", type: String } } ``` Thus, using any of proposed solutions above, `this.size` inside component would return transformed value (for example, `h4` or just `4`). I believe having this feature would be very awesome and help us to write cleaner code. <!-- generated by vue-issues. DO NOT REMOVE -->
feature request
medium
Critical
310,357,627
youtube-dl
Add Support for https://login.gci.com/ Adobe SSO
- [X] I've **verified** and **I assure** that I'm running youtube-dl **2018.03.26.1** ### Before submitting an *issue* make sure you have: - [X] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [X] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones - [X] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser ### What is the purpose of your *issue*? - [ ] 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 I would appreciate assistance in adding support for the cable provider "GCI". With paid cable services they offer access to various apps and content websites just like most other cable providers. Their page showing what a paid user can access can be found here: https://www.gci.com/tv/tv-everywhere/now-available I have my login that I can give out for testing. My account has full access to every cable service offered on their plan page above. I can be reached at [email protected] Thank you for your time.
account-needed
low
Critical
310,376,295
rust
The NonZero types don't tell LLVM that they're non-zero on get
Repro: https://play.rust-lang.org/?gist=0981601dda9c5800e353e31b22682bb5&version=nightly&mode=release ```rust pub fn foo(x: std::num::NonZeroU32) -> bool { x.get() != 0 } ``` Actual: ```llvm %0 = icmp ne i32 %x, 0 ret i1 %0 ``` Expected: ```llvm ret i1 true ``` cc https://github.com/rust-lang/rust/issues/49137
A-LLVM,I-slow,C-enhancement,A-codegen,T-compiler,WG-llvm,C-optimization
medium
Critical
310,389,589
godot
Abrupt slide off on platform
<!-- Please search existing issues for potential duplicates before filing yours: https://github.com/godotengine/godot/issues?q=is%3Aissue --> **Godot version:** <!-- Specify commit hash if non-official. --> 3.0 **OS/device including version:** <!-- Specify GPU model and drivers if graphics-related. --> Ubuntu 17.10 **Issue description:** <!-- What happened, and what was expected. --> When using a kinematic body, when the body goes over the edge, instead of smoothly falling, it abruptly drops very quickly. This is unrelated to gravity, as changing the gravity constant has no effect. Also, when the character jumps, the gravity works as expected. **Steps to reproduce:** Have a platform with a collision box and a static body. Have a kinematic body, with a script for movement (using move_and_slide) and gravity, go over the edge of the platform. **Minimal reproduction project:** <!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. --> [Test.zip](https://github.com/godotengine/godot/files/1867081/Test.zip)
enhancement,documentation,topic:physics
low
Critical
310,438,613
go
x/text: ianaindex returns no encoding for gb2312
Using the `golang.org/x/text/encoding/ianaindex` package. ``` encoding, err := ianaindex.MIME.Encoding("gb2312") fmt.Println(encoding, err) // prints <nil> <nil> ``` I believe it should be returning simplifiedchinese.HZBG2312. cc @mpvl
NeedsFix
low
Minor
310,593,635
go
cmd/compile: document emitptrargsmap onebitwalktype1 calls
Perhaps I'm missing something, but this sequence of calls in emitptrargsmap looks suspect: ```go if fn.IsMethod() { onebitwalktype1(fn.Type.Recvs(), 0, bv) } if fn.Type.NumParams() > 0 { onebitwalktype1(fn.Type.Params(), 0, bv) } ``` If I'm reading it correctly, this will overwrite the Recvs bitmap with the Params bitmap. Also, after emitting that bitmap, we do: ```go if fn.Type.NumResults() > 0 { onebitwalktype1(fn.Type.Results(), 0, bv) off = dbvec(lsym, off, bv) } ``` But we don't clear bv first, so any set bits from recvs/params will still be set. emitptrargsmap is only called from assembly functions, which are unlikely to have methods and which are often nosplit, which is possibly why this hasn't caused visible problems yet (?). cc @mdempsky -- does this code look right to you, and if so, what am I missing?
Documentation,NeedsFix,compiler/runtime
low
Minor
310,603,197
rust
E0582 on valid HRTB code
The compiler rejects this code with E0582. ```rs trait MyTrait { type T; } fn foo<T>(t: T) where for<'x> &'x T: IntoIterator, for<'x> <&'x T as IntoIterator>::Item: MyTrait<T = &'x i32> {} ``` The code is obviously valid.
A-lifetimes,A-trait-system,A-associated-items,T-lang,T-compiler,C-bug,T-types,A-higher-ranked
low
Major
310,612,644
flutter
Get rid of frontend-server standalone executable, call frontend-server/compiler as in-process dart package directly.
frontend-server was built to run as standalone executable because flutter tools and engine were running on different versions of dart sdk. Few months back the change was made to run flutter tools and engine on the same dart sdk. That means that there is no need to have frontend-server as standalone process, compiler can be invoked directly from flutter tools.
team,tool,framework,c: proposal,P3,team-framework,triaged-framework
low
Major
310,619,142
go
cmd/compile: eliminate empty switch cases
```go package p var y int func f(x int) { switch x { case 1: case 2: y = 1 } } ``` This compiles to: ``` "".f STEXT nosplit size=31 args=0x8 locals=0x0 0x0000 00000 (x.go:5) TEXT "".f(SB), NOSPLIT, $0-8 0x0000 00000 (x.go:5) FUNCDATA $0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB) 0x0000 00000 (x.go:5) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB) 0x0000 00000 (x.go:5) MOVQ "".x+8(SP), AX 0x0005 00005 (x.go:7) CMPQ AX, $1 0x0009 00009 (x.go:7) JNE 12 0x000b 00011 (<unknown line number>) RET 0x000c 00012 (x.go:8) CMPQ AX, $2 0x0010 00016 (x.go:8) JNE 11 0x0012 00018 (x.go:9) MOVQ $1, "".y(SB) 0x001d 00029 (x.go:6) JMP 11 ``` Note that we're pointlessly testing whether x == 1 at 0x0005. We should be able to eliminate that test. Probably the easiest place is when lowering the switch statement; if there is no default case, then any cases with empty bodies can be removed. (Taking care to evaluate the case expressions if necessary, of course, and taking care with pointless fallthroughs from the previous case.) Another possibility, probably more powerful, is to detect the unnecessary branch somehow in SSA form. This kind of code arises naturally when wanting to make it clear to the reader that a particular case has been considered by the code author. It also shows up in generated code.
Performance,NeedsFix,compiler/runtime
low
Minor
310,622,651
neovim
Memory leak in shada_read_next_item / STRING_KEY
``` ==13127==ERROR: LeakSanitizer: detected memory leaks Direct leak of 142 byte(s) in 3 object(s) allocated from: #0 0x558e911f89b1 in malloc (/home/user/.local/opt/neovim/bin/nvim+0x9909b1) #1 0x558e91c269b1 in try_malloc …/Vcs/neovim/build/../src/nvim/memory.c:87:15 #2 0x558e91c26bc9 in xmalloc …/Vcs/neovim/build/../src/nvim/memory.c:121:15 #3 0x558e91c271af in xmallocz …/Vcs/neovim/build/../src/nvim/memory.c:196:15 #4 0x558e91c2732b in xmemdupz …/Vcs/neovim/build/../src/nvim/memory.c:214:17 #5 0x558e922597c0 in shada_read_next_item …/Vcs/neovim/build/../src/nvim/shada.c:3787:9 #6 0x558e9222365a in shada_read_when_writing …/Vcs/neovim/build/../src/nvim/shada.c:2150:22 #7 0x558e921fbecb in shada_write …/Vcs/neovim/build/../src/nvim/shada.c:2904:39 #8 0x558e921efaad in shada_write_file …/Vcs/neovim/build/../src/nvim/shada.c:3163:35 #9 0x558e91b34cce in getout …/Vcs/neovim/build/../src/nvim/main.c:636:5 #10 0x558e9187a6b8 in ex_quit …/Vcs/neovim/build/../src/nvim/ex_docmd.c:5998:7 #11 0x558e918155c7 in do_one_cmd …/Vcs/neovim/build/../src/nvim/ex_docmd.c:2232:5 #12 0x558e917f8b3a in do_cmdline …/Vcs/neovim/build/../src/nvim/ex_docmd.c:601:20 #13 0x558e915258fa in call_user_func …/Vcs/neovim/build/../src/nvim/eval.c:21339:3 #14 0x558e914f27ee in call_func …/Vcs/neovim/build/../src/nvim/eval.c:6366:11 #15 0x558e91506d9c in get_func_tv …/Vcs/neovim/build/../src/nvim/eval.c:6128:11 #16 0x558e914ffc37 in ex_call …/Vcs/neovim/build/../src/nvim/eval.c:2735:9 #17 0x558e918155c7 in do_one_cmd …/Vcs/neovim/build/../src/nvim/ex_docmd.c:2232:5 #18 0x558e917f8b3a in do_cmdline …/Vcs/neovim/build/../src/nvim/ex_docmd.c:601:20 #19 0x558e91d753b4 in nv_colon …/Vcs/neovim/build/../src/nvim/normal.c:4558:18 #20 0x558e91d602eb in normal_execute …/Vcs/neovim/build/../src/nvim/normal.c:1137:3 #21 0x558e923adb6e in state_enter …/Vcs/neovim/build/../src/nvim/state.c:67:26 #22 0x558e91d1f4e5 in normal_enter …/Vcs/neovim/build/../src/nvim/normal.c:467:3 #23 0x558e91b219c9 in main …/Vcs/neovim/build/../src/nvim/main.c:567:3 #24 0x7fa17dd90f49 in __libc_start_main (/usr/lib/libc.so.6+0x20f49) SUMMARY: AddressSanitizer: 142 byte(s) leaked in 3 allocation(s). ``` Code: https://github.com/neovim/neovim/blob/60e96a45b4f41ff73ba59fec9c9bfa87195d1207/src/nvim/shada.c#L3787 ``` NVIM v0.2.3-955-g60e96a45b Build type: Debug LuaJIT 2.0.5 Compilation: /usr/bin/clang -Wconversion -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -Wno-array-bounds -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I…/Vcs/neovim/build/config -I…/Vcs/neovim/src -I/usr/include -I…/Vcs/neovim/build/src/nvim/auto -I…/Vcs/neovim/build/include Compiled by [email protected] Features: +acl +iconv -jemalloc +tui ``` /cc @ZyX-I
robustness
low
Critical
310,651,420
go
x/tools: document how golang.org is deployed
Agniva de Sarker and I were trying to figure out how an error in a recent godoc commit made it to golang.org. This required reverse engineering the deployment procedure for golang.org. The instructions for tip.golang.org are (fairly) clear - there's a `cmd/tip` binary in the x/tools project with several YAML config files in it. The instructions for golang.org deployment are less clear. Does it still involve the bash script in the x/tools repository? Which commit is used for deployment? To where is it deployed?
Documentation,NeedsInvestigation,Tools
low
Critical
310,673,744
opencv
opencv_highgui compiler error
<!-- If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses. If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute). This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library. --> ##### System information (version) <!-- Example - OpenCV => 3.1 - Operating System / Platform => Windows 64 Bit - Compiler => Visual Studio 2015 --> - OpenCV => new - Operating System / Platform => Windows10 64 Bit - Compiler => Visual Studio 2015 ##### Detailed description Window_QT.cpp: line 57: #ifdef HAVE_QT_OPENGL #if defined Q_WS_X11 /* Qt4 */ || defined Q_OS_LINUX /* Qt5 */ #include <GL/glx.h> #endif #endif HAVE_QT_OPENGL is effect, but Platform is Windows, so #include <GL/glx.h> not contain. line 3227: void OpenGlViewPort::initializeGL() { glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); } compiler error. GL_PERSPECTIVE_CORRECTION_HINT is not define. (I use QT5.10.1) <!-- your description --> ##### Steps to reproduce <!-- to add code example fence it with triple backticks and optional file extension ```.cpp // C++ code example ``` or attach as .txt or .zip file -->
bug,priority: low,category: build/install
low
Critical
310,777,830
go
cmd/compile: Fannkuch11 can be speed up by ~ 30% via improving BCE
This is spin-off issue from https://github.com/golang/go/issues/20393. There in the discussion it was shown that [Fannkuch11 benchmark](https://github.com/golang/go/blob/master/test/bench/go1/fannkuch_test.go) from go1 benchmark suite runs ~30% faster with `-gcflags=-B`. A proof was also provided showing that all the bounds checks emitted by the compiler are actually not needed, and thus with clever BCE it should be possible to reach ~30% Fannkuch11 speedup level demonstrated by `-gcflags=-B`. That discussion is from May 2017. However I've just rechecked with today's go tip ``` $ gotip version go version devel +26e0e8a840 Tue Apr 3 05:45:44 2018 +0000 linux/amd64 ``` and current state is: ``` .../gotip/test/bench/go1$ gotip test -bench Fannkuch -count 10 >ftip.txt .../gotip/test/bench/go1$ gotip test -gcflags=-B -bench Fannkuch -count 10 >ftipB.txt .../gotip/test/bench/go1$ benchstat ftip.txt ftipB.txt name old time/op new time/op delta Fannkuch11-4 2.70s ± 1% 1.96s ± 0% -27.42% (p=0.000 n=10+10) ``` in other words there is still ~30% room for BCE related improvement. Below comes verbatim copy of my [original proof](https://github.com/golang/go/issues/20393#issuecomment-302877947) that all bounds checks are not actually needed in Fannkuch case. Even though it discusses code emitted by old compilers, all points about bounds checks not needed should stand still valid today. Thanks, Kirill /cc @josharian, @rasky, @dr2chase, @brtzsnr, @aclements ---- 8< ---- Josh thanks for your feedback and for trying the compiler with -B. About fannkuch I've tried to look inside to see details about bounds checking. For this I've compiled `fannkuch_test.go` without and with -B, did `go tool objdump -S` on both, removed addresses of instruction so that the diff is less noisy, and investigated the difference. Let me show it below with my annotations and comments: ```diff @@ -2,259 +2,172 @@ TEXT %22%22.fannkuch(SB) gofile..$GOROOT/test/bench/go1/fannkuch_test.go func fannkuch(n int) int { 64488b0c2500000000 MOVQ FS:0, CX [5:9]R_TLS_LE 483b6110 CMPQ 0x10(CX), SP - 0f8623030000 JBE 0x2508 - 4881ec80000000 SUBQ $0x80, SP - 48896c2478 MOVQ BP, 0x78(SP) - 488d6c2478 LEAQ 0x78(SP), BP - 488b842488000000 MOVQ 0x88(SP), AX + 0f86d5010000 JBE 0x235a + 4883ec48 SUBQ $0x48, SP + 48896c2440 MOVQ BP, 0x40(SP) + 488d6c2440 LEAQ 0x40(SP), BP + 488b442450 MOVQ 0x50(SP), AX if n < 1 { 4883f801 CMPQ $0x1, AX - 0f8ca8020000 JL 0x24b0 + 0f8ca5010000 JL 0x2347 488d0d00000000 LEAQ 0(IP), CX [3:7]R_PCREL:type.int perm := make([]int, n) 48890c24 MOVQ CX, 0(SP) 4889442408 MOVQ AX, 0x8(SP) 4889442410 MOVQ AX, 0x10(SP) - e800000000 CALL 0x2222 [1:5]R_CALL:runtime.makeslice - 488b442420 MOVQ 0x20(SP), AX + e800000000 CALL 0x21bc [1:5]R_CALL:runtime.makeslice + 488b442418 MOVQ 0x18(SP), AX 4889442438 MOVQ AX, 0x38(SP) - 488b4c2418 MOVQ 0x18(SP), CX - 48894c2468 MOVQ CX, 0x68(SP) - 488d1500000000 LEAQ 0(IP), DX [3:7]R_PCREL:type.int + 488d0d00000000 LEAQ 0(IP), CX [3:7]R_PCREL:type.int perm1 := make([]int, n) - 48891424 MOVQ DX, 0(SP) - 488b9c2488000000 MOVQ 0x88(SP), BX - 48895c2408 MOVQ BX, 0x8(SP) - 48895c2410 MOVQ BX, 0x10(SP) - e800000000 CALL 0x2258 [1:5]R_CALL:runtime.makeslice - 488b442418 MOVQ 0x18(SP), AX - 4889442460 MOVQ AX, 0x60(SP) - 488b4c2420 MOVQ 0x20(SP), CX - 48894c2430 MOVQ CX, 0x30(SP) - 488d1500000000 LEAQ 0(IP), DX [3:7]R_PCREL:type.int - count := make([]int, n) - 48891424 MOVQ DX, 0(SP) - 488b942488000000 MOVQ 0x88(SP), DX + 48890c24 MOVQ CX, 0(SP) + 488b542450 MOVQ 0x50(SP), DX 4889542408 MOVQ DX, 0x8(SP) 4889542410 MOVQ DX, 0x10(SP) - e800000000 CALL 0x228e [1:5]R_CALL:runtime.makeslice - 488b442420 MOVQ 0x20(SP), AX - 488b4c2418 MOVQ 0x18(SP), CX - 488b942488000000 MOVQ 0x88(SP), DX - 488b5c2460 MOVQ 0x60(SP), BX - 488b742430 MOVQ 0x30(SP), SI - 31ff XORL DI, DI + e800000000 CALL 0x21e5 [1:5]R_CALL:runtime.makeslice + 488b442418 MOVQ 0x18(SP), AX + 4889442430 MOVQ AX, 0x30(SP) + 488d0d00000000 LEAQ 0(IP), CX [3:7]R_PCREL:type.int + count := make([]int, n) + 48890c24 MOVQ CX, 0(SP) + 488b4c2450 MOVQ 0x50(SP), CX + 48894c2408 MOVQ CX, 0x8(SP) + 48894c2410 MOVQ CX, 0x10(SP) + e800000000 CALL 0x220e [1:5]R_CALL:runtime.makeslice + 488b442418 MOVQ 0x18(SP), AX + 488b4c2450 MOVQ 0x50(SP), CX + 488b542430 MOVQ 0x30(SP), DX + 31db XORL BX, BX for i := 0; i < n; i++ { - eb07 JMP 0x22b5 + eb07 JMP 0x2228 perm1[i] = i // initial (trivial) permutation - 48893cfb MOVQ DI, 0(BX)(DI*8) + 48891cda MOVQ BX, 0(DX)(BX*8) for i := 0; i < n; i++ { - 48ffc7 INCQ DI - 4839d7 CMPQ DX, DI - 7d0a JGE 0x22c4 - perm1[i] = i // initial (trivial) permutation - 4839f7 CMPQ SI, DI - 72ef JB 0x22ae - e93d020000 JMP 0x2501 // panicindex - 48894c2470 MOVQ CX, 0x70(SP) + 48ffc3 INCQ BX + 4839cb CMPQ CX, BX + 7cf4 JL 0x2221 ``` BCE could remove ^^^ panicindex because: - `perm1` is initialized with `make([]int, n)` and its len is never changed - then it is initialized in a loop ```go for i := 0; i < n; i++ { perm1[i] = i // initial (trivial) permutation } ``` so BCE knows n <= len(perm1) (actually ==), 0 <= i < n -> i < len(perm1) -> no BC needed. ```diff n1 := n - 1 - 488d7aff LEAQ -0x1(DX), DI - 48897c2440 MOVQ DI, 0x40(SP) - 4989d0 MOVQ DX, R8 - 4531c9 XORL R9, R9 - 4531d2 XORL R10, R10 + 488d59ff LEAQ -0x1(CX), BX + 4889ce MOVQ CX, SI + 31ff XORL DI, DI + 4531c0 XORL R8, R8 for { - e986010000 JMP 0x2466 + e9cf000000 JMP 0x230d count[r-1] = r - 488954d1f8 MOVQ DX, -0x8(CX)(DX*8) - 4c89da MOVQ R11, DX + 48894cc8f8 MOVQ CX, -0x8(AX)(CX*8) + 48ffc9 DECQ CX for ; r != 1; r-- { - 4883fa01 CMPQ $0x1, DX - 740e JE 0x22fc - count[r-1] = r - 4c8d5aff LEAQ -0x1(DX), R11 - 4939c3 CMPQ AX, R11 - 72e9 JB 0x22e0 - e9fe010000 JMP 0x24fa // panicindex + 4883f901 CMPQ $0x1, CX + 75f2 JNE 0x223e ``` For `count[r-1] = r` BCE could remove ^^^ panicindex because: - `count` is initialized with `make([]int, n)` and its len is never changed - `r` is initialized as `n`, goes down to 1 in below loop, goes up in tail loop inside main loop `for ; r < n; r++`, so it is never > n. => r ∈ [1, n] always. - then there is loop ```go for ; r != 1; r-- { count[r-1] = r } ``` so BCE knows - `1 <= r <= n` - -> `0 <= r-1 <= n-1 < n` so `count[r-1]` does not need BC. ```diff if perm1[0] != 0 && perm1[n1] != n1 { - 4885f6 TESTQ SI, SI - 0f86ee010000 JBE 0x24f3 // panicindex - 4c8b1b MOVQ 0(BX), R11 - 4d85db TESTQ R11, R11 - 0f8490010000 JE 0x24a1 - 4839f7 CMPQ SI, DI - 0f83d9010000 JAE 0x24f3 // panicindex - 4e8b5cc3f8 MOVQ -0x8(BX)(R8*8), R11 - 4c39df CMPQ R11, DI - 0f846a010000 JE 0x2492 - 4c8b5c2468 MOVQ 0x68(SP), R11 - 4c8b642438 MOVQ 0x38(SP), R12 - 41bd01000000 MOVL $0x1, R13 + 4c8b0a MOVQ 0(DX), R9 + 4d85c9 TESTQ R9, R9 + 0f84e5000000 JE 0x233d + 4c8b4cf2f8 MOVQ -0x8(DX)(SI*8), R9 + 4c39cb CMPQ R9, BX + 0f84cd000000 JE 0x2333 + 4c8b4c2438 MOVQ 0x38(SP), R9 + 41ba01000000 MOVL $0x1, R10 ``` - `len(perm1)` is known to be `n` - n is known to be >= 1 because in the beginning of fannkuch there is ```go if n < 1 { return 0 } ``` -> this way perm1[0] does not need BC. - `n1` is initialized as `n - 1` and is never changed - thus it is known 0 <= n1 <= n -1 < n - `len(perm1)` is once again known to be `n` -> this way `perm1[n1]` does not need BC ```diff for i := 1; i < n; i++ { // perm = perm1 - eb07 JMP 0x2341 + eb0b JMP 0x227e perm[i] = perm1[i] - 4f8934eb MOVQ R14, 0(R11)(R13*8) + 4e8b1cd2 MOVQ 0(DX)(R10*8), R11 + 4f891cd1 MOVQ R11, 0(R9)(R10*8) for i := 1; i < n; i++ { // perm = perm1 - 49ffc5 INCQ R13 - 4d39c5 CMPQ R8, R13 - 7d17 JGE 0x235d - perm[i] = perm1[i] - 4939f5 CMPQ SI, R13 - 0f839d010000 JAE 0x24ec // panicindex - 4e8b34eb MOVQ 0(BX)(R13*8), R14 - 4d39e5 CMPQ R12, R13 - 72e2 JB 0x233a - e98f010000 JMP 0x24ec // panicindex - 4c894c2450 MOVQ R9, 0x50(SP) + 49ffc2 INCQ R10 + 4939f2 CMPQ SI, R10 + 7cf0 JL 0x2273 ``` - i ∈ [1, n) - both `perm` and `perm1` were initialized as `make([]int, n)` and their len is never changed -> both `perm[i]` and `perm1[i]` do not need BC ```diff k := perm1[0] // cache perm[0] in k - 4c8b2b MOVQ 0(BX), R13 - 4531f6 XORL R14, R14 + 4c8b12 MOVQ 0(DX), R10 + 4531db XORL R11, R11 for { // k!=0 ==> k>0 - eb6d JMP 0x23d7 + eb32 JMP 0x22bd perm[i], perm[j] = perm[j], perm[i] - 4b8b0cfb MOVQ 0(R11)(R15*8), CX - 49890cfb MOVQ CX, 0(R11)(DI*8) - 4f890cfb MOVQ R9, 0(R11)(R15*8) + 4f8b34e1 MOVQ 0(R9)(R12*8), R14 + 4f8b3ce9 MOVQ 0(R9)(R13*8), R15 + 4f8934e9 MOVQ R14, 0(R9)(R13*8) + 4f893ce1 MOVQ R15, 0(R9)(R12*8) for i, j := 1, k-1; i < j; i, j = i+1, j-1 { - 488d4f01 LEAQ 0x1(DI), CX - 49ffcf DECQ R15 - 488b7c2440 MOVQ 0x40(SP), DI - 4c8b4c2450 MOVQ 0x50(SP), R9 - 48894c2448 MOVQ CX, 0x48(SP) - 488b4c2470 MOVQ 0x70(SP), CX - 488b7c2448 MOVQ 0x48(SP), DI - 4c39ff CMPQ R15, DI - 7d17 JGE 0x23b2 - perm[i], perm[j] = perm[j], perm[i] - 4c39e7 CMPQ R12, DI - 0f8341010000 JAE 0x24e5 // panicindex - 4d8b0cfb MOVQ 0(R11)(DI*8), R9 - 4d39e7 CMPQ R12, R15 - 72bd JB 0x236a - e933010000 JMP 0x24e5 // panicindex ``` - k is initialized as `perm1[0]` - no BC needed here since compiler already knows len(perm1) = n >= 1 - initially perm1 is initialized as `perm1[i] = i` i ∈ [0, n) - from ^^^ the compiler knows initially ∀ x ∈ [0, n) perm1[x] ∈ [0, n) - later elements of perm1 are only exchanged with each other, so the compiler can prove ∀ x ∈ [0, n) perm1[x] ∈ [0, n) holds always - thus k itself can be proven to be in [0, n) on first iteration (see also below about all next iterations) - the inner loop is ```go for i, j := 1, k-1; i < j; i, j = i+1, j-1 { perm[i], perm[j] = perm[j], perm[i] } ``` - j starts from k-1 < n-1 and is only decreasing - i starts from 1 and is only increasing - the loop is till i < j - thus inside loop: * 1 < j < n - 1 * 1 <= i < n - 1 -> both i and j are in valid range and no BC is needed for `perm[i]` and `perm[j]` ```diff - j := perm[k] + 49ffc5 INCQ R13 + 49ffcc DECQ R12 4d39e5 CMPQ R12, R13 - 0f8323010000 JAE 0x24de // panicindex - 4b8b3ceb MOVQ 0(R11)(R13*8), DI + 7ce5 JL 0x228b + j := perm[k] + 4f8b24d1 MOVQ 0(R9)(R10*8), R12 ``` - k exchange is ```go // Now exchange k (caching perm[0]) and perm[k]... with care! j := perm[k] perm[k] = k k = j ``` - we know initially (first iter - see above) k ∈ [0, n) - thus `perm[k]` does not need BC - before loop `perm` is initialized as = `perm1` - this way compiler can know ∀ x ∈ [0, n) `perm[x]` ∈ [0, n) initially - in `j := perm[k]` `j` is thus ∈ [0, n) - `perm[k] = k` preserves ∀ x ∈ [0, n) `perm[x]` ∈ [0, n) property. - from `k = j` compiler can see k continues to k ∈ [0, n) in next iterations ```diff perm[k] = k - 4f892ceb MOVQ R13, 0(R11)(R13*8) + 4f8914d1 MOVQ R10, 0(R9)(R10*8) flips++ - 4d8d6e01 LEAQ 0x1(R14), R13 + 4d8d5301 LEAQ 0x1(R11), R10 if k == 0 { - 4885ff TESTQ DI, DI - 7425 JE 0x23f1 - 4d89ee MOVQ R13, R14 - 4989fd MOVQ DI, R13 - 488b7c2440 MOVQ 0x40(SP), DI + 4d85e4 TESTQ R12, R12 + 7412 JE 0x22c9 + 4d89d3 MOVQ R10, R11 + 4d89e2 MOVQ R12, R10 for i, j := 1, k-1; i < j; i, j = i+1, j-1 { - 4d8d7dff LEAQ -0x1(R13), R15 - 4889442458 MOVQ AX, 0x58(SP) - b801000000 MOVL $0x1, AX - 4889442448 MOVQ AX, 0x48(SP) - 488b442458 MOVQ 0x58(SP), AX - eba0 JMP 0x2391 + 4d8d62ff LEAQ -0x1(R10), R12 + 41bd01000000 MOVL $0x1, R13 + ebd8 JMP 0x22a1 if flipsMax < flips { - 4d39ea CMPQ R13, R10 - 7c56 JL 0x244c - e992000000 JMP 0x248d + 4d39d0 CMPQ R10, R8 + 7c2a JL 0x22f8 + eb5e JMP 0x232e perm1[i] = perm1[i+1] - 4e893cd3 MOVQ R15, 0(BX)(R10*8) - 4d89f2 MOVQ R14, R10 + 4e8b64da08 MOVQ 0x8(DX)(R11*8), R12 + 4e8924da MOVQ R12, 0(DX)(R11*8) + 49ffc3 INCQ R11 for i := 0; i < r; i++ { - 4939d2 CMPQ DX, R10 - 7d1c JGE 0x2423 - perm1[i] = perm1[i+1] - 4d8d7201 LEAQ 0x1(R10), R14 - 4939f6 CMPQ SI, R14 - 0f83c3000000 JAE 0x24d7 // panicindex - 4e8b7cd308 MOVQ 0x8(BX)(R10*8), R15 - 4939f2 CMPQ SI, R10 - 72dd JB 0x23fb - e9b4000000 JMP 0x24d7 // panicindex + 4939cb CMPQ CX, R11 + 7cef JL 0x22d0 ``` - outer loop is `for ; r < n; r++` - inner loop is `for i := 0; i < r; i++` - inside loop r is thus < n, i.e. <= n-1 - inside inner loop i is thus < r, i.e. < n-1, i.e. ∈ [0, n-1) - thus both `perm1[i]` and `perm1[i+1]` does not need BC - once again on `perm1[i] = perm1[i+1]` the compiler can see `∀ x ∈ [0, n) perm1[x] ∈ [0, n)` property is preserved ```diff perm1[r] = perm0 - 4839f2 CMPQ SI, DX - 0f83a4000000 JAE 0x24d0 - 48893cd3 MOVQ DI, 0(BX)(DX*8) + 4c8904ca MOVQ R8, 0(DX)(CX*8) count[r]-- - 4839c2 CMPQ AX, DX - 0f8390000000 JAE 0x24c9 // panicindex - 488b3cd1 MOVQ 0(CX)(DX*8), DI - 48ffcf DECQ DI - 48893cd1 MOVQ DI, 0(CX)(DX*8) + 4c8b04c8 MOVQ 0(AX)(CX*8), R8 + 49ffc8 DECQ R8 + 4c8904c8 MOVQ R8, 0(AX)(CX*8) ``` - outside main loop `r` is initially set to `n` - the main loop contains ```go for ; r != 1; r-- { count[r-1] = r } ``` - thus after this we know (at least on first mainloop iteration, see below about next) `r = 1` furtner - the outer loop, once again, is `for ; r < n; r++` - thus inside r ∈ [1, n) - thus `perm1[r]` and `count[r]` do not need BC - the outer loop only increases r which was initially known to be = 1, so after it is known to be >= 1 - this way when main loop runs next time in ```go for ; r != 1; r-- { count[r-1] = r } ``` the compiler can prove, since `r >= 1` the loop will terminate with r==1, not loop forever ```diff if count[r] > 0 { - 4885ff TESTQ DI, DI - 7f10 JG 0x2459 + 4d85c0 TESTQ R8, R8 + 7f10 JG 0x2305 for ; r < n; r++ { - 48ffc2 INCQ DX - 4c39c2 CMPQ R8, DX - 7d0b JGE 0x245c + 48ffc1 INCQ CX + 4839f1 CMPQ SI, CX + 7d0b JGE 0x2308 perm0 := perm1[0] - 488b3b MOVQ 0(BX), DI - 4531d2 XORL R10, R10 + 4c8b02 MOVQ 0(DX), R8 + 4531db XORL R11, R11 for i := 0; i < r; i++ { - eba9 JMP 0x2402 + ebd7 JMP 0x22dc for ; r < n; r++ { - 4c39c2 CMPQ R8, DX + 4839f1 CMPQ SI, CX if r == n { - 741a JE 0x2478 - 488b7c2440 MOVQ 0x40(SP), DI - 4d89ea MOVQ R13, R10 + 7415 JE 0x231f + 4d89d0 MOVQ R10, R8 if didpr < 30 { - 4983f91e CMPQ $0x1e, R9 - 0f8d78feffff JGE 0x22e8 + 4883ff1e CMPQ $0x1e, DI + 0f8d2fffffff JGE 0x2246 didpr++ - 49ffc1 INCQ R9 + 48ffc7 INCQ DI if didpr < 30 { - e970feffff JMP 0x22e8 + e927ffffff JMP 0x2246 return flipsMax - 4c89ac2490000000 MOVQ R13, 0x90(SP) - 488b6c2478 MOVQ 0x78(SP), BP - 4881c480000000 ADDQ $0x80, SP + 4c89542458 MOVQ R10, 0x58(SP) + 488b6c2440 MOVQ 0x40(SP), BP + 4883c448 ADDQ $0x48, SP c3 RET - 4d89d5 MOVQ R10, R13 + 4d89c2 MOVQ R8, R10 if flipsMax < flips { - ebba JMP 0x244c - 4c8b5c2468 MOVQ 0x68(SP), R11 - 4c8b642438 MOVQ 0x38(SP), R12 - 4d89d5 MOVQ R10, R13 + ebc5 JMP 0x22f8 + 4c8b4c2438 MOVQ 0x38(SP), R9 + 4d89c2 MOVQ R8, R10 if perm1[0] != 0 && perm1[n1] != n1 { - ebab JMP 0x244c - 4c8b5c2468 MOVQ 0x68(SP), R11 - 4c8b642438 MOVQ 0x38(SP), R12 - 4d89d5 MOVQ R10, R13 - eb9c JMP 0x244c + ebbb JMP 0x22f8 + 4c8b4c2438 MOVQ 0x38(SP), R9 + 4d89c2 MOVQ R8, R10 + ebb1 JMP 0x22f8 return 0 - 48c784249000000000000000 MOVQ $0x0, 0x90(SP) - 488b6c2478 MOVQ 0x78(SP), BP - 4881c480000000 ADDQ $0x80, SP - c3 RET - count[r]-- - 0x24c9 e800000000 CALL 0x24ce [1:5]R_CALL:runtime.panicindex - 0x24ce 0f0b UD2 - perm1[r] = perm0 - 0x24d0 e800000000 CALL 0x24d5 [1:5]R_CALL:runtime.panicindex - 0x24d5 0f0b UD2 - perm1[i] = perm1[i+1] - 0x24d7 e800000000 CALL 0x24dc [1:5]R_CALL:runtime.panicindex - 0x24dc 0f0b UD2 - j := perm[k] - 0x24de e800000000 CALL 0x24e3 [1:5]R_CALL:runtime.panicindex - 0x24e3 0f0b UD2 - perm[i], perm[j] = perm[j], perm[i] - 0x24e5 e800000000 CALL 0x24ea [1:5]R_CALL:runtime.panicindex - 0x24ea 0f0b UD2 - perm[i] = perm1[i] - 0x24ec e800000000 CALL 0x24f1 [1:5]R_CALL:runtime.panicindex - 0x24f1 0f0b UD2 - if perm1[0] != 0 && perm1[n1] != n1 { - 0x24f3 e800000000 CALL 0x24f8 [1:5]R_CALL:runtime.panicindex - 0x24f8 0f0b UD2 - count[r-1] = r - 0x24fa e800000000 CALL 0x24ff [1:5]R_CALL:runtime.panicindex - 0x24ff 0f0b UD2 - perm1[i] = i // initial (trivial) permutation - 0x2501 e800000000 CALL 0x2506 [1:5]R_CALL:runtime.panicindex - 0x2506 0f0b UD2 + 48c744245800000000 MOVQ $0x0, 0x58(SP) + 488b6c2440 MOVQ 0x40(SP), BP + 4883c448 ADDQ $0x48, SP + c3 RET func fannkuch(n int) int { - e800000000 CALL 0x250d [1:5]R_CALL:runtime.morestack_noctxt - e9c0fcffff JMP %22%22.fannkuch(SB) + e800000000 CALL 0x235f [1:5]R_CALL:runtime.morestack_noctxt + e90efeffff JMP %22%22.fannkuch(SB) ``` ^^^ are all `CALL runtime.panicindex` destinations and they were all covered by my comments. ---- So maybe I missed something (appologize then) but above I was able to prove all runtime bounds check are unneccessary in fannkuch. I don't see any reason the compiler cannot be taught to do the same. Thus for fannkuch it is theoretically possible to reach -B level with just BCE.
Performance,NeedsFix,compiler/runtime
medium
Major
310,835,594
youtube-dl
Downloading past first ad break on TBS/Adult Swim/other Turner sites
## 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 this: `[x]`) - Use the *Preview* tab to see what your issue will actually look like --- ### Make sure you are using the *latest* version: run `youtube-dl --version` and ensure your version is *2018.04.03*. If it's not, read [this FAQ entry](https://github.com/rg3/youtube-dl/blob/master/README.md#how-do-i-update-youtube-dl) and update. Issues with outdated version will be rejected. - [x] I've **verified** and **I assure** that I'm running youtube-dl **2018.04.03** *Although I'm currently testing with master* ### Before submitting an *issue* make sure you have: - [x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections - [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones - [x] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser ### What is the purpose of your *issue*? - [x] Bug report (encountered problems with youtube-dl) - [ ] Site support request (request for adding support for a new site) - [ ] Feature request (request for a new functionality) - [ ] Question - [ ] Other --- ### 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 the `-v` flag to **your command line** you run youtube-dl with (`youtube-dl -v <your command line>`), copy the **whole** output and insert it here. It should look similar to one below (replace it with **your** log inserted between triple ```): ``` % python -m youtube_dl http://www.tbs.com/shows/final-space/season-1/episode-2/chapter-two -v :( [debug] System config: [] [debug] User config: [u'--hls-prefer-native', u'--ap-mso', u'Verizon_HBA', u'--ap-username', u'PRIVATE', u'--ap-password', u'PRIVATE'] [debug] Custom config: [] [debug] Command-line args: [u'http://www.tbs.com/shows/final-space/season-1/episode-2/chapter-two', u'-v'] [debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8 [debug] youtube-dl version 2018.04.03 [debug] Git HEAD: e8dfecb38 [debug] Python version 2.7.10 (CPython) - Darwin-17.4.0-x86_64-i386-64bit [debug] exe versions: avconv 12.3, avprobe 12.3, ffprobe 3.4.2, rtmpdump 2.4 [debug] Proxy map: {} [TBS] chapter-two: Downloading webpage [TBS] 7bfc76fcbee0c7fd97143b5d217bfdecd3296331: Downloading JSON metadata [TBS] 7bfc76fcbee0c7fd97143b5d217bfdecd3296331: Downloading XML [TBS] 7bfc76fcbee0c7fd97143b5d217bfdecd3296331: Downloading m3u8 information [debug] Default format spec: bestvideo+bestaudio/best [debug] Invoking downloader on u'https://tve.cdn.turner.com/tbs/c6603793053905abf8861e3a0a22d09e/layer7/layer7_bk.m3u8?hdntl=exp=1522789303~acl=%2ftbs%2fc6603793053905abf8861e3a0a22d09e%2f*~hmac=ef0710e3c8738f1dd478ed769556c0b8cccaec348bbc002da9370e1082eabc92' [hlsnative] Downloading m3u8 manifest [hlsnative] Total fragments: 230 [download] Destination: Chapter Two-7bfc76fcbee0c7fd97143b5d217bfdecd3296331.mp4 [download] 100% of 764.22MiB in 00:30 [debug] avconv command line: avprobe -show_streams 'file:Chapter Two-7bfc76fcbee0c7fd97143b5d217bfdecd3296331.mp4' [ffmpeg] Fixing malformed AAC bitstream in "Chapter Two-7bfc76fcbee0c7fd97143b5d217bfdecd3296331.mp4" [debug] ffmpeg command line: avconv -y -i 'file:Chapter Two-7bfc76fcbee0c7fd97143b5d217bfdecd3296331.mp4' -c copy -f mp4 '-bsf:a' aac_adtstoasc 'file:Chapter Two-7bfc76fcbee0c7fd97143b5d217bfdecd3296331.temp.mp4' ERROR: av_interleaved_write_frame(): Invalid argument Traceback (most recent call last): File "youtube_dl/YoutubeDL.py", line 2035, in post_process files_to_delete, info = pp.run(info) File "youtube_dl/postprocessor/ffmpeg.py", line 546, in run self.run_ffmpeg(filename, temp_filename, options) File "youtube_dl/postprocessor/ffmpeg.py", line 208, in run_ffmpeg self.run_ffmpeg_multiple_files([path], out_path, opts) File "youtube_dl/postprocessor/ffmpeg.py", line 204, in run_ffmpeg_multiple_files raise FFmpegPostProcessorError(msg) FFmpegPostProcessorError: av_interleaved_write_frame(): Invalid argument python -m youtube_dl -v 12.20s user 2.78s system 42% cpu 35.628 total ``` --- ### If the purpose of this *issue* is a *site support request* please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**): - Single video: http://www.tbs.com/shows/final-space/season-1/episode-2/chapter-two Note that **youtube-dl does not support sites dedicated to [copyright infringement](https://github.com/rg3/youtube-dl#can-you-add-support-for-this-anime-video-site-or-site-which-shows-current-movies-for-free)**. In order for site support request to be accepted all provided example URLs should not violate any copyrights. --- ### Description of your *issue*, suggested solution and other information Attempting to download from TBS because their site is garbage and takes forever to get working. It used to work fine. Now I'm having trouble getting it to download past the first commercial. If I use ffmpeg, I'm guaranteed to only get up to the first commercial. Other issues suggest using `--hls-prefer-native`, so I switched to that. I still end up with just the first segment (764.22MiB), but now I get `ERROR: av_interleaved_write_frame(): Invalid argument` on top of that. The only solution I can find for that issue is to use `--prefer-ffmpeg` (#15010, #9631), which won't work since I'll only get the first segment (up until the ads). Someone else seems to be encountering the same issue: https://github.com/rg3/youtube-dl/issues/15395#issuecomment-360715386 I get a very similar (enormous) log if I use ffmpeg. For `seg-0` URLs, it works fine. For `seg-1` and beyond: ``` [hls,applehttp @ 0x7fc62b002e00] HLS request for url 'https://tve.cdn.turner.com/tbs/c6603793053905abf8861e3a0a22d09e/layer7/seg-3_00039.ts', offset 0, playlist 0 [hls,applehttp @ 0x7fc62b002e00] Opening 'crypto+https://tve.cdn.turner.com/tbs/c6603793053905abf8861e3a0a22d09e/layer7/seg-3_00039.ts' for reading [mp4 @ 0x7fc62b067c00] Non-monotonous DTS in output stream 0:0; previous: 37274980, current: 21069069; changing to 37274981. This may result in incorrect timestamps in the output file. [mp4 @ 0x7fc62b067c00] Non-monotonous DTS in output stream 0:0; previous: 37274981, current: 21072072; changing to 37274982. This may result in incorrect timestamps in the output file. [mp4 @ 0x7fc62b067c00] Non-monotonous DTS in output stream 0:0; previous: 37274982, current: 21075075; changing to 37274983. This may result in incorrect timestamps in the output file. ... [mp4 @ 0x7fc62b067c00] Non-monotonous DTS in output stream 0:0; previous: 37275140, current: 21549550; changing to 37275141. This may result in incorrect timestamps in the output file. ``` The end of the ffmpeg log, in case it's of any use: ``` No more output streams to write to, finishing. frame=41301 fps=253 q=-1.0 Lsize= 761354kB time=00:06:54.88 bitrate=15033.1kbits/s speed=2.55x video:739361kB audio:21533kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.060402% Input file #0 (https://tve.cdn.turner.com/tbs/c6603793053905abf8861e3a0a22d09e/layer7/layer7_bk.m3u8?hdntl=exp=1522790104~acl=%2ftbs%2fc6603793053905abf8861e3a0a22d09e%2f*~hmac=922d991652baac29a521d4eb6d30bb50ff5b4fa2355f6c148cd0242a273934a7): Input stream #0:0 (video): 41301 packets read (757105606 bytes); Input stream #0:1 (audio): 59350 packets read (22049785 bytes); Total: 100651 packets (779155391 bytes) demuxed Output file #0 (file:Chapter Two-7bfc76fcbee0c7fd97143b5d217bfdecd3296331.mp4.part): Output stream #0:0 (video): 41301 packets muxed (757105606 bytes); Output stream #0:1 (audio): 59350 packets muxed (22049785 bytes); Total: 100651 packets (779155391 bytes) muxed [ffmpeg] Downloaded 779626016 bytes [download] 100% of 743.51MiB in 02:44 ``` I tried `--include-ads`, as well; no luck. The URL I provided as an example doesn't require MSO auth. For URLs in the same series that require MSO auth, I'm encountering #16084 as well, which should be easier to fix.
geo-restricted
medium
Critical
310,856,390
electron
Rename and deprecate focusOnWebView
`focusOnWebView` is not accurately named as an API 😄 Ref: https://github.com/electron/electron/pull/12507#issuecomment-378263960 Requires some review as to what to rename it to and potentially where to move it, in particular, the difference in its effect compared to [`mainWindow.focus()`](https://github.com/electron/electron/blob/200388ff96b577359da7a6b1957c6a9045218a52/atom/browser/native_window_views.cc#L364) and [`mainWindow.webContents.focus()`](https://github.com/electron/electron/blob/master/atom/browser/api/atom_api_web_contents.cc#L1521), both of which utilize a different code path to [`focusOnWebView()`](https://github.com/electron/electron/blob/200388ff96b577359da7a6b1957c6a9045218a52/atom/browser/api/atom_api_browser_window.cc#L813). /cc @brenca
enhancement :sparkles:
low
Minor
310,868,342
angular
Outer element animates on different timing curve from child
## I'm submitting a... <!-- Check one of the following options with "x" --> <pre><code> [ ] Regression (a behavior that used to work and stopped working in a new release) [X] Bug report <!-- Please search GitHub for a similar issue or PR before submitting --> [ ] Feature request [ ] Documentation issue or request [ ] Support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question </code></pre> ## Current behavior <!-- Describe how the issue manifests. --> I'm animating the height of an element inside a `height:auto` container, and the outer element lags visibly behind the child element. ## Expected behavior <!-- Describe what the desired behavior would be. --> In any given animation frame, the containing element's height should be determined by the height of its child. ## Minimal reproduction of the problem with instructions <!-- For bug reports please provide the *STEPS TO REPRODUCE* and if possible a *MINIMAL DEMO* of the problem via https://stackblitz.com or similar (you can use this template as a starting point: https://stackblitz.com/fork/angular-gitter). --> [Stackblitz](https://stackblitz.com/edit/angular-m8uezc) with exaggerated timing to emphasize the effect. ## Environment <pre><code> Angular version: 5.2.8, forked from current Stackblitz example project Browser: - [X] Chrome (desktop) version 65 - [ ] Chrome (Android) version XX - [ ] Chrome (iOS) version XX - [X] Firefox version 59 - [ ] Safari (desktop) version XX - [ ] Safari (iOS) version XX - [ ] IE version XX - [ ] Edge version XX </code></pre>
type: bug/fix,area: animations,freq2: medium,P4
low
Critical
310,887,684
vscode
Ctrl+Alt+Down (selecting lines) and Alt+Up (moving them) moves only 1 line
<!-- Do you have a question? Please ask it on https://stackoverflow.com/questions/tagged/vscode. --> <!-- Use Help > Report Issue to prefill these. --> - VSCode Version: 1.22.0-ins - OS Version: win7x64 ![ctrl alt down](https://user-images.githubusercontent.com/24613274/38259340-6b4a1ac4-376d-11e8-8bec-71e042b44726.gif)
feature-request,editor-multicursor,editor-contrib
low
Minor
310,899,571
react
Provide a way to detect infinite component rendering recursion in development
<!-- Note: if the issue is about documentation or the website, please file it at: https://github.com/reactjs/reactjs.org/issues/new --> **Do you want to request a *feature* or report a *bug*?** - Feature (possibly bug?) **What is the current behavior?** I've been trying out the new Context API in my project and it's awesome. However, in my haste to start using it, I managed to stumble into a situation where every time I would try and render a certain component which was making use of a few different contexts, the app would completely freeze, and the only thing that would let me get out of this error state was to forcefully kill the process via the chrome task manager. Nothing would be logged to the console, the app would just completely freeze, and when I opened up the task manager and saw the CPU spiked up every time i would go to this component, and the only way I could stop it was to crash the tab. I finally threw some `console` statements in and saw that it had just entered into an infinite loop between these providers. I managed to get the app to stop crashing, but I'm still unsure as to why exactly this was happening. I'm sure I was just using this API incorrectly somehow, but this was a very confusing problem to diagnose, and some error checking here would be incredibly useful **What is the expected behavior?** It would be very beneficial to have some sort of checks in place, similar to what happens with too many `setState` calls happening too closely when you call it from `componentDidUpdate`, for example. That way, instead of freezing everything up permanently, the app could at least crash and report some sort of information and help me realize where I'd gone wrong. **Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** - React `16.3.0` - Chrome `65.0.3325.181`
Type: Feature Request
medium
Critical
310,900,516
opencv
cv::viz::Mesh::load() does not properly load a ply file containing faces other than triangles
<!-- If you have a question rather than reporting a bug please go to http://answers.opencv.org where you get much faster responses. If you need further assistance please read [How To Contribute](https://github.com/opencv/opencv/wiki/How_to_contribute). This is a template helping you to create an issue which can be processed as quickly as possible. This is the bug reporting section for the OpenCV library. --> ##### System information (version) <!-- Example - OpenCV => 3.1 - Operating System / Platform => Windows 64 Bit - Compiler => Visual Studio 2015 --> - OpenCV => 3.1 - Operating System / Platform => Linux Ubuntu 16.04 - Compiler => gcc 5.4.0 - Remark => Use opencv bundled with ROS ##### Detailed description The function `cv::viz::Mesh::load(const String & file, int type = LOAD_PLY)` does not properly load a ply file that has faces other than triangles defined. The vertices are always properly loaded, but the faces (polygons) are not. This only occurs if the faces are defined by more than three vertices. ##### Steps to reproduce Save the following two ply files; then run the following code. square.ply: ``` ply format ascii 1.0 element vertex 4 property double x property double y property double z element face 1 property list uchar int vertex_index end_header 0 0 0 0 1 0 1 0 0 1 1 0 4 0 1 2 3 ``` triangle.ply: ``` ply format ascii 1.0 element vertex 3 property double x property double y property double z element face 1 property list uchar int vertex_index end_header 0 0 0 0 1 0 1 0 0 3 0 1 2 ``` code: ``` #include <opencv2/viz.hpp> #include <iostream> int main(int argc, char** argv) { std::string path = "/path/to/your/saved/folder/"; std::string file_name_square = path + "square.ply"; std::string file_name_triangle = path + "triangle.ply"; cv::viz::Mesh triangle = cv::viz::Mesh::load(file_name_triangle); std::cout << "Mat cloud = " << std::endl << triangle.cloud << std::endl << std::flush; std::cout << "Mat polygons = " << std::endl << triangle.polygons << std::endl << std::flush; cv::viz::Mesh square = cv::viz::Mesh::load(file_name_square); std::cout << "Mat cloud = " << std::endl << square.cloud << std::endl << std::flush; std::cout << "Mat polygons = " << std::endl << square.polygons << std::endl << std::flush; return 0; } ``` The above code returns the following output: ``` Mat cloud = [0, 0, 0, 0, 1, 0, 1, 0, 0] Mat polygons = [3, 0, 1, 2] Mat cloud = [0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0] Mat polygons = [4, 0, 1, 2, 3, 0, 0, 0, 0] ``` You can see that in the case of the triangle, the polygon matrix is well initialized, with 4 entries. However, for the square, the matrix has 8 entries as opposed to 5 (there are four additional 0 trailing the matrix). In both cases, the cloud matrix is correct. In this specific case, the code does not crash because the additional entries are all zeros. However, when I use this snippet with other code, the entries are random and cause the program to crash. See an example of this below: ``` Mat cloud = [0, 0, 0, 0, 1, 0, 1, 0, 0] Mat polygons = [3, 0, 1, 2] Mat cloud = [0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0] Mat polygons = [4, 0, 1, 2, 3, 0, 48, 0, 33022272] ``` Trying to create a Mesh Widget with the previous output generates a segmentation fault.
feature,category: viz
low
Critical
310,935,991
go
cmd/go: add option to ignore local replace/exclude directives
If you have a go.mod with replace/exclude directives, those are used when building that module as the top-level target but not when used as a dependency. It might be helpful to have a command-line build flag that means "ignore those even in the top-level module" so that you can test more easily in the configuration users will see.
modules
low
Major
310,939,442
opencv
Base class like cv::Point, cv::Rect could be made easily trivially copiable in C++11, allowing optimizations
Because of C++98 compatibility, classes like cv::Point_, cv::Point3_, cv::Size_ and cv::Rect_ have an explicit copy constructor (and = operator), which copies field by field. Using C++11 (conditional compiling I suppose) we could make these classes trivially copyable, simply defining the copy constructor and the = operator as `= default`. This would enable some optimization. In particular, `std::is_trivially_copyable` would return true (in this moment it returns false unfortunately). More about TriviallyCopiable: http://en.cppreference.com/w/cpp/concept/TriviallyCopyable As example of optimization enabled, see notes in std::copy documentation http://en.cppreference.com/w/cpp/algorithm/copy
feature,category: core,category: build/install
low
Minor
311,037,501
go
proposal: crypto/tls: provide a way to access local certificate used to set up a connection
While TLS provides [ConnectionState()](https://golang.org/pkg/crypto/tls/#Conn.ConnectionState) to share some connection security info, like remote certificate (`PeerCertificates`), it lacks the info about local certificate used to set up a connection. And it's not always possible to predict local certificate used as the selection depends on the remote end requirements. Exposing the local certificate would be very helpful for debugging connection issues, for example, user may find certificate getter returns suboptimal certificate, which may be expiring soon or having a long verification chain. Moreover, it will also enable collecting certificate usage statistics, which could be valuable for service owners. @FiloSottile Thanks!
Proposal,Proposal-Crypto
low
Critical
311,045,500
TypeScript
Comparing constrained generic types/substitution types to conditional types
When comparing a generic type to a conditional type whose checkType is the same type, we have additional information that we are not utilizing.. for instance: ```ts function f<T extends number>(x: T) { var y: T extends number ? number : string; // `T` is not assignable to `T extends number ? number : string` y = x; } ``` Ignoring intersections, we should be able to take the true branch all the time based on the constraint. The intuition here is that `T` in the example above is really `T extends number ? T : never` which is assignable to `T extends number ? number : string`. Similarly, with substitution types, we have additional information that we can leverage, e.g.: ```ts declare function isNumber(a: any): a is number; function map<T extends number | string>( o: T, map: (value: T extends number ? number : string) => any ): any { if (isNumber(o)) { // `T & number` is not assignable to `T extends number ? number : string` return map(o); } } ```
Suggestion,Awaiting More Feedback
medium
Critical
311,046,014
pytorch
[feature request] adding a nonzero element "in-place" in sparse tensor
First mentioned here, but turns out to be non-existent. https://github.com/pytorch/pytorch/pull/6225#pullrequestreview-108887248 This operation would simply add a new index and a new value to a sparse tensor. cc @vincentqb @aocsa @nikitaved @pearu @mruberry
module: sparse,triaged
low
Minor
311,082,573
rust
New lookup functions on BTreeMap/Set
The current function `get` attempts to find an exact key match; if it fails, it returns `None`. I propose the addition of four variants: - `get_lt` finds the greatest `(key, element)` in the map/set that is less than the given key. - `get_lte` returns the lookup key and element in the map if present, otherwise returning the next smallest key and element. - `get_gt` finds the smallest `(key, element)` in the map/set that is greater than the given key. - `get_gte` looks up the key; if present, returns it and the element, if not, returns the next largest key and element. The specific use case that prompted this: I'm working on a toy Smalltalk implementation. One of the implementation methods is "given an object pointer, find the next object pointer that is an instance of of the class." Given a value `instances: BTreeSet<Pointer>`, the implementation is simply `get_gt(obj_ptr)`. <!-- TRIAGEBOT_START --> <!-- TRIAGEBOT_ASSIGN_START --> <!-- TRIAGEBOT_ASSIGN_DATA_START$${"user":null}$$TRIAGEBOT_ASSIGN_DATA_END --> <!-- TRIAGEBOT_ASSIGN_END --> <!-- TRIAGEBOT_END -->
C-enhancement,A-collections,T-libs-api
medium
Major
311,122,175
pytorch
[Caffe2] mobile_exporter init_net has code calling information
**The init_net file generated from the mobile_exporter function has code calling information,** There is fragment information in my generated init_net file: ■146 "GivenTensorFill* shape0* values-6}■?- {╓>-$└?R┐ File "Style_torch.py", line 186, in <module> init_net, predict_net = mobile_exporter.Export(c2_workspace, c2_model, c2_model.external_input) File "/home/wguo/lib/temp1/caffe2/build/caffe2/python/predictor/mobile_exporter.py", line 86, in Export add_tensor(init_net, blob_name, blob) File "/home/wguo/lib/temp1/caffe2/build/caffe2/python/predictor/mobile_exporter.py", line 53, in add_tensor utils.MakeArgument("values", values), * 
caffe2
low
Minor
311,143,000
opencv
Viz3d memory leak - memory allocated for widgets never released
##### System information (version) - OpenCV => 3.1 - Operating System / Platform => Windows 64 Bit - Compiler => Visual Studio 2015 ##### Detailed description Memory allocated for widgets is never released once the event loop is triggered via spin() or spinOnce() so it is not possible to dynamically update the widget content which would be very useful for many applications. This happens even if all previous widgets are removed before adding new ones or even if the Viz3d object is deleted and recreated. The memory leak is particularly obvious when working with large point clouds (WCloud) that need to be updated frequently. This limits the usability of Viz3d for showing one-off static content only. ##### Steps to reproduce Instantiate Viz3d loop { Generate a cv::Mat of CV_32FC3 with a large number of points Create a WCloud from this Mat and show it with showWidget() Start the event loop e.g. with spinOnce(1, true); Delete any objects above that were allocated dynamically } or even worse loop { Instantiate Viz3d Generate a cv::Mat of CV_32FC3 with a large number of points Create a WCloud from this Mat and show it with showWidget() Start the event loop e.g. with spinOnce(1, true); Delete any objects above that were allocated dynamically and the Viz3d object }
bug,category: viz
low
Minor
311,145,977
flutter
Document how FutureBuilder.builder shouldn't include logic beyond building widgets (e.g. don't call Navigator.push), and say where to put that logic instead
How to call Navigator.push in FutureBuilder error log: ``` I/flutter (29158): ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═════════════════════════════════════════════ I/flutter (29158): The following assertion was thrown building FutureBuilder<Result>(dirty, state: I/flutter (29158): _FutureBuilderState<Result>#de36b): I/flutter (29158): setState() or markNeedsBuild() called during build. I/flutter (29158): This Overlay widget cannot be marked as needing to build because the framework is already in the I/flutter (29158): process of building widgets. A widget can be marked as needing to be built during the build phase I/flutter (29158): only if one of its ancestors is currently building. This exception is allowed because the framework I/flutter (29158): builds parent widgets before children, which means a dirty descendant will always be built. I/flutter (29158): Otherwise, the framework might not visit this widget during this build phase. I/flutter (29158): The widget on which setState() or markNeedsBuild() was called was: I/flutter (29158): Overlay-[LabeledGlobalKey<OverlayState>#a53eb](state: OverlayState#95866(entries: I/flutter (29158): [OverlayEntry#8b3e2(opaque: false; maintainState: false), OverlayEntry#0c205(opaque: false; I/flutter (29158): maintainState: true), OverlayEntry#8b1ef(opaque: false; maintainState: false), I/flutter (29158): OverlayEntry#bcfba(opaque: false; maintainState: true)])) I/flutter (29158): The widget which was currently being built when the offending call was made was: I/flutter (29158): FutureBuilder<Result>(dirty, state: _FutureBuilderState<Result>#de36b) I/flutter (29158): I/flutter (29158): When the exception was thrown, this was the stack: I/flutter (29158): #0 Element.markNeedsBuild.<anonymous closure> (package:flutter/src/widgets/framework.dart:3419:11) I/flutter (29158): #1 Element.markNeedsBuild (package:flutter/src/widgets/framework.dart:3445:6) I/flutter (29158): #2 State.setState (package:flutter/src/widgets/framework.dart:1124:14) I/flutter (29158): #3 OverlayState.insertAll (package:flutter/src/widgets/overlay.dart:301:5) I/flutter (29158): #4 OverlayRoute.install (package:flutter/src/widgets/routes.dart:35:24) I/flutter (29158): #5 TransitionRoute.install (package:flutter/src/widgets/routes.dart:167:18) I/flutter (29158): #6 ModalRoute.install (package:flutter/src/widgets/routes.dart:719:18) I/flutter (29158): #7 NavigatorState.push.<anonymous closure> (package:flutter/src/widgets/navigator.dart:925:13) I/flutter (29158): #8 State.setState (package:flutter/src/widgets/framework.dart:1108:30) I/flutter (29158): #9 NavigatorState.push (package:flutter/src/widgets/navigator.dart:922:5) I/flutter (29158): #10 Navigator.push (package:flutter/src/widgets/navigator.dart:557:34) I/flutter (29158): #11 OrderListState.build.futureBuilder.<anonymous closure> (package:dispature/screen/order_new.dart:73:27) I/flutter (29158): #12 _FutureBuilderState.build (package:flutter/src/widgets/async.dart:504:48) I/flutter (29158): #13 StatefulElement.build (package:flutter/src/widgets/framework.dart:3713:27) I/flutter (29158): #14 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:3625:15) I/flutter (29158): #15 Element.rebuild (package:flutter/src/widgets/framework.dart:3478:5) I/flutter (29158): #16 BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2225:33) I/flutter (29158): #17 BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding&WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:621:20) I/flutter (29158): #18 BindingBase&GestureBinding&ServicesBinding&SchedulerBinding&PaintingBinding&RendererBinding._handlePersistentFrameCallback (package:flutter/src/rendering/binding.dart:208:5) I/flutter (29158): #19 BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._invokeFrameCallback (package:flutter/src/scheduler/binding.dart:990:15) I/flutter (29158): #20 BindingBase&GestureBinding&ServicesBinding&SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:930:9) I/flutter (29158): #21 BindingBase&GestureBinding&ServicesBinding&SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:842:5) I/flutter (29158): #22 _invoke (file:///b/build/slave/Linux_Engine/build/src/flutter/lib/ui/hooks.dart:120) I/flutter (29158): #23 _drawFrame (file:///b/build/slave/Linux_Engine/build/src/flutter/lib/ui/hooks.dart:109) I/flutter (29158): ══════════════════════════════════════════════ ```
c: crash,framework,from: study,d: api docs,f: routes,customer: crowd,P2,team-framework,triaged-framework
low
Critical
311,227,379
vscode
[html] propose html 4 properties (cellPadding ...)
#Issue Type: <b>Bug</b> Cell-padding and cell-spacing, valign and align attribute autocomplete not working VS Code version: Code 1.21.1 (79b44aa704ce542d8ca4a3cc44cfca566e7720f1, 2018-03-14T14:46:47.128Z) OS version: Windows_NT x64 10.0.16299 <details> <summary>System Info</summary> |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz (8 x 2594)| |Memory (System)|15.93GB (7.93GB free)| |Process Argv|C:\Program Files\Microsoft VS Code\Code.exe| |Screen Reader|no| |VM|0%| </details><details><summary>Extensions (25)</summary> Extension|Author (truncated)|Version ---|---|--- html-snippets|abu|0.2.1 vscode-caniuse|aka|0.5.3 vs-code-css-comments|ash|1.0.3 htmltagwrap|bra|0.0.7 php-autocomplete|bsc|0.4.2 simple-react-snippets|bur|1.1.1 vscode-css-modules|cli|0.2.2 jshint|dba|0.10.17 vscode-eslint|dba|1.4.8 vscode-quick-select|dba|0.2.5 auto-rename-tag|for|0.0.15 auto-comment-blocks|kev|1.0.1 expand-region|let|0.1.2 node-debug2|ms-|1.22.0 sublime-keybindings|ms-|3.0.3 team|ms-|1.122.0 sass-indented|rob|1.4.8 vscode-idiomatic-css-comments|rya|0.1.2 git-autoconfig|shy|0.0.1 easysass|spo|0.0.6 css-auto-prefix|spo|0.1.4 vscode-jss-snippets|vis|0.2.2 vscode-react-native|vsm|0.6.6 html-css-class-completion|Zig|1.17.1 vscode-open-in-github|ziy|1.3.1 (2 theme extensions excluded) </details> Reproduces only with extensions <!-- generated by issue reporter -->
feature-request,html
low
Critical
311,249,542
rust
Stability attributes on moved items can be confusing
https://doc.rust-lang.org/beta/std/ops/enum.Bound.html says it has been around since 1.17.0, but https://doc.rust-lang.org/std/ops/enum.Bound.html does not exist. (and I can't use it on stable in the playground) Digging more into it, it looks the type itself was indeed stabilized in 1.17.0, but in a different location (`collections`). I think this sort of thing can be confusing, and it raises the question; what version *should* it say here? Is there precedent here? And if so (and if the current choice to use 1.17.0 is indeed following that precedent), should there perhaps be some prominent notice in the docs indicating the version at which Bound was moved to this location?
A-stability,T-compiler,C-bug,S-needs-repro
low
Minor
311,255,133
bitcoin
Wallet transactions affected by RBF double spends are not (always) clearly shown in GUI or RPC
# What behavior did you expect? When the mempool contains a transaction that conflicts with a wallet transaction, for this to (always) be visible in both bitcoin-qt GUI and bitcoin-cli output. # What was the actual behavior (provide screenshots if the issue is GUI-related)? RPC: If the conflicting transaction touches the wallet (eg. if you are the sender, or if you are the recipient and we are considering an honest RBF feebump), the conflict is visible in the (undocumented) `walletconflicts` return value of the `listtransactions` and `gettransaction` RPC calls. In the case the conflicting transaction does NOT touch the wallet (eg. if you are the receiver of a maliciously doublespent RBF transaction), this is not indicated. GUI: If the conflicting transaction touches the wallet (eg. if you are the sender, or if you are the recipient and we are considering an honest RBF feebump), all versions are visible in the GUI, without indication of conflict between them, but the "pending" part of the balance (correctly) does not show a duplicate amount of incoming money. In the case the conflicting transaction does NOT touch the wallet (eg. if you are the receiver of a maliciously doublespent RBF transaction), there is no indication of any conflict (pending balance still counts the incoming transaction that has been doublespent) aside from the transaction details stating it is not in the mempool. ![rbfdoublespend1](https://user-images.githubusercontent.com/37372069/38313687-eb5b8e02-3824-11e8-8f02-cd124946f54f.png) ![rbfdoublespend2](https://user-images.githubusercontent.com/37372069/38313690-ef300f1c-3824-11e8-80e8-0506924c6454.png) ![rbfdoublespend3](https://user-images.githubusercontent.com/37372069/38313695-f1a1819a-3824-11e8-9c6b-eba5778353e3.png) # How reliably can you reproduce the issue, what are the steps to do so? Very reliably; screenshots provided are from 3 interconnected regtest nodes, the top node has mined some coins and has first spent them to the middle node, RBF-feebumped that transaction (only second transaction shown in screenshots), RBF-doublespent it to the bottom node, then RBF-doublespent it to itself. All nodes have only the latest transaction in the mempool. # What version of Bitcoin Core are you using, where did you get it (website, self-compiled, etc)? Version 0.16.0, pre-compiled version from bitcoincore.org.
Feature,Brainstorming,Wallet,Mempool
low
Major
311,261,266
opencv
OpenCV static build fails on -lavcodec not found on macOS
##### System information (version) - OpenCV => master branch current tip on 2018-04-04 7bc980edaf7ff2f515e195e7fdd8f274f820d4a1 - Operating System / Platform => macOS 10.13.3 - Compiler => Apple LLVM version 9.1.0 (clang-902.0.39.1) ##### Detailed description Building OpenCV as a static lib fails. > [ 52%] Linking CXX executable ../../bin/opencv_perf_core > ld: library not found for -lavcodec > clang: error: linker command failed with exit code 1 (use -v to see invocation) ##### Steps to reproduce `cmake -D CMAKE_BUILD_TYPE=DEBUG -D BUILD_SHARED_LIBS=OFF ../opencv && make` or `cmake -D CMAKE_BUILD_TYPE=RELEASE -D BUILD_SHARED_LIBS=OFF ../opencv && make`
category: build/install,platform: ios/osx,incomplete
low
Critical
311,261,408
rust
Should -Ctarget-feature go straight to LLVM?
The `--print target-features` and `-C target-feature` options list/accept all target features LLVM knows, under the names LLVM gives them (see discussion in #49428). This is in contrast to `#[target_feature]` and `cfg(target_feature)`, which accept only explicitly whitelisted features, and in some cases change the LLVM names (e.g., `bmi1` instead of `bmi`). This is inconsistent, and also makes the command line interface less stable than it could be. As @gnzlbg noted in #49428, this difference has existed for a while. However, in effect the command line options don't have a real stability guarantee: `rustc`s not built with our LLVM fork don't currently recognize *any* target features, and the LLVM names can change under our feet (this was part of the rationale for having a whitelist in rustc). Note that `-C` flags "without stability guarantee" are not without precedent, e.g., consider `-C passes` (which also depends on LLVM internals). So I believe we're within our rights to change this. Especially now that the whitelist is much more complete. And it has real advantages: consistency between command line and attributes/cfgs, more stability for the command line switch, and making it work on `rustc`s with system LLVMs, thanks to @cuviper's work in #49428. cc @japaric are you aware of uses of this option that aren't covered by [the current whitelists](https://github.com/rust-lang/rust/blob/e31addf7c358aba28ce0910e93d009397a72a05f/src/librustc_trans/llvm_util.rs#L85-L111)?
A-LLVM,C-enhancement,A-stability,T-compiler
medium
Major
311,280,278
pytorch
Multithreading Scaling Issue with MKL
Trying to optimize my intel CPU and reach the performance mentioned [here](https://software.intel.com/en-us/blogs/2017/04/18/intel-and-facebook-collaborate-to-boost-caffe2-performance-on-intel-cpu-s) through muli-threading: I build the binaries using MKL blas with OpenMP enabled. I'm running [convnet_benchmark.py](https://github.com/pytorch/pytorch/blob/master/caffe2/python/convnet_benchmarks.py) as mentioned in the link above. I'm changing the number of threads using both OMP_NUM_THREADS and MKL_NUM_THREADS. If I increase number of threads using the former the performance drops, if I use the latter it does nothing. Anyone else has seen similar issues?
caffe2
low
Major
311,281,878
vscode
[json] completion has bad replacement span, overwrites comment
Issue Type: <b>Bug</b> * Open a `tsconfig.json` containing: ```json { "compilerOptions": { "target": "es5" } } ``` * Comment out `//"es5"` * Put a `"` in front of it. Choose the completion that pops up for "es2015". * Result: ```json { "compilerOptions": { "target": "es2015",es5" } } ``` VS Code version: Code - Insiders 1.22.0-insider (6b4d53cdab8bcae1eaaa4934d93c077319b573db, 2018-04-04T13:52:38.747Z) OS version: Windows_NT x64 10.0.15063 <details> <summary>System Info</summary> |Item|Value| |---|---| |CPUs|Intel(R) Xeon(R) CPU E5-1620 v3 @ 3.50GHz (8 x 3492)| |Memory (System)|15.91GB (6.76GB free)| |Process Argv|C:\Program Files\Microsoft VS Code Insiders\Code - Insiders.exe| |Screen Reader|no| |VM|0%| </details>Extensions: none <!-- generated by issue reporter -->
feature-request,json
low
Critical
311,289,931
go
runtime: add g.p
Some important and hot data is stored in Ps, such as write barrier buffers and defer pools. Getting from a G to a P currently requires evaluating `g.m.p`. We should consider adding a direct link, `g.p`, to avoid an extra memory lookup. This should reduce memory lookups and cache pressure / cache misses on hot code, particularly write barrier writes. This might also enable us to eliminate the mcache. This requires updating `g.p` every time a G gets (un)scheduled. I took a stab at this but never quite got it working. I hope someone else might. cc @aclements @dvyukov
Performance,compiler/runtime
low
Major
311,306,624
vue
Transition on overflowed elements prevents scroll
### Version 2.5.16 ### Reproduction link [https://codepen.io/johnjleider/pen/MVqyXB](https://codepen.io/johnjleider/pen/MVqyXB) ### Steps to reproduce - Click the button to open the menu - As the element is transitioning in, begin to scroll (try not to move your mouse while scrolling) ### What is expected? The scrollable area continues to scroll ### What is actually happening? The scrolling area will get stuck. The scrolling event is still being fired but is not actually scrolling the content. Once you move your mouse and start to scroll again, it works as expected. If you wait for the transition to finish before scrolling, the bug does not present itself. ![scroll](https://user-images.githubusercontent.com/9064066/38321350-643295b6-3805-11e8-92ff-ddd2fb3eecd2.gif) --- We had a report of the `v-select` component not scrolling. We have confirmed this is only happening in Chrome 65, but extends back to even 0.15 of the framework (Vuetify). I created the attached codepen to determine if it was framework specific or generally reproducible. While their may be other css properties that trigger this issue, I have only had success with opacity and happens specifically with the `enter` declaration. If you remove the entry animation, this does not occur. **Removed entry animation** https://codepen.io/johnjleider/pen/ZxMObZ?editors=1111 <!-- generated by vue-issues. DO NOT REMOVE -->
browser quirks,transition
low
Critical
311,340,520
TypeScript
In JS, auto types don't narrow with `if`
```ts var result; if (!!!!true) { result = { type: /** @type {"ok"} */("ok"), payload: 12 } } else { result = { type: /** @type {"error"} */("error"), message: "Really, really bad" } } if (result.type === 'ok') { result.payload result.message } else if (result.type === 'error') { result.payload result.message } else { result.payload result.message } switch (result.type) { case "ok": result.payload result.message // error break; case "error": result.payload // error result.message break; default: result.payload // error result.message // error break; } ``` **Expected behavior:** Narrowing should work the same for `if` and `switch`. The three branches of the `if` should error exactly where `switch` does. **Actual behavior:** No narrowing with `if`. No errors with `if`. Notes: 1. Auto types are always enabled in javascript, even if `noImplicitAny: "false"`. 2. Everything works fine if `result` has a declared type instead of an auto type.
Bug,Domain: JavaScript
low
Critical
311,342,557
TypeScript
In JS, auto type assignments don't add string index to literal types
**Code** ```js function lit() { return { a: 1 } } var result; if (!!!!true) { result = lit() } else { result = { b: 1 } } result/**/ ``` **Expected behavior:** `result : { [x: string]: any, a: number } | { [x: string]: any, b: number}` **Actual behavior:** `result : { [x: string]: any, a: number } | { b: number}` Note that if you initialise `result` in one statement, everything works: ```js function lit() { return { a: 1 } } var result = !!!!true ? lit() : { b: 1 }; result/**/ ```
Bug,Domain: JavaScript
low
Minor
311,346,573
opencv
OpenCV Android: FPS decrease over time with JavaCameraView on Nexus 7
##### System information (version) <!-- Example - OpenCV => 3.4.0dev - Operating System / Platform => Android --> ##### Detailed description I think I found a bug in the current `JavaCameraView` or the underlying `CameraBridgeViewBase `Implementation. I compiled the OpenCv library by myself for multiple architectures to get the contrib modules working. My typical OpenCv-Activity creates an instance of a JavaCameraView and receives each frame in the `onCameraFrame()-Method` and delegates the `Mat` information to a background- processing-Thread. However, on my Samsung Galaxy S8 i get about 30 FPS at beginning, it drops to 25FPS after some time and then only differs with lighting conditions. So far so good. But if I run the Application on my Nexus 7 (it's my customers device, so I really need to get it work there) it starts with 27 - 30 FPS after the `mCamera.startPreview();` got called. Every minute after that i lose about 2 FPS. After some time the camera is running it ends at ~7 FPS and thats not acceptable for my needs. If I close the app (I release the camera in onPause() and onDestroy() and free all allocated memory if the app got closed) and restart, it directly starts with the low 8 - 10 FPS in where it ends the Appstart before. It seems like some kind of framebuffer or cached Bitmaps do not get released properly but i really cant find the root of the problem. If i remove all code inside the `onCameraFrame()` and only return the incoming frames as RGBA it makes no difference to the observed behaviour. I also used the android profiler to check if there is any increase of memory usage. I dont know if it relates to this problem, but the profiler shows that the "java" memory category is about 36MB at beginning and increases over time with ~1MB every few seconds. That looks a bit strange to me since I am not created any Java instances by myself at runtime. so IMO the error must be in the JavaCameraView or underlying implementation or something stable memory usage except increasing "Java"-related allocated memory: ![android_profiler](https://user-images.githubusercontent.com/14052248/38327035-8b94dadc-3847-11e8-807b-51c19b4d88a7.png) significant Logcat difference from S8 to Nexus 7 are these kind of messages: `04-04 19:22:07.112 194-28680/? I/QCamera3HWI: int qcamera::QCamera3HardwareInterface::translateMetadataToParameters(const camera_metadata_t*, cam_trigger_t&): flash mode after mapping 0 04-04 19:22:07.112 208-28705/? E/mm-camera: linearization_set_params: param_id is not supported in this module pca_rolloff_set_params: param_id is not supported in this module wb_set_params: param_id is not supported in this module 04-04 19:22:07.113 208-28705/? E/mm-camera: demosaic_set_params: param_id 6, is not supported in this module demux_set_params: param_id 6, is not supported in this module clf_set_params: param_id 6, is not supported in this module mce_set_params: param_id is not supported in this module sce_set_params: param_id is not supported in this module linearization_set_params: param_id is not supported in this module pca_rolloff_set_params: param_id is not supported in this module demosaic_set_params: param_id 8, is not supported in this module demux_set_params: param_id 8, is not supported in this module clf_set_params: param_id 8, is not supported in this module 04-04 19:22:07.113 208-28676/? E/mm-camera-sensor: module_sensor_event_control_set_parm:1084 CAM_INTF_PARM_LED_MODE 0 04-04 19:22:07.113 208-28676/? E/mm-camera: stats_port_proc_downstream_set_parm AF ROI sent x: 0 ,y: 0 dx: 0 dy: 0, weight: 0 04-04 19:22:07.114 208-28676/? E/mm-camera: isp_util_set_param_crop_region, No change in crop info, nothing to update ` which got called for every incoming frame. are there any related issues with the Nexus 7 i didnt found yet? ##### Steps to reproduce -build opencv 3.4.0 from source with official python build script and include contrib modules and NEON support -Use JavaCameraView and test on Nexus 7 -Implement onCameraFrame() -reuse Mat Objects and release them properly to avoid fps-loss due to high memory allocation -->
platform: android
low
Critical
311,418,076
go
cmd/compile: incorrect column reported for "struct literal does not implement" error
Please answer these questions before submitting your issue. Thanks! ### What version of Go are you using (`go version`)? go1.10.1 ### Does this issue reproduce with the latest release? Yes ### What operating system and processor architecture are you using (`go env`)? ``` GOARCH="amd64" GOOS="darwin" ``` ### What did you do? https://play.golang.org/p/XjJFwvLoNoA ```go package main type Interface interface { Method() } func UseInterface(i Interface) {} type Struct struct{} func main() { UseInterface(Struct{}) } ``` ### What did you expect to see? ``` prog.go:12:15: cannot use Struct literal (type Struct) as type Interface in argument to UseInterface: Struct does not implement Interface (missing Method method) ``` ```go func main() { UseInterface(Struct{}) // ^ } ``` ### What did you see instead? ``` prog.go:12:21: cannot use Struct literal (type Struct) as type Interface in argument to UseInterface: Struct does not implement Interface (missing Method method) ``` ```go func main() { UseInterface(Struct{}) // ^ } ```
NeedsFix,compiler/runtime
low
Critical
311,469,603
godot
Distribute Godot on the Windows 10 Store
I know the open source art program Krita has done something similar, but perhaps Godot could be on the Windows 10 app store along with Steam to streamline the update experience for those who don't have the Steam client open all the time. Krita is also a paid app, so perhaps that could help fund development if there's interest in that option.
enhancement,platform:windows,topic:porting
medium
Critical
311,505,700
opencv
Android CameraGLRenderBase/CameraGLSurfaceView crash on application pause/exit due to invalid EGL context.
##### System information (version) - OpenCV => 3.4.1 - Operating System / Platform => Windows 64 Bit - Compiler => Android Studio 3.1 (Clang NDK 16) ##### Detailed description My Android activity creates a GL surface view that derives from CameraGLSurfaceView. During execution everything works as expected, but when I switch to another running app, forcing the activity to pause, the activity crashes. Logcat indicates that a thread was trying to work with an EGL context that didn't exist. ##### Steps to reproduce 1. Using Android Studio, create an Android app based on [OpenCV Android Tutorial 4]( https://github.com/opencv/opencv/blob/master/samples/android/tutorial-4-opencl/src/org/opencv/samples/tutorial4/MyGLSurfaceView.java). 1. Install and run the app on your phone. 1. Use Android Studio's Logcat view to inspect the applications log while it executes. 1. Press the Android app switching button. 1. Your list of running applications appear. 1. After a few short moments, your app crashes. 1. Verify with Logcat that an EGL context error occurred. ##### Fix The crash is caused by trying to access the EGL context from different threads. It happens in CameraGLRenderBase's updateState method. It typically calls doStart in the correct thread (the GLThread), but doStop sometimes gets called from the main thread. The solution entails doing proper thread management. To solve the problem, the code can be changed in the following ways (using Kotlin in this example): 1. CameraGLRenderBase: ```.kt @MainThread @Synchronized fun enableView() { mEnabled = true mView.queueEvent( { updateState() } ) // this is the fix } ... @MainThread @Synchronized fun disableView() { mEnabled = false mView.queueEvent( { updateState() } ) // this is the fix } ... @WorkerThread protected fun updateState() { ... // keep body as is } @WorkerThread @Synchronized protected open fun doStart() { ... // keep body as is } @WorkerThread protected open fun doStop() { ... // keep body as is } ... @MainThread fun onPause() { mHaveSurface = false mView.queueEvent( { updateState() } ) // this is the fix mCameraHeight = -1 mCameraWidth = mCameraHeight } ... @WorkerThread override fun onSurfaceChanged(gl: GL10, surfaceWidth: Int, surfaceHeight: Int) { ... // keep body as is } ``` 1. CameraGLSurfaceView.java: Call setCameraIndex after setRenderer is called. This will satisfy the conditions for the mView.queueEvent function.
bug,platform: android
low
Critical
311,506,711
rust
Keeping references to #[thread_local] statics is allowed across yields.
*This does not affect stabilization of `async fn` unless `#[thread_local]` is also stabilized* [Try on playground](https://play.rust-lang.org/?gist=8cf0763bd1ca6107622592a751c565d0&version=nightly): ```rust #![feature(generators, generator_trait, thread_local)] use std::ops::Generator; use std::sync::atomic::{AtomicUsize, Ordering}; use std::thread; #[thread_local] static FOO: AtomicUsize = AtomicUsize::new(0); fn foo() -> impl Generator<Yield = (String, usize), Return = ()> { static || { let x = &FOO; loop { let s = format!("{:p}", x); yield (s, x.fetch_add(1, Ordering::SeqCst)); } } } fn main() { unsafe { let mut g = thread::spawn(|| { let mut g = foo(); println!("&FOO = {:p}; resume() = {:?}", &FOO, g.resume()); g }).join().unwrap(); println!("&FOO = {:p}; resume() = {:?}", &FOO, g.resume()); thread::spawn(move || { println!("&FOO = {:p}; resume() = {:?}", &FOO, g.resume()); }).join().unwrap(); } } ``` Sample output: ``` &FOO = 0x7f48f9bff688; resume() = Yielded(("0x7f48f9bff688", 0)) &FOO = 0x7f48fafd37c8; resume() = Yielded(("0x7f48f9bff688", 1)) &FOO = 0x7f48f9bff688; resume() = Yielded(("0x7f48f9bff688", 0)) ``` You can see by the pointer addresses and values inside `FOO` that the same location was reused for the second child thread (it's a bit harder to show a crash) - this is clearly an use-after-free. If we had in-language `async`, the same problem could be demonstrated using those. In non-generator functions, such references have function-local lifetimes and cannot escape. With the stable `thread_local!` from `libstd`, user code gets access to the reference in a (non-generator/async) closure, which also doesn't allow escaping the reference. cc @alexcrichton @withoutboats @Zoxc
C-enhancement,P-medium,A-borrow-checker,T-compiler,I-unsound,A-coroutines,F-coroutines,requires-nightly,F-thread_local,S-bug-has-test
low
Critical
311,593,492
material-ui
[Accordion] Mobile performance
<!--- Provide a general summary of the issue in the Title above --> On Mobile Devices the Expansion Panel is rather slow/feels sluggish when opening/closing it. <!-- Thank you very much for contributing to Material-UI by creating an issue! ❤️ To avoid duplicate issues we ask you to check off the following list. --> <!-- Checked checkbox should look like this: [x] --> - [X] I have searched the [issues](https://github.com/mui-org/material-ui/issues) of this repository and believe that this is not a duplicate. ## Expected Behavior <!--- If you're describing a bug, tell us what should happen. If you're suggesting a change/improvement, tell us how it should work. --> When i open/close an expansion panel on a mobile device, then the open/close animation for the expansion panel should be fluid and not sluggish. ## Current Behavior <!--- If describing a bug, tell us what happens instead of the expected behavior. If suggesting a change/improvement, explain the difference from current behavior. --> When i open/close an expansion panel on a mobile device, then the animation of opening/closing the control should be fluid/feel fluid ## Steps to Reproduce (for bugs) <!--- Provide a link to a live example (you can use codesandbox.io) and an unambiguous set of steps to reproduce this bug. Include code to reproduce, if relevant (which it most likely is). This codesandbox.io template _may_ be a good starting point: https://codesandbox.io/s/github/mui-org/material-ui/tree/v1-beta/examples/create-react-app If YOU DO NOT take time to provide a codesandbox.io reproduction, should the COMMUNITY take time to help you? --> 1. Simply visit https://material-ui.com/demos/expansion-panels/ on a mobile device and open/close an expansion panel, then you should be able to see it yourself 2. I also tested the expansion panel of https://material.angular.io/components/expansion/overview on my mobile phone there i don't have the problem that the open/close animation is slow/sluggish ## Context <!--- How has this issue affected you? What are you trying to accomplish? Providing context helps us come up with a solution that is most useful in the real world. --> Currently this issue affects mobile users of material ui. ## Your Environment <!--- Include as many relevant details about the environment with which you experienced the bug. --> | Tech | Version | |--------------|---------| | Material-UI | v1.0.0-beta.40 | | React | 16.3.0 | | browser | Mobile Chrome | | Mobile Device | Huawei P10 | ### Benchmarks - https://www.stefanjudis.com/snippets/how-to-animate-height-with-css-grid/
performance,component: Collapse,component: accordion
medium
Critical
311,613,509
rust
rustdoc: transitive Drop indicators should be shown
A type can contain types implements `Drop` but doesn't implement Drop itself; I'll call this "transitive Drop" below. Such types doesn't explicitly implement drop, but still have destructors run. We should indicate this in some way; for example, `Drop` has a meaning in futures (cancellation), but we can't see that currently through the docs; documenting transitive Drop will help the understanding.
T-rustdoc,C-enhancement,A-destructors
low
Minor
311,700,773
TypeScript
In JS, multiple prototype assignments give duplicate identifier error
```js function A() { this.x = 1 } function Am(n) { } if (!!!true) { A.prototype.m = Am } else { A.prototype.m = function() { } } ``` **Expected behavior:** Multiple assignments should be allowed, but there should a type error on the second assignment because the types of `m` do not match. **Actual behavior:** Duplicate identifier error on both declarations of `m`.
Bug,Domain: JavaScript
low
Critical
311,721,315
nvm
What is NVM? in README.md for newbies
I was just thinking there should be a link to an article or website that explains what NVM is, why use NVM, example use cases for NVM, description of all NVM terminology, etc. I have found the following links to assist with this but it would definitely be best coming from one of the core developers and/or core contributors. - Using Node Version Manager (NVM) to Manage Multiple Node.js Versions - http://codetheory.in/using-node-version-manager-nvm-to-manage-multiple-node-js-versions/ - Managing Node.js Versions with nvm - https://davidwalsh.name/nvm - Installing Node.js Using Node Version Manager (nvm) - https://medium.com/@richardkall/installing-node-js-using-node-version-manager-nvm-c21546a613bc - Comprehensive Node Version Manager (NVM) Tutorial - https://www.keycdn.com/blog/node-version-manager/ - How to Install NVM (Node Version Manager) for Node.js on Ubuntu 12.04 LTS - https://www.liquidweb.com/kb/how-to-install-nvm-node-version-manager-for-node-js-on-ubuntu-12-04-lts/
informational
low
Minor
311,738,821
rust
`extern type` cannot support `size_of_val` and `align_of_val`
Based on discussion on https://github.com/rust-lang/rust/issues/43467 and in @rust-lang/lang meetings, an opaque `extern type` type cannot support `size_of_val` or `align_of_val`. We believe that we should panic or abort in this case. We also believe that we should have a compile-time lint that detects this whenever possible, since at some level the compiler should know at compile time if code invokes `size_of_val` or `align_of_val` on an `extern type`. I've opened this separate issue to document that decision, and will propose FCP on it to give time for final comments.
C-enhancement,T-lang,disposition-merge,finished-final-comment-period
high
Critical
311,756,139
go
cmd/objdump: symbolization of global variable doesn't work for shared objects
### What operating system and processor architecture are you using (`go env`)? darwin/amd64 ### What did you do? ``` package main var X int //go:noinline func F() { X = 5 } func main() { F() } ``` ``` $ go build p $ go tool objdump -s "\.F$" p TEXT main.F(SB) /tmp/p2/src/p/p.go p.go:6 0x104b3a0 48c7050553070005000000 MOVQ $0x5, main.X(SB) p.go:6 0x104b3ab c3 RET :-1 0x104b3ac cc INT $0x3 :-1 0x104b3ad cc INT $0x3 :-1 0x104b3ae cc INT $0x3 :-1 0x104b3af cc INT $0x3 ``` The address of global variable is symbolized (`main.X(SB)`), which is nice. But this is not correct for shared objects, e.g. plugin: ``` $ go build -buildmode=plugin p $ go tool objdump -s "\.F$" p.so TEXT _p.F(SB) /tmp/p2/src/p/p.go p.go:6 0x44670 4c8b3dc1090000 MOVQ __cgo_yield+200(SB), R15 p.go:6 0x44677 49c70705000000 MOVQ $0x5, 0(R15) p.go:6 0x4467e c3 RET :-1 0x4467f cc INT $0x3 ``` Note the `__cgo_yield+200(SB)`, which should actually be X in the GOT, like what `compile -S` prints ``` 0x0000 00000 (/tmp/p2/src/p/p.go:6) MOVQ "".X@GOT(SB), R15 0x0007 00007 (/tmp/p2/src/p/p.go:6) MOVQ $5, (R15) ``` cc @aarzilli
help wanted,NeedsInvestigation,compiler/runtime
low
Minor
311,789,716
tensorflow
[feature] js_func (for javascript) equivalent of py_func
### System information - **Have I written custom code (as opposed to using a stock example script provided in TensorFlow)**: n/a - **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: iOS, Android - **TensorFlow installed from (source or binary)**: n/a - **TensorFlow version (use command below)**: n/a - **Python version**: n/a - **Bazel version (if compiling from source)**: n/a - **GCC/Compiler version (if compiling from source)**: n/a - **CUDA/cuDNN version**: n/a - **GPU model and memory**: n/a - **Exact command to reproduce**: n/a ### Describe the problem I suggest adding a `js_func` that allows defining nodes in javascript. This would be similar to the existing `py_func`. There are many systems (ie iOS and Android) that have JS runtimes but do not have python runtimes.
stat:awaiting tensorflower,type:feature
low
Major
311,790,106
vscode
Launch task directly into split terminal
Issue Type: <b>Feature Request</b> The integrated terminal split panes should support launching a task from the command palette into a split terminal panel. Here is the current workflow 1. Launch a long-running task from command palette by typing `ctrl+p -> task first-watcher-task -> enter`. (A new terminal window appears, running the task). 2. Click the split terminal button to create a split terminal. 3. In the split terminal, type the arguments for the second task and run it by pressing the enter key in the terminal. Can't run `ctrl+p -> task second-watcher-task -> enter` because that would open a whole new terminal section of its own. Here is the desired workflow 1. Launch a long-running task from command palette by typing `ctrl+p -> task some-watcher-task -> enter`. (A new terminal window appears, running the task). 2. Launch the second long-running task from comand palette by typing `ctrl+p -> task second-watcher-task -> enter`. Somehow, this task runs in a second panel of the split terminal, based on some extra command, a task configuration setting, or perhaps by having focus in an already opened split terminal. VS Code version: Code - Insiders 1.22.0-insider (81335051b2d1460112905c2bce23c205e7cdd231, 2018-04-03T01:09:54.914Z) OS version: Windows_NT x64 6.1.7601 <!-- generated by issue reporter -->
feature-request,api,tasks,api-finalization
medium
Major
311,792,810
TypeScript
Cannot Load Custom Definition File in Repository
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 2.8.1 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** Definition File, Ambient type **Detail** I am importing a JavaScript library that doesn't have any definition file. I want to create a custom definition file that I place in my repository. I want TypeScript to read this definition file. I have tried many combination of tsconfig.json (typeRoot, include, path, baseUrl, etc.) Without being successful. I also moved the definition folder under `src`, and renamed the definition file to index.d.ts (inside a folder with the name of the library) without any success. **Code** Small complete repro here: https://github.com/MrDesjardins/importdefinitionfiles ```ts // main.ts: import MessageFormat from "messageformat"; // Doesn't have type // messageformat.d.ts: declare module messageformat { export type Msg = (params: {}) => string; export interface MessageFormat { new(message: string): any; compile: (messageSource: string) => Msg; } } ``` **Expected behavior:** TypeScript to find the definition file and to use it without having a compilation error. **Actual behavior:** Error message ``` Could not find a declaration file for module 'messageformat'. '/Users/pdesjardins/code/perso/importdefinitionfiles/node_modules/messageformat/lib/messageformat.js' implicitly has an 'any' type. Try `npm install @types/messageformat` if it exists or add a new declaration (.d.ts) file containing `declare module 'messageformat';` 1 import MessageFormat from "messageformat"; ``` **Playground Link:** https://github.com/MrDesjardins/importdefinitionfiles **Related Issues:**
Suggestion,Help Wanted,Good First Issue,Domain: Error Messages,PursuitFellowship
low
Critical
311,800,446
TypeScript
Support locally scoped type alias nodes
We mentioned this at a previous design meeting while discussing conditional types but I don't think an issue was opened for it (nor can I find mention of it within some design meeting notes). We think it'd be useful for both conditional types (to make a bare type reference/parameter) and in complex types (to reduce duplication) to enable a kind of type-alias-as-a-type-node syntax. Something that allows rewriting code like this: ```ts type Foo<T, K extends string, TVal extends T[K] = T[K]> = TVal extends string ? {x: TVal} : never; ``` as ```ts type Foo<T, K extends string> = type TVal = T[K] in TVal extends string ? {x: TVal} : never; ``` or ```ts type MyBox<T, K extends keyof T = keyof T, TVal extends T[K] = T[K]> = { host: T, getValue(k: K): TVal, setValue(k: K, v: TVal): TVal }; ``` as ```ts type MyBox<T> = type K = keyof T, TVal = T[K] in { host: T, getValue(k: K): TVal, setValue(k: K, v: TVal): TVal }; ``` this allows elision of unnecessary information (no need to write both a constraint and identical default), and prevents usages from accidentally providing an extra type parameter when they shouldn't (because the defaulted parameter was used effectively as a const). I believe @bterlson had mentioned wanting something like this in-person, too. As for proposed syntax, I'd say: * A `LocalTypeAlias` is a `TypeNode` (so is valid anywhere a `TypeNode` is). * A `LocalTypeAlias` is parsed as a required `type` keword, then a comma separated list of `LocalTypeAliasAssignment`s (with at least one element) - the type assignment list, followed by `in` and an arbitrary `TypeNode` - the subject of the assignments. * A `LocalTypeAliasAssignment` is an `Identifier` followed by `=` followed by a `TypeNode`. (does this need to be restricted to parse in a human-understandable way?) For semantics: * A `LocalTypeAlias` is a local scope around its subject type node. It binds a declaration for a type parameter for each identifier in each assignment in its type alias assignment list, constrained to the assigned value, and establishes a `TypeMapper` to map those type parameters to their assigned value as well (similar to an instantiated generic type alias). (Should they be allowed to be mutually referential? Other parameter lists are, so I don't see why not.) These aliases are made to be type parameters (and not raw aliases like a nongeneric type alias declaration) so they interact favorably with conditional types - eg, they are a way to force a conditional type to iterate over a union for any type node without introducing another top-level alias. Thoughts?
Suggestion,In Discussion
medium
Major
311,800,659
pytorch
[feature request] Include libomp support (macOS)
The standard way to link OpenMP while using Apple Clang on macOS seems to be by using [libomp](https://openmp.llvm.org/), which is a bottle available in [brew](https://github.com/Homebrew/homebrew-core/blob/master/Formula/libomp.rb). Apple doesn't seem to include libomp in their version of the compiler, but this bottle fixes that. It seems as though CMake does not pick up libomp however, even when following the instructions in the formula. It could be an error on my side however. This [guide](https://iscinumpy.gitlab.io/post/omp-on-high-sierra/) might also be of interest. cc @malfet @seemethere @walterddr
module: build,triaged,module: macos
low
Critical
311,858,508
vscode
Make telemetry Data opt-in
<!-- Do you have a question? Please ask it on https://stackoverflow.com/questions/tagged/vscode. --> <!-- Use Help > Report Issue to prefill these. --> - VSCode Version: 1.22.1 - OS Version: Windows 10 Steps to Reproduce: 1. Start VS Code 1.22.1 for the first time 2. Now a notification pops up that tells me, that telemetry data is collected and I can opt-out <!-- Launch with `code --disable-extensions` to check. --> Does this issue occur when all extensions are disabled?: Yes 1. I am not sure about this but I don't think collecting telemtry data by default will conform to the General Data Protection Regulation of the EU that becomes effective in May 2018. It would be better to disable it per default and tell the user to enable it if he want's to share data with you. 2. When I checked the privacy policy linked in the notification popup (https://privacy.microsoft.com/en-us/privacystatement) I can't find anything about the data collected by vs code. This is a very important information. This can be a big showstopper for using vscode in some companies, wen data is sent and nobody knows what data this is.
under-discussion
high
Critical