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
433,042,897
rust
Investigate supporting filesystem overlay in rustc
## Rationale This would allow us to support in-memory/patched (mainly for IDEs, maybe would be useful for build systems?) versions of source code when invoking rustc as a separate process. While it's possible to provide a [`FileLoader`](https://github.com/rust-lang/rust/blob/00856722bad5e9d96048319fb41f4b7e249820cd/src/libsyntax/source_map.rs#L60-L61) trait implementation when [running rustc](https://github.com/rust-lang/rust/blob/9cd61f025b1b92076e69a9ef2d9233325c7d8bdc/src/librustc_driver/lib.rs#L121-L125), it requires the user to run the compiler in-process. ## Use cases 1. ~We would like to stop the RLS from depending on Clippy the library, which breaks often due to relying on rustc internals and thus is responsible for most of the RLS disappearances from nightly builds (#59761). I can't think of how we could solve this, short of ugly build-time hacks that would somehow detect if Clippy is compilable and if so, conditionally enable it via a feature (or provide a custom Clippy shim with IPC VFS support but that'd still include the lib and thus this comes back to the original stability problem).~ EDIT: Done in #61670. 2. Due to the current RLS' architecture, we'd like to run the compiler as a separate process to compute the analysis in parallel - right now we compile all the primary crates in the workspace in a linear fashion in order to support easy VFS access to in-memory files and to reduce save-analysis serialization overhead. This particular case could be side-stepped by implementing IPC for our VFS implementation that could be relayed to using our FileLoader trait and rustc shim (`rls-rustc`). ## Pros - Uniform way to provide patched versions of the file at a process level ## Cons - This only helps dev tools use cases - Has to be implemented and maintained - We're not sure *yet* as to what the target architecture is for a rustc-as-a-language-server and in the long run this might not be necessary I'd be interested in hearing your thoughts and whether we should ultimately support it. cc'ing people that might be interested @nikomatsakis @matklad (anyone that I'm missing?)
T-compiler,T-dev-tools,C-feature-request
low
Major
433,052,170
godot
[Bullet] Raycasting a BoxShape hints round edges/artifacts
Godot 3.1 I wanted to use `BoxShape` to make cubes which I can raycast, but I quickly found that the normals I get from raycasting behave as if the cubes had round edges Oo Not only on the edges, but also a little bit on the faces, there is a spot where normals become oblique. ![image](https://user-images.githubusercontent.com/1311555/56101541-bca28000-5f1c-11e9-9b31-1018ec38147a.png) test project: [BoxShapeRaycast.zip](https://github.com/godotengine/godot/files/3078022/BoxShapeRaycast.zip) Outputting raycast normals on a texture for every pixel of the screen gives the following normal map: ![image](https://user-images.githubusercontent.com/1311555/56102573-bd8bdf80-5f25-11e9-8a0b-0cc7f238228b.png) Same test, in Unity3D, provides a much cleaner result: ![image](https://user-images.githubusercontent.com/1311555/56103359-473dac00-5f2a-11e9-915c-9a63880779ec.png) This does not happen with GodotPhysics either. Is that due to how Bullet was configured in Godot? Edit: while I understand this has practical uses for collision dynamics, it doesnt feel useful for raycasts.
bug,confirmed,topic:physics,topic:3d
low
Major
433,057,952
TypeScript
Missing string indexer on NamedNodeMap interface in lib.dom.d.ts?
For context, see https://github.com/sindresorhus/refined-github/pull/1783, specifically this commit, https://github.com/sindresorhus/refined-github/pull/1783/commits/48baae0a1952e05b35c3a93d25c854bec2f99b6f. Also, just posting my tweet about this so that people can find discussions about the issue. See https://twitter.com/nickytonline/status/1117524648982392833 I'll restate what I tweeted as I probably should have posted my question here originally. The NamedNodeMap interface in lib.dom.ts does not allow for a string indexer, even though vanilla JS supports this in browsers, e.g. `someDomElement.attribute['aria-label'].value`. We have code like this in the Refined GitHub extension, so for the time being, I've gone ahead via a declaration merge for `NamedNodeMap` ```javascript interface NamedNodeMap { [key: string]: Attr; } ``` I can't tell from the [MDN docs for NamedNodeMap](https://developer.mozilla.org/en-US/docs/Web/API/NamedNodeMap) if it's standard or not. All they seem to mention is "Attr nodes' indexes may differ among browsers" which wouldn't apply to access by the attribute name. Just wondering if this was omitted by mistake or is it because this is not considered WHATWG DOM standard? I went to https://dom.spec.whatwg.org/#interface-namednodemap and unless I'm reading it incorrectly, I believe it states that using a string indexer is valid. Thoughts? Happy to PR this up if it's valid.
Bug,Domain: lib.d.ts
low
Minor
433,066,697
neovim
Cannot map <c-n>/<c-p> when completion is active
<!-- Before reporting: search existing issues and check the FAQ. --> - `nvim --version`: ``` NVIM v0.4.0-603-gd81b510ec Build type: Debug LuaJIT 2.1.0-beta3 Compilation: /usr/bin/cc -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -Wno-array-bounds -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -I/home/mayuanpeng/work/ncm2-ws/neovim/build/config -I/home/mayuanpeng/work/ncm2-ws/neovim/src -I/usr/include -I/home/mayuanpeng/work/ncm2-ws/neovim/build/src/nvim/auto -I/home/mayuanpeng/work/ncm2-ws/neovim/build/include Compiled by mayuanpeng@dpu208 Features: +acl +iconv +tui See ":help feature-compile" system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/home/mayuanpeng/work/ncm2-ws/local/share/nvim" Run :checkhealth for more info ``` - Vim (version: ) behaves differently? Vim 8.0.1453 behaves the same. - Operating system/version: ``` NAME="Ubuntu" VERSION="18.04.2 LTS (Bionic Beaver)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 18.04.2 LTS" VERSION_ID="18.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=bionic UBUNTU_CODENAME=bionic ``` - Terminal name/version: xfce4-terminal - `$TERM`: `xterm-256color` ### Steps to reproduce using `nvim -u NORC` ``` nvim -u NORC :imap <c-n> 123 :call feedkeys("i\<c-r>=complete(1, ['completion1', 'completion2'])?'':''\<cr>\<c-n>") ``` ### Actual behaviour Get `completoin2` in the buffer. ### Expected behaviour Get `completion1123` in the buffer Note that I'll get the expected result if I replace `<c-n>` with `<c-g>`
bug-vim,needs:discussion,mappings
low
Critical
433,073,584
godot
Godot prevents automatic sleeping due to the audio system
___ ***Bugsquad note:** This issue has been confirmed several times already. No need to confirm it further.* ___ <!-- Please search existing issues for potential duplicates before filing yours: https://github.com/godotengine/godot/issues?q=is%3Aissue --> **Godot version:** 3.1 <!-- Specify commit hash if non-official. --> **OS/device including version:** Mac OSX 10.14 **Issue description:** The godot editor is preventing Mac's from automatically sleeping, according to the activity monitor. <img width="973" alt="Screen Shot 2019-04-14 at 7 45 14 PM" src="https://user-images.githubusercontent.com/2387719/56104869-70d8e200-5eee-11e9-95f9-7ff7398765ef.png"> **Steps to reproduce:** Open any godot project.
bug,confirmed,topic:audio,performance
medium
Critical
433,082,577
flutter
Questions for porting flutter engine to a new os
Hi, I want to port the engine to a new **non-linux** os(RTOS) platform and have several questions about that: 1) Can I port the flutter engine on the rtos? 2) If can , which system interfaces the OS must support for the flutter engine. You know the linux platform has a libc(glibc) to provide the interface for application to access the kernel's services. But in the non-linux OS, it doesn't support the entire libc functionality, such as fuchsia. Or it doesn't support libc. So what the exact system interface the flutter engine need is in new OS platform? 3) what’s the difference between "fml / platform" and “shell / platform” , why there has two platforms ? Thanks, @chinmaygarde
engine,d: wiki,P3,team-engine,triaged-engine
low
Major
433,134,945
TypeScript
Allow `export type Foo;` as valid syntax
## Search Terms Exporting a type defined elsewhere. Export a defined type. Type alias circularly references itself. Can't export a type with the same name. ## Suggestion Currently you can only export types right when you declare them: ```typescript export type Foo = string | number; ``` But many people often use ambient files to make their types available globally throughout the project without the need to import them. This however means that the types cannot be exported directly where they define them because the file would cease to be ambient. The current way of coping with this is naming the type differently for internal use and then reexporting it with a different name: ```typescript // in types.ts type _Foo = string | number; // in index.ts export type Foo = _Foo; ``` I suggest that this inconvenience could be easily solved by allowing this syntax: ```typescript export type Foo; ``` ## Use Cases As described above, it's useful to export types defined in ambient files. ## Examples As above ## Checklist My suggestion meets these guidelines: * [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code * [x] This wouldn't change the runtime behavior of existing JavaScript code * [x] This could be implemented without emitting different JS based on the types of the expressions * [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.) * [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Suggestion,Awaiting More Feedback
low
Minor
433,157,743
react
Field type="email" with multiple attribute cursor jumps to start
<!-- 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*?** Bug **What is the current behavior?** While adding multiple comma separated email addresses the cursor will jump to te beginning the input field. First i thought it was a [Formik](https://github.com/jaredpalmer/formik/issues/1428) issue, but it seems to be a React one. Example pure React: https://codesandbox.io/embed/0y06zo7l8p Example React with Formik: https://codesandbox.io/embed/k57zw7wz5 MDN docs: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email#multiple **What is the expected behavior?** Cursor stays on current position. **Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?** Chrome 73, Safari 12.1, Opera 60.0 React 16.7.0 Maybe #14551 related?
Type: Bug,Component: DOM
low
Critical
433,192,899
ant-design
TreeSelect树选择 组件,多选情况下,子节点选择后禁用,仍可在input中通过关闭,将选择后禁用的节点删除选中
- [ ] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate. ### Reproduction link [![Edit on CodeSandbox](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/wkp7xw7p47) ### Steps to reproduce - treeData数据中将选中的目标节点禁用(通过treeData和TreeNode生成的树都有此问题) - 打开树里面的Node 2节点,可以看到生成的Child Node3是选中禁用状态 - 直接在input中点击Child Node3标签的删除x按钮,树中之前选中的Child Node3节点状态直接设置为了未选择 ### What is expected? 按照正常逻辑,选择并且禁用后的节点,不应该被input中的标签操作 ### What is actually happening? 选择并且禁用的节点,在树里面是不可操作情况,但可以通过标签的删除越过禁用,然后清除了数据 | Environment | Info | |---|---| | antd | 3.16.3 | | React | react | | System | mac 10.14.4 | | Browser | chrome 73.0.3683.103 | <!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
🐛 Bug,Inactive
low
Minor
433,241,209
rust
Cycle error from pretty printer with RUST_LOG
*(I wasn't able to find any existing discussion, issues or PRs about this, I'd not be surprised if someone had found it already, so my bad if this isn't a new problem)* Yesterday, I was about to take a look into #59494 (the test case for that will trigger this), running that test case with `RUST_LOG=rustc::traits` makes a cycle error happen instead of the expected ICE. I can get the ICE with just `RUST_LOG=rustc::traits::select` (IIRC), but not when I include other modules. The cycle error comes from the pretty printer, in particular [this line](https://github.com/rust-lang/rust/blob/master/src/librustc/ty/print/pretty.rs#L547). I managed to resolve the issue, [here's the diff that fixed it](https://gist.github.com/davidtwco/2ad19e572b568bc3464563c4a13bb208) - when the pretty printer calls `predicates_of` for existential types then it ends up calling code with debug logs that print the same type, causing a cycle. The diff above only bypasses the cycle error when `RUST_LOG=rustc::ty::subst,rustc::ty::context,rustc_typeck`, I assume it won't when you add more modules. Here's the [relevant Zulip topic](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/pretty.20print.20type.20debug.20log.20cycle.20error/near/163340604).
A-pretty,T-compiler,C-bug,I-cycle
low
Critical
433,269,672
vue
Custom directive binds differs on components vs elements
### Version 2.6.10 ### Reproduction link [https://jsfiddle.net/bponomarenko/uom10qd2/](https://jsfiddle.net/bponomarenko/uom10qd2/) ### Steps to reproduce 1. Open browser console. 2. Click on Toggle button two times. ### What is expected? Directive will emit the same console messages when applied to DOM elements and to components (on init and after click on button). I'm not sure what should be expected output. Either ``` bind: first comp bind: first elem unbind: first comp unbind: first elem bind: first comp bind: first elem ``` or ``` bind: first comp bind: first elem unbind: second comp unbind: second elem bind: first comp bind: first elem ``` ### What is actually happening? Messages from the directive are the same on init, but different after button have been clicked. Actual console output: ``` bind: first comp bind: first elem unbind: first comp unbind: second elem bind: second comp bind: first elem ``` --- It seems that order in which directives are applied to DOM elements and components are different. In my setup I have custom directive which relies on some DOM attribute with configuration data. When this custom directive is bound/unbound in a "regular flow" – everything works as expected (directive binds after element attributes are updated). However when directive is bound/unbound in case of Vue "in-place patch strategey", behavior seems to be different. <!-- generated by vue-issues. DO NOT REMOVE -->
bug,has workaround
low
Major
433,280,346
vue-element-admin
全局配置,fixedHeader 设置为true时,引导页,圈定内容被遮挡,显示空白
<!-- 注意:为更好的解决你的问题,请参考模板提供完整信息,准确描述问题,信息不全的 issue 将被关闭。 Note: In order to better solve your problem, please refer to the template to provide complete information, accurately describe the problem, and the incomplete information issue will be closed. --> ## Bug report(问题描述) 全局配置,fixedHeader 设置为true时,引导页,圈定内容被遮挡,显示空白 #### Steps to reproduce(问题复现步骤) 1. 全局配置,fixedHeader 设置为true 2. 进入引导页,打开引导 3. 此时即可看到问题效果 #### Screenshot or Gif(截图或动态图) 无 #### Link to minimal reproduction(最小可在线还原demo) 无 <!-- Please only use Codepen, JSFiddle, CodeSandbox or a github repo --> #### Other relevant information(格外信息) - Your OS: windows 10 - Node.js version: v8.12.0 - vue-element-admin version: v4.0.1
not vue-element-admin bug
low
Critical
433,351,819
go
crypto, x/crypto: apply golang.org/wiki/TargetSpecific policy
A lot of packages need to be adapted to follow the new https://golang.org/wiki/TargetSpecific policy. In particular, point 1 would make the generic code always available for testing, fuzzing, and analysis like https://github.com/golang/go/issues/31456#issuecomment-483104913.
NeedsFix
low
Major
433,369,749
pytorch
GCP Base Image Wrong CUDA Version
## 🐛 Bug Working through the suggested PyTorch GCP base image, the wrong version of CUDA was installed. ## To Reproduce Steps to reproduce the behavior: 1. On "New Deep Learning VM deployment" select "Intel Optimized Base 9.2" 1. Deploy and SSH into the machine 1. ``nvidia-smi`` shows CUDA Version is at 10.0 ## Expected behavior The CUDA Version is correct after setting up a GCP machine.
triaged,module: doc infra
low
Critical
433,378,298
godot
Inspector audio preview is tied to the master bus state
<!-- Please search existing issues for potential duplicates before filing yours: https://github.com/godotengine/godot/issues?q=is%3Aissue --> **Godot version:** 3.1 & 9612303 **Issue description:** <s>When trying to preview a sound resource in the inspector, no sound will come out of it.</s> I closed this as I found out that the audio preview is tied to the master bus state, which was muted in my project. But thinking better about it, **why** is it tied to the master bus?
bug,topic:editor,confirmed
low
Minor
433,394,456
rust
Support Windows kernel mode for driver development
Several people have approached me about this, and I definitely think this is an area Rust should try to support. * [ ] Add targets for Windows kernel mode. * [ ] Update `cc` to be able to locate kernel mode libraries instead of user mode libraries for those targets. * [ ] Update `winapi` to link to kernel mode libraries instead of user mode libraries for those targets. * [ ] ? `libc` ? * [ ] ??? `std` ???
A-linkage,O-windows,T-libs-api,T-compiler,O-windows-msvc,C-feature-request
medium
Critical
433,422,231
pytorch
torch.distributed.broadcast should default to current stream
## 🐛 Bug This is the `torch.distributed` portion of #19219. Repeated calls to `torch.distributed.broadcast` (and other distributed ops) with the NCCL backend will eat up all available GPU memory. This leads to repeated CUDA synchronizations and bad performance. The `torch.distributed` ops should **default to the current stream** like all other PyTorch ops. DistributedDataParallel, which benefits from broadcasting in a background stream, should explicitly use a background stream (currently `ncclStream`) to keep good performance. ## To Reproduce Here is a small repro. It should use a small amount of memory, but uses all available GPU memory (watch `nvidia-smi`): ```python import torch import torch.distributed as dist def worker(rank): for itr in range(1000): x = torch.randn(int(25 * 1024 * 1024), device='cuda') # 100 MiB dist.broadcast(x, src=1, async_op=False) del x def main(rank, init_method, world_size): torch.cuda.set_device(rank) dist.init_process_group("nccl", init_method, rank=rank, world_size=world_size) worker(rank) if __name__ == '__main__': init_method = 'tcp://127.0.0.1:23123' world_size = 2 torch.multiprocessing.spawn(main, (init_method, world_size), nprocs=world_size) ``` ## Additional context - This wasn't an issue prior to #18465 because the distributed ops were missing calls to `record_stream`. (However, the ops behaved incorrectly and could overwrite memory that was in-use) - Between #18465 and #19222 this led to out-of-memory errors - After #19222 was landed, this generally does not lead to out-of-memory errors (due to synchronization, free, and retry on OOM) but still uses up all available memory @ailzhang @teng-li @pietern @mrshenli
oncall: distributed,triaged
low
Critical
433,468,414
TypeScript
jsDoc intellisense support for @typedef in another file
Issue Type: <b>Feature Request</b> Intellisense uses @typedef tags in other files but only if the file is opened in current window. Please allow any typedef tag to be used inside current working directory even if file containing typedef is not opened. Here is what i mean. I annotated a variable with type. This variable is exported directly with module.exports. ![issue-typedef](https://user-images.githubusercontent.com/12927303/56159231-cf748d80-5fcc-11e9-8f81-fd428f6188a0.jpg) My typedef is in seperate file. Configuration.js ``` /** * @typedef {Object} ConfigurationInputDirectories * @property {string} modules * @property {string} layoutModules * @property {string} standaloneScripts * @property {string} standaloneStyles * @property {string} libraryScripts * @property {string} libraryStyles * @property {string} markupTemplates */ /** * @typedef {Object} ConfigurationOutputDirectories * @property {string} pageScripts * @property {string} vendorScripts * @property {string} standaloneScripts * @property {string} pageStyles * @property {string} vendorStyles * @property {string} standaloneStyles * @property {string} markupFiles */ /** * @typedef {Object} ConfigurationVendor * @property {string} standardPath * @property {string} minPath */ /** * @typedef {Object} ConfigurationModule * @property {string} layoutModule * @property {string} markupTemplate * @property {string[]} includeStandaloneScripts * @property {string[]} includeStandaloneStyles * @property {string[]} includeVendorScripts * @property {string[]} includeVendorStyles * @property {string[]} excludeStandaloneScripts * @property {string[]} excludeStandaloneStyles * @property {string[]} excludeVendorScripts * @property {string[]} excludeVendorStyles */ /** * @typedef {Object} ConfigurationLayoutModule * @property {string} layoutModule * @property {string} markupTemplate * @property {string[]} includeStandaloneScripts * @property {string[]} includeStandaloneStyles * @property {string[]} includeVendorScripts * @property {string[]} includeVendorStyles * @property {string[]} excludeStandaloneScripts * @property {string[]} excludeStandaloneStyles * @property {string[]} excludeVendorScripts * @property {string[]} excludeVendorStyles */ /** * Represents configuration object for build process. * @typedef {Object} Configuration * @property {ConfigurationInputDirectories} inputDirectories * @property {ConfigurationOutputDirectories} outputDirectories * @property {Object.<string,ConfigurationVendor} vendorScripts * @property {Object.<string,ConfigurationVendor>} vendorStyles * @property {Object.<string,ConfigurationModule>} modules * @property {Object.<string,ConfigurationLayoutModule>} layoutModules * @property {string} defaultMarkupTemplate * @property {string} contentPlaceHolder * @property {string} nameDirectorySeperator * @property {string[]} validLibraryEntryFileNames * @property {string} moduleFileName * @property {string} rootModuleFileName * @property {string} systemjsPath * @property {string} systemjsNamedRegistersPath */ ``` When this file containing type definitions is open the intellisense/language service/or whatever you call it is recognizing this variable's type and intellisense displays the members when using this config variable. But when file is closed its type turns to any. It would be nice to see type informations from typedef tags even if files containing tags are closed. ![issue-typedef-2](https://user-images.githubusercontent.com/12927303/56159618-d51ea300-5fcd-11e9-9bd5-530c3c688851.jpg) VS Code version: Code 1.33.0 (0dd516dd412d42323fc3464531b1c715d51c4c1a, 2019-04-04T15:14:28.026Z) OS version: Windows_NT x64 10.0.17134 <!-- generated by issue reporter -->
Suggestion,Awaiting More Feedback
low
Major
433,472,906
flutter
ImageStream's onError listener catches all errors
When using `ImageStream.addListener(..., onError: ...)`, the `onError` callback will be invoked with anything that's thrown, including `Error` types. Once I add an `onError` callback, `assert` failures, for example, are no longer reported and instead get swallowed. There is no way for callers to specify what exception types the `onError` callback should receive (for example, compare to [`Future.catchError`](https://api.dartlang.org/stable/2.2.0/dart-async/Future/catchError.html) or to [`Stream.handleError`](https://docs.flutter.io/flutter/dart-async/Stream/handleError.html) which take an additional `test` callback to filter out exceptions). Alternatively, `ImageStream` could rethrow `Error` types instead of passing them to the `onError` callback. That would better follow [Effective Dart's guideline on not catching `Error` types](https://www.dartlang.org/guides/language/effective-dart/usage#dont-explicitly-catch-error-or-types-that-implement-it). (I think even better would be if `ImageErrorListener` returned a `bool` so that an `ImageStream` could iterate through all registered error callbacks and rethrow if nothing handled it. But that'd be a breaking change so probably would be a non-starter.) (Flutter (Channel unknown, v1.4.20-pre.10, on Linux, locale en_US.UTF-8))
framework,a: quality,c: proposal,a: error message,P3,team-framework,triaged-framework
low
Critical
433,489,774
flutter
Would like the ability to stop the gradle daemon from flutter tool
I regularly see gradle consuming nearly 700+ MB of RAM on my Linux system. I consider that to be a lot, especially when it's sitting there doing nothing. The path to my gradle binary is convoluted (e.g. `~/.gradle/wrapper/dists/gradle-4.4-all/9br9xq1tocpiv8o6njlyu5op1/gradle-4.4/bin/gradle`) and changes with gradle versions, so manually invoking `gradle --stop` is non-trivial. Additionally, the `flutter` tool tries to abstract away build processes for Android (and iOS) apps, so many users might not even know what gradle is or why it's running. Since `flutter run` started the gradle daemon, it'd be nice if the `flutter` tool also provided some mechanism to stop it. I mentioned this in chat a few months ago. @dnfield considered disabling the gradle daemon unless the user opts in. I suggested making `flutter stop` (possibly with a command-line option) stop the gradle daemon, but @Hixie didn't like that since it's not really what `stop` is meant for. He suggested adding a command-line option to `flutter clean` to do it. Some other ideas: * Automatically stop gradle if `flutter run` hasn't been used in some time. (But this would require some other daemon. Ideally gradle would provide the ability to do this itself.) * Automatically stop gradle when there's no longer a connected device. (But even if there is a way to be notified of this, this probably also would need some other process.)
c: new feature,tool,t: gradle,P2,team-tool,triaged-tool
low
Major
433,495,035
TypeScript
jsDoc intellisense support for @augments/@extends
Issue Type: <b>Feature Request</b> Please make intellisense support @augments/`@extends` tags. Currently intellisense is not showing base class properties both prototype and own. Here is my base class ``` const fs = require('fs'); /** * Used as an abstract base class for file classes. * @param {string} filePath Path of the file. */ function FileBase(filePath) { if (this.__proto__ === FileBase.prototype) throw `'FileBase' class cannot be instantiated. It's an abstract class.`; if (!fs.existsSync(filePath)) throw `'filePath' doesn't point an existing file.`; this.filePath = filePath; /** * Stores file content. Dont directly set this property. Use resetContent method instead. * @type {string} */ this.content = fs.readFileSync(filePath).toString(); /** * Stores fs.Stats of file. * @type {fs.Stats} */ this.stats = fs.lstatSync(filePath); /**@type {{content:string,stats:fs.Stats}[]} */ this.history = []; } /** * Resets content property with current file content. * @returns {string} File content. */ FileBase.prototype.resetContent = function () { ... } module.exports = FileBase; ``` Example usage of base class. I tagged with `@extends`. ``` /** * @typedef {'module'|'layout-module'|'library'|'standalone-main'|'standalone-dependency'} StyleFileType */ /** * Represents a style file. * @extends FileBase * @constructor * @param {string} filePath Path of file. * @param {StyleFileType} fileType Type of style. * @param {Config} config */ function StyleFile(filePath, fileType, config) { if (!(this instanceof StyleFile)) { return new StyleFile(filePath, fileType, config); } /** * If StyleFile constructor is used to create objects, redirect object creation to child classes. */ if (this.__proto__ === StyleFile.prototype) { switch (fileType) { case 'module': return new ModuleStyleFile(filePath, config); case 'layout-module': return new LayoutModuleStyleFile(filePath, config); case 'library': return new LibraryStyleFile(filePath, config); case 'standalone-dependency': return new StandaloneLibraryDependencyStyleFile(filePath, config); case 'standalone-main': return new StandaloneLibraryMainStyleFile(filePath, config); default: throw 'Invalid file type.'; } } FileBase.call(this, filePath); this.fileType = fileType; this.config = config; /**@type {StyleFile[]} */ this.parentFiles = null; /**@type {StyleFile[]} */ this.childFiles = null; } StyleFile.prototype = Object.create(FileBase.prototype); StyleFile.prototype.getImportedStylePaths = function (content) { ..... } module.exports = StyleFile; ``` Currently it only displays members from the used type. ![issue-augments-1](https://user-images.githubusercontent.com/12927303/56157072-4870e680-5fc7-11e9-979f-ef433d915d9d.jpg) VS Code version: Code 1.33.0 (0dd516dd412d42323fc3464531b1c715d51c4c1a, 2019-04-04T15:14:28.026Z) OS version: Windows_NT x64 10.0.17134 <!-- generated by issue reporter -->
Suggestion,Awaiting More Feedback,Domain: JSDoc,Domain: JavaScript,Add a Flag
medium
Major
433,579,881
TypeScript
Order destructuring Iterable<keyof T> changed from 3.2.4 -> 3.4.x
In 3.2.4, destructuring a value whose type is the intersection of `Pick<T, keyof T> & Iterable<T[keyof T]>` inferred types at assignment whose order followed the `keyof T` order. In 3.4.x and above it seems the `keyof T` order isn't respected at assignment, but is inferred correctly later. Screenshots attached below. <!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.4.3 and 3.5.0-dev.20190413 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** iterable iterator generic type parameter keyof order intellisense **Code** ```ts type Row<T extends { [key: string]: any }> = { [P in keyof T]: T[P] } & ( Iterable<T[keyof T]> ) type Schema = { 0: number; 1: string; } let row: Row<Schema> = [123, 'foo'] let a = row[0] // number let b = row[1] // string // c and d are each string | number let [c, d] = row let x = c // x is correctly inferred to be number let y = d // y is correctly inferred to be string ``` **Expected behavior:** `c` and `d` types are `number` and `string` at assignment, respectively. **Actual behavior:** `c` and `d` are each `string | number` at assignment. **Screenshots:** [email protected]: ![Screenshot from 2019-04-15 21-30-40](https://user-images.githubusercontent.com/178183/56182213-eebbec80-5fc5-11e9-9a5f-627bd26af6d3.png) [email protected]: ![Screenshot from 2019-04-15 21-31-02](https://user-images.githubusercontent.com/178183/56182227-fbd8db80-5fc5-11e9-8828-4ceedfe758f1.png) ![Screenshot from 2019-04-15 21-31-14](https://user-images.githubusercontent.com/178183/56182228-fed3cc00-5fc5-11e9-8988-9333c6fd69b9.png) **Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> Doesn't show the bug because there's no option to enable `--downlevelIteration`, but here's a link: https://www.typescriptlang.org/play/index.html#src=type%20Row%3CT%20extends%20%7B%20%5Bkey%3A%20string%5D%3A%20any%20%7D%3E%20%3D%0D%0A%20%20%20%20%7B%20%5BP%20in%20keyof%20T%5D%3A%20T%5BP%5D%20%7D%0D%0A%20%20%20%20%26%0D%0A%20%20%20%20(%20Iterable%3CT%5Bkeyof%20T%5D%3E%20)%0D%0A%0D%0Atype%20Schema%20%3D%20%7B%0D%0A%20%20%20%200%3A%20number%3B%0D%0A%20%20%20%201%3A%20string%3B%0D%0A%7D%0D%0A%0D%0Alet%20row%3A%20Row%3CSchema%3E%20%3D%20%5B123%2C%20'foo'%5D%0D%0A%0D%0Alet%20a%20%3D%20row%5B0%5D%20%2F%2F%20number%0D%0Alet%20b%20%3D%20row%5B1%5D%20%2F%2F%20string%0D%0A%0D%0A%2F%2F%20c%20and%20d%20are%20each%20string%20%7C%20number%0D%0Alet%20%5Bc%2C%20d%5D%20%3D%20row%0D%0A%0D%0Alet%20x%20%3D%20c%20%2F%2F%20x%20is%20correctly%20inferred%20to%20be%20number%0D%0Alet%20y%20%3D%20d%20%2F%2F%20y%20is%20correctly%20inferred%20to%20be%20string%0D%0A
Bug
low
Critical
433,595,980
TypeScript
Alias for TypeScript declaration emitting
## Search Terms * alias * declaration ## Suggestion A way to configuration alias for declaration files. ## Use Cases Related: #10866 I understand that TypeScript team want to leaves module resolving for other tools like Webpack. However, most of the tools are focus on emitting JavaScript. If you want to emit TypeScript declaration, you need to use `tsc`. This is important when you want to write library with TypeScript that you need to release declaration files. For example, in Webpack, `babel-loader` does not emit declarations, `ts-loader` and `awesome-typescript-loader` uses `tsc`. Alias is useful for you to write simpler import / export statement. ## Examples **index.ts** ```ts export * from "~/foo"; ``` **index.d.ts** ```ts export * from "../../foo"; ``` **tsconfig.json** ```json { "alias": { "~/*": ["src/*"] } } ``` ## Checklist My suggestion meets these guidelines: * [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code * [x] This wouldn't change the runtime behavior of existing JavaScript code * [x] This could be implemented without emitting different JS based on the types of the expressions * [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.) * [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Suggestion,Awaiting More Feedback
high
Critical
433,617,464
TypeScript
TypeScript not enforcing the return type of optional methods defined in interfaces implemented by parents of classes
<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section! Please help us by doing the following steps before logging an issue: * Search: https://github.com/Microsoft/TypeScript/search?type=Issues * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ Please fill in the *entire* template below. --> <!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.5.0 (Also tried 3.4.1, 3.0.1, and 2.4.1) <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** Inheritance, interface, return type, parent, child, override, overload, abstract, optional method, optional interface, implements, extends **Code** ```ts interface Mx { aMethod?(): number; } abstract class Base implements Mx { } class Child extends Base { public aMethod() { return 'hello world'; } } ``` **Expected behavior:** TypeScript tells me that the return type for `Child#aMethod` is wrong. This behaviour is achieved if I add `implements Mx` on the `Child` class. **Actual behavior:** TypeScript tells me nothing! It feels that `Child#aMethod` is well within its rights to return a string. **Playground Link:** [linky!](https://www.typescriptlang.org/play/#src=interface%20Mx%20%7B%0D%0A%20%20aMethod%3F()%3A%20number%3B%0D%0A%7D%0D%0A%0D%0Aabstract%20class%20Base%20implements%20Mx%20%7B%0D%0A%0D%0A%7D%0D%0A%0D%0Aclass%20Child%20extends%20Base%20%7B%0D%0A%20%20public%20aMethod()%20%7B%0D%0A%20%20%20%20return%20'hello%20world'%3B%0D%0A%20%20%7D%0D%0A%7D%0D%0A) **Related Issues:** I didn't really find any similar looking issues? The result is this could *maybe* relate to #22815
Bug
low
Critical
433,632,988
flutter
Android license status unknown.
<!-- Thank you for using Flutter! If you are looking for support, please check out our documentation or consider asking a question on Stack Overflow: * https://flutter.dev/ * https://docs.flutter.io/ * https://stackoverflow.com/questions/tagged/flutter?sort=frequent If you have found a bug or if our documentation doesn't have an answer to what you're looking for, then fill our the template below. Please read our guide to filing a bug first: https://flutter.dev/bug-reports/ --> ## Steps to Reproduce <!-- Please tell us exactly how to reproduce the problem you are running into. --> 1. `flutter doctor` *output* ``` Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel beta, v1.4.9-hotfix.1, on Mac OS X 10.14.4 18E226, locale zh-Hans-CN) [!] Android toolchain - develop for Android devices (Android SDK version 28.0.3) ✗ Android license status unknown. Try re-installing or updating your Android SDK Manager. See https://developer.android.com/studio/#downloads or visit https://flutter.io/setup/#android-setup for detailed instructions. [✓] iOS toolchain - develop for iOS devices (Xcode 10.2) [✓] Android Studio (version 3.3) [✓] VS Code (version 1.33.1) [!] Connected device ! No devices available ! Doctor found issues in 2 categories. ``` 2. `flutter doctor --android-licenses` *output* ``` A newer version of the Android SDK is required. To update, run: /Users/eric/Library/Android/sdk/tools/bin/sdkmanager --update ``` 3. `sdkmanager --update` *output* ``` [=======================================] 100% Computing updates... ``` 4. `flutter doctor --android-licenses` *output* ``` A newer version of the Android SDK is required. To update, run: /Users/eric/Library/Android/sdk/tools/bin/sdkmanager --update ``` ## Logs <!-- Include the full logs of the commands you are running between the lines with the backticks below. If you are running any "flutter" commands, please include the output of running them with "--verbose"; for example, the output of running "flutter --verbose create foo". --> <!-- If possible, paste the output of running `flutter doctor -v` here. --> *flutter doctor -v* ``` [✓] Flutter (Channel beta, v1.4.9-hotfix.1, on Mac OS X 10.14.4 18E226, locale zh-Hans-CN) • Flutter version 1.4.9-hotfix.1 at /Users/eric/dev/flutter • Framework revision 88fa7ea403 (4 days ago), 2019-04-11 14:01:46 -0700 • Engine revision 4737fc5cd8 • Dart version 2.2.1 (build 2.2.1-dev.4.0 None) [!] Android toolchain - develop for Android devices (Android SDK version 28.0.3) • Android SDK at /Users/eric/Library/Android/sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-28, build-tools 28.0.3 • ANDROID_HOME = /Users/eric/Library/Android/sdk • 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-1248-b01) ✗ Android license status unknown. Try re-installing or updating your Android SDK Manager. See https://developer.android.com/studio/#downloads or visit https://flutter.io/setup/#android-setup for detailed instructions. [✓] iOS toolchain - develop for iOS devices (Xcode 10.2) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 10.2, Build version 10E125 • ios-deploy 1.9.4 • CocoaPods version 1.6.1 [✓] Android Studio (version 3.3) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 34.0.1 • Dart plugin version 182.5215 • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01) [✓] VS Code (version 1.33.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 2.25.0 [!] Connected device ! No devices available ! Doctor found issues in 2 categories. ``` ![image](https://user-images.githubusercontent.com/23122353/56191489-03988e80-605f-11e9-8289-e8dad082e4cc.png)
platform-android,tool,d: api docs,t: flutter doctor,a: first hour,customer: crowd,P3,team-android,triaged-android
high
Critical
433,756,525
node
Crash in wrap_js_stream.js during doClose
* **Version**: v10.15.3 * **Platform**: Linux zagentXXXX 4.4.0-141-generic #167~14.04.1-Ubuntu SMP Mon Dec 10 13:20:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux * **Subsystem**: net I've debated whether this belongs in node/help, but due to potential of being a node bug I've decided to post here (apologize in advance if it turns out otherwise). We have a crash happening on our production servers a few times a day (especially during high load times): ``` TypeError: Cannot read property 'finishWrite' of null at JSStreamWrap.finishWrite (internal/wrap_js_stream.js:195:12) at Immediate.setImmediate (internal/wrap_js_stream.js:218:12) at runCallback (timers.js:705:18) at tryOnImmediate (timers.js:676:5) at processImmediate (timers.js:658:5) ``` I was unable to see any possible code path that could cause `this._handle` to be null before the call to `doClose` as it's only triggered by calling `this._handle.close()`. Async paths printing would have come very useful here, however, this is node 10.x. I've done grep on all our code as well as all node-modules for anything that could relate to 'games' with `"_handle = "` or `doClose`, nothing pop'ed up. I've put DEBUG_NODE=net,stream_wrap on one of the servers to avoid overall network degradation (waiting for crash to re-occur). Note: server is a large traffic networking proxy application involving http/s/2. I would like to give more info (specifically `setImmediate` async callstack), however, I'm unsure how to continue, would appreciate any advice.
stream
low
Critical
433,813,386
opencv
ncurses.h incompatibility
##### System information (version) - OpenCV => 3.4 - Operating System / Platform => openSUSE Tumbleweed - Compiler => gcc8-c++ ##### Detailed description Incompatibility with ncurses. I was using opencv2 on Debian, and today I moved to openSUSE Tumbleweed, which has opencv3, and my first make failed with this error (see attached file). ##### Steps to reproduce If ncurses.h is included before opencv headers, build breaks. Workaround: `#include <opencv2/opencv.hpp>` before `#include <ncurses.h>` [opencv-ncurses_incompatibility.txt](https://github.com/opencv/opencv/files/3085377/opencv-ncurses_incompatibility.txt)
category: build/install,future,category: 3rdparty
low
Critical
433,842,979
go
x/text/transform: errInconsistentByteCount should be returned by too big nSrc
<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? <pre> $ go version go version go1.12 linux/amd64 </pre> ### Does this issue reproduce with the latest release? Yes ### What operating system and processor architecture are you using (`go env`)? <details><summary><code>go env</code> Output</summary><br><pre> $ go env GOARCH="amd64" GOBIN="" GOCACHE="/home/yuki/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/yuki/.local/share/go" GOPROXY="" GORACE="" GOROOT="/usr/lib/go" GOTMPDIR="" GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/home/yuki/.local/src/golang.org/x/text/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build370827352=/tmp/go-build -gno-record-gcc-switches" </pre></details> ### What did you do? <!-- If possible, provide a recipe for reproducing the error. A complete runnable program is good. A link on play.golang.org is best. --> ```go package main import ( "bytes" "golang.org/x/text/transform" ) type T struct{ transform.NopResetter } func (*T) Transform(dst, src []byte, atEOF bool) (nDst, nSrc int, err error) { return 0, 4, transform.ErrShortDst } func main() { buf := make([]byte, 3) fmt.Println(transform.NewReader(bytes.NewReader([]byte("abc")), &T{}).Read(buf)) } ``` The point is that the `Transform()` returns invalid `nSrc`. ### What did you expect to see? The `Read()` should return `transform.errInconsistentByteCount` because the `Transform()` returns invalid `nSrc`(`nSrc > len(src)`). The code comment says > errInconsistentByteCount means that Transform returned success (nil error) but also returned nSrc inconsistent with the src argument. The error is suitable for this case. ### What did you see instead? It panics with `slice bounds out of range`. ``` panic: runtime error: slice bounds out of range goroutine 1 [running]: golang.org/x/text/transform.(*Reader).Read(0xc00003c700, 0xc00003c6dd, 0x3, 0x3, 0x0, 0xe0c843aa8a3c7960, 0xc00003c6f0) /home/yuki/.local/src/golang.org/x/text/transform/transform.go:166 +0x622 main.main() /home/yuki/.local/src/golang.org/x/text/transform/test/main.go:17 +0x20e exit status 2 ``` The stack trace points the internal of the library, not the implementation of Transformer. This behavior makes difficult to debug because the real problem is in the use of transform package, but the error doesn't suggest that.
NeedsInvestigation
low
Critical
433,844,335
vscode
[folding] selecting first line of folded range does not select full folded range
Issue Type: <b>Bug</b> 1. Create a variable with an array 2. Collapse the array 3. Mark the line with the array and copy it 5. Paste below **Actual result:** the only array name with open bracket is copied **Expected result:** whole array is copied **PFA** VS Code version: Code 1.33.1 (51b0b28134d51361cf996d2f0a1c698247aeabd8, 2019-04-11T08:20:22.771Z) OS version: Linux x64 4.15.0-47-generic <details> <summary>System Info</summary> |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i5-4670 CPU @ 3.40GHz (4 x 3708)| |GPU Status|2d_canvas: disabled_software<br>checker_imaging: disabled_off<br>flash_3d: disabled_software<br>flash_stage3d: disabled_software<br>flash_stage3d_baseline: disabled_software<br>gpu_compositing: disabled_software<br>multiple_raster_threads: disabled_off<br>native_gpu_memory_buffers: disabled_software<br>rasterization: disabled_software<br>surface_synchronization: disabled_off<br>video_decode: disabled_software<br>webgl: disabled_off<br>webgl2: disabled_off| |Load (avg)|0, 1, 1| |Memory (System)|31.35GB (12.71GB free)| |Process Argv|--unity-launch| |Screen Reader|no| |VM|0%| </details><details><summary>Extensions (40)</summary> Extension|Author (truncated)|Version ---|---|--- output-colorizer|IBM|0.1.2 pgformatter|bra|1.6.5 better-toml|bun|0.3.2 npm-intellisense|chr|1.3.0 path-intellisense|chr|1.4.2 bracket-pair-colorizer|Coe|1.0.61 systemd-unit-file|coo|1.0.3 vscode-markdownlint|Dav|0.26.0 vscode-eslint|dba|1.8.2 pgsql|dou|0.1.3 gitlens|eam|9.6.0 tslint|eg2|1.0.43 vscode-npm-script|eg2|0.3.5 LogFileHighlighter|emi|2.4.3 vsc-material-theme|Equ|2.8.2 vscode-postman|eri|0.5.2 gauge|get|0.0.3 gc-excelviewer|Gra|2.1.32 vscode-nginx-conf-hint|han|0.1.0 beautify|Hoo|1.4.11 js-test-gen-vscode|jsT|0.5.0 ldif|jta|0.1.1 vscode-regexp-preivew|le0|0.0.3 terraform|mau|1.3.9 git-graph|mhu|1.4.5 Go|ms-|0.9.2 sqltools|mtx|0.17.15 makefiles-support-for-vscode|nae|0.0.3 vscode-json-transform|oct|0.1.2 vscode-docker|Pet|0.6.1 vscode-versionlens|pfl|0.22.0 vscode-yaml|red|0.4.0 vscode-sort-json|ric|1.13.0 vscode-statusbar-json-path|ric|1.2.0 monitor-file|rko|1.0.1 sql-snippets|sad|0.0.4 vscode-sql-beautify|sen|0.0.4 slim|sia|0.1.2 language-stylus|sys|1.11.0 vscode-ansible|vsc|0.5.2 (3 theme extensions excluded) </details> <!-- generated by issue reporter --> [collapsed_array_issue-2019-04-16_18.06.33.mp4.zip](https://github.com/Microsoft/vscode/files/3085612/collapsed_array_issue-2019-04-16_18.06.33.mp4.zip)
feature-request,editor-folding
low
Critical
433,856,417
flutter
Camera plugin do not save images from rear camera
I'm building the app which takes photos and using the Camera plugin. The images from front camera are saved and displayed. The images from the rear camera are saved, but not displayed. To reproduce it you may use the example app connected with the plugin: https://github.com/flutter/plugins/tree/master/packages/camera/example - when I choose front camera and take a picture it shows the url of the image and shows the thumbnail - when I choose rear camera and take a picture it shows the url of the image, but do not shows the thumbnail No error message or exception is displayed. I'm doing it on Samsung Galaxy J5 with Android 7.1.1.
p: camera,a: images,package,team-ecosystem,P2,triaged-ecosystem
low
Critical
433,874,640
flutter
Feature Request: Add minLines to Text (Not TextField)
I've seen many requests from other user to add minLines into **TextField**. But please also add it for **Text**. Thanks
c: new feature,framework,P3,team-framework,triaged-framework
high
Critical
433,895,053
TypeScript
JSDoc multi-line properties within Array<Object> syntax parse differently than Object[]
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.5.0-dev.20190416 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** JSDoc @type @param @arg multi-line type literal Array<> **Code** ```ts /** * @param {Array<Object>} os - has a string and a number * @param {string} os[].s - the string * @param {number} os[].n - the number */ function f(os) { return os[0].s; } ``` **Expected behavior:** It appears that #17352 implemented this correctly for when the first `@param` is `@param {Object[]}` but failed to consider the other syntax to write this in JSDoc: `@param {Array<Object>}`. For ease of debugging I am looking at the output of Intellisense when hovering over `os` in the function. I'd expect the output to look as iti does when `@param {Object[]}` is used: ![image](https://user-images.githubusercontent.com/6043371/56229963-29b33400-6049-11e9-9d83-6e42c34491a9.png) **Actual behavior:** ![image](https://user-images.githubusercontent.com/6043371/56229980-346dc900-6049-11e9-86f8-b1b4f3a576bc.png) **Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> [Playground Link](https://www.typescriptlang.org/play/#src=%2F**%0D%0A%20*%20%40param%20%7BArray%3CObject%3E%7D%20os%20-%20has%20a%20string%20and%20a%20number%0D%0A%20*%20%40param%20%7Bstring%7D%20os%5B%5D.s%20-%20the%20string%0D%0A%20*%20%40param%20%7Bnumber%7D%20os%5B%5D.n%20-%20the%20number%0D%0A%20*%2F%0D%0Afunction%20f(os)%20%7B%20return%20os%5B0%5D.s%3B%20%7D) **Related Issues:** <!-- Did you find other bugs that looked similar? --> #11597
Bug
low
Critical
433,906,878
go
cmd/compile: additional internal debugging support for escape.go
esc.go and escape.go both support -m=1 for emitting diagnostics about escape analysis results, but esc.go additionally supported -m=2 and above for emitting diagnostics about internal code execution and decision making. escape.go should provide similar functionality for compiler maintainer use.
NeedsInvestigation,compiler/runtime
medium
Critical
433,907,721
go
net: KeepAlive is disabled by write to dead link
_Was: net.Dialer.Dial() doesn't respect .KeepAlive_ <!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? <pre> $ go version go version go1.12 linux/amd64 </pre> ### Does this issue reproduce with the latest release? Haven't tried 1.12.1+ ### What operating system and processor architecture are you using (`go env`)? <details><summary><code>go env</code> Output</summary><br><pre> $ go env GOARCH="amd64" GOBIN="" GOCACHE="/root/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/root/go" GOPROXY="" GORACE="" GOROOT="/usr/lib/go" GOTMPDIR="" GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build601953146=/tmp/go-build -gno-record-gcc-switches" </pre></details> ### What did you do/see? For a TLS connection that's been dropped, c.Read() returns a net.Error with `e.Timeout()==true` after ~18 minutes, apparently due to KeepAlive failure. The connection is closed by the server while the client (laptop running VMWare with Linux) is suspended. Error string: "read tcp n.n.n.n:p->n.n.n.n:p: read: connection timed out" The note on https://github.com/golang/go/commit/5bd7e9c5 (discussed in #23459) says the default for net.Dialer keepalive failure is just 2-3min. With an explicit KeepAlive, I also see odd waits: `net.Dialer{KeepAlive: 30 * time.Second}` 18min `net.Dialer{KeepAlive: 25 * time.Second}` 18min `net.Dialer{KeepAlive: 10 * time.Second}` 16min `net.Dialer{KeepAlive: 5 * time.Second}` <1min, but at least once 18min Measurements aren't precise; 16-18 minutes could be 1000 or 1024 seconds. Code has: ``` aDlr := net.Dialer{Timeout: 3*time.Second} // default KeepAlive aCfgTls := tls.Config{InsecureSkipVerify: true} aConn, err := tls.DialWithDialer(&aDlr, "tcp", "host:port", &aCfgTls) if err != nil { return err } err = aConn.Write(...) // <256 bytes // brief exchange of short messages aLen, err := aConn.Read(...) ``` Also filed #31449 to report that the error due to keepalive doesn't comply with the docs re connection timeout. cc @FiloSottile @bradfitz
Documentation,NeedsInvestigation
medium
Critical
433,908,352
godot
Children list of inherited scene doesn't update after add/delete nodes in parent scene
**Godot version:** 3.1 stable **OS/device including version:** Windows 7 x64 **Prerequisites:** 1. Create scene 1 - "Level", 2. Create scene 2 - "Parent", 3. Create scene 3 - "Something" as "New inherited scene" of "Parent" **Steps to reproduce:** 1. In "Level" scene make instance of "Something", 2. Set "Editable children" is ON, 3. Add one or more child nodes in "Parent" scene and save this scene, 4. Go back to "Level" scene tab **Result:** Created nodes in step 3 are not shown. They will appear only if you close and re-open "Level". Meanwhile, if you change tab to "something" you will see new nodes imediately. **Note:** same result if you delete node in step 3 **Expected:** Nodes list updated imediately, don't need to re-open tab to see changes. **GIF:** ![bug16042019](https://user-images.githubusercontent.com/1552169/56231884-2d19e000-6088-11e9-8646-c7ea45ee86ce.gif) **Minimal reproduction project:** This project contains only prerequesites. You should open all three scenes and repeat 3-4 steps. [test16042019.zip](https://github.com/godotengine/godot/files/3086184/test16042019.zip)
bug,topic:editor,confirmed
low
Critical
433,910,335
create-react-app
CRA sourcemaps do not conform to the specification
### Is this a bug report? Yes ### Did you try recovering your dependencies? No ### Which terms did you search for in User Guide? sourcemap ### Environment Observed in several different environments ### Steps to Reproduce 1. Create an app with `create-react-app` 2. start the dev-server 3. look at the `sources` array in the sourcemaps served by the dev-server ### Expected Behavior The `sources` array should contain URLs according to [the spec](https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.75yo6yoyk7x5) ### Actual Behavior The `sources` array contains absolute file paths I noticed this problem when I tried to figure out why my [debug adapter for VS Code](https://marketplace.visualstudio.com/items?itemName=hbenl.vscode-firefox-debug) didn't work out-of-the-box with CRA projects. The reason was that my debug adapter treats the entries in the `sources` array in the sourcemap exactly like the spec says it should: it checks if an entry is an absolute URL (which it isn't) and then resolves it relative to the sourcemap. It then ends up with something like `http://localhost:3000/c:/Users/user/...` on Windows or `http://localhost:3000/home/user/...` on Linux, and these URLs don't make sense. The workaround is to treat entries that _look like_ an absolute path as paths instead of URLs. The problem with this workaround is that it will break sourcemaps that contain root-relative URLs (i.e. relative URLs that start with `/`) because on Mac and Linux these look like absolute paths. The fix for this would be simple: add `file://` (or `file:///` on Windows) to the paths and they becoma URLs. Alternatively, you could simply set `sourceRoot` to `file://` because that is supposed to be prepended to the `sources`.
issue: needs investigation
low
Critical
433,956,232
flutter
Support flutter run -d all when using different compilers
Currently the flutter tool assumes that it can share a single resident runner across an arbitrary number of FlutterDevice types. With the introduction of the web and fuchsia, this will no longer be the case, as each will require a slightly different resident runner implementation. We need to make the following tooling changes to support these features: - Each device should know how to build the dart code for its platform. This might be implemented via an enum or flag, for example. - A new manager interface will decide, given a set of devices, which ones can share a resident_runner and handle instantiating that runner. - This will also have to handle sending the command line/daemon signals to each device. - Remove FlutterDevice type, which only adds an indirection once this change is made.
tool,platform-fuchsia,platform-web,P3,team-web,triaged-web
low
Minor
433,963,246
kubernetes
Next steps after Events API v1beta1: migrate all components; event style guide; pipeline for persistent event storage
**Overview**: After [kubernetes/enhancements#383](https://github.com/kubernetes/enhancements/issues/383) is implemented ([#65782](https://github.com/kubernetes/kubernetes/pull/65782)), new v1beta1 events API will be ready to use. ([Latest approved design doc](https://github.com/kubernetes/community/blob/master/contributors/design-proposals/instrumentation/events-redesign.md)) However, to achieve the end goal - "make events **useful** and **safe**", we still have couple steps to take. This is the umbrella tracking issue to cover all next steps we have in our mind now. **Proposed next steps**: 1. Migrate all k8s components to use new events API. Any k8s components emitting events now need to be migrated to use new event API. Since old event package lives in "k8s.io/client-go/tools/record". A quick code search finds ~235 places depending on this package. It includes controller-manager, kube-scheduler, kubelet, etc. 2. Propose a "K8s events style guide", get community adoption and enforce an API-like review process for future major event updates. The approved design mentioned "all new Events will need to go through API-like review (process will be described in the style guide)", but didn't have concrete proposal. We need to finish this event style guide and establish a review process for event change. Without this, events are informational and can't be used reliably in prod. Needless to say, they won't be able to be digested and used by downstream monitoring & logging products. 3. Build events publisher / subscriber infrastructure for downstream consumption. With this mechanism, people (OSS / cloud vendors) can build persistent event storage, use events as signals for troubleshooting products, etc. **Contributors** Above proposals are based on several offline discussions among @yastij, @shoucongc, and @wojtek-t
sig/scalability,kind/feature,sig/instrumentation,lifecycle/frozen
medium
Critical
433,980,392
godot
Change missing scene to self cause editor silently crash
**Godot version:** 3.2 5823b5d 3.2.3 rc 2 **OS/device including version:** Linux Mint 19 **Issue description:** When I set one of missing scene to root scene, then editor crash after a while. Shouldn't be possible to attach scene to itself. Probably crash will happen if someone change scene directly in .tscn file(via text editor) because Godot doesn't seems to validate if children of scene is not root. ![Zrzut ekranu z 2019-04-16 22-35-21](https://user-images.githubusercontent.com/41945903/56243285-84c14700-609a-11e9-8cbe-9e0374a5a8d8.png) ![Zrzut ekranu z 2019-04-16 22-43-55](https://user-images.githubusercontent.com/41945903/56243289-868b0a80-609a-11e9-8af0-62da78685560.png) **Steps to reproduce** 1. Create and save Spatial.tscn scene 2. Create and save Node2D.tscn scene 3. Add saved previously Node2D as child of Spatial 4. Close all scenes 5. Delete Node2D scene 6. Open Spatial.tscn scene 7. Click Fix Dependiences and set to missing scene Spatial.tscn 8. Click Open anyway 9. Crash ![jfile](https://user-images.githubusercontent.com/41945903/89703290-6e9f6000-d949-11ea-8ecc-61f6aab43702.gif) **Minimal project** [missing.zip](https://github.com/godotengine/godot/files/5044713/missing.zip)
bug,topic:editor,confirmed
low
Critical
433,990,090
go
cmd/compile: run escape analysis on SSA form
Placeholder issue for discussion about running escape analysis on SSA form instead of the Node AST. I don't expect us to get to this for quite a while, but I think it's useful to have a single issue for cross-referencing related issues.
NeedsInvestigation,compiler/runtime
low
Major
434,007,934
go
test: fixedbugs/issue30908.go failing on Plan 9
CL [168957](https://golang.org/cl/168957) added `fixedbugs/issue30908.go`. This test is failing on Plan 9. ``` cpu% go run run.go -- fixedbugs/issue30908.go # go run run.go -- fixedbugs/issue30908.go exit status: 'go 527129: 1' cmd/link: while reading object for 'a': duplicate symbol 'go.info.go.builtin.error.Error', previous def at 'runtime', with mismatched payload: new length 52 != old length 40 cmd/link: while reading object for 'bytes': duplicate symbol 'go.isstmt.go.builtin.error.Error', previous def at 'a', with mismatched payload: new length 0 != old length 15 cmd/link: while reading object for 'path/filepath': duplicate symbol 'go.isstmt.go.builtin.error.Error', previous def at 'a', with mismatched payload: new length 0 != old length 15 cmd/link: while reading object for 'strconv': duplicate symbol 'go.isstmt.go.builtin.error.Error', previous def at 'a', with mismatched payload: new length 0 != old length 15 cmd/link: while reading object for 'strings': duplicate symbol 'go.isstmt.go.builtin.error.Error', previous def at 'a', with mismatched payload: new length 0 != old length 15 FAIL fixedbugs/issue30908.go 1.099s exit status: 'run 527104: 1' ```
help wanted,OS-Plan9,NeedsInvestigation
low
Critical
434,019,036
TypeScript
error TS5071: Option '--resolveJsonModule' can only be specified when module code generation is 'commonjs', 'amd', 'es2015' or 'esNext'
<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section! Please help us by doing the following steps before logging an issue: * Search: https://github.com/Microsoft/TypeScript/search?type=Issues * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ Please fill in the *entire* template below. --> <!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.4.3 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** TS5071 **Expected behavior:** Should compile for module: 'system'. I use a json-loader plugin within systemJS to load these json files. Earlier we used the `.d.ts` for json but with the latest upgrade it fails with the above error. **Related Issues:** <!-- Did you find other bugs that looked similar? --> https://github.com/Microsoft/TypeScript/issues/26224
Suggestion,Awaiting More Feedback
low
Critical
434,027,215
TypeScript
Declaring index signature based on property type gives invalid error
**TypeScript Version:** latest, demonstrable on playground (links below) **Search Terms:** index signature diagnostics property type **Code**: ```ts interface BaseNode { kind: string; [key: string]: string | TokenNode["data"]; } interface TokenNode extends BaseNode { kind: 'token'; data: TokenData; } interface TokenData { offset: number; width: number; leading_width: number; trailing_width: number; } ``` **Expected behavior:** No errors, as the code is correct. **Actual behavior:** An error on interface `TokenNode`: ``` Interface 'TokenNode' incorrectly extends interface 'BaseNode'. Index signature is missing in type 'TokenNode'. ``` **HOWEVER** if I change `TokenNode["data"]` to its value `TokenData`, the error goes away. **Playground Link:** [Code above displaying the error](https://www.typescriptlang.org/play/#src=%0D%0Ainterface%20BaseNode%20%7B%0D%0A%20%20kind%3A%20string%3B%0D%0A%20%20%5Bkey%3A%20string%5D%3A%20string%20%7C%20TokenNode%5B%22data%22%5D%3B%0D%0A%7D%0D%0A%0D%0Ainterface%20TokenNode%20extends%20BaseNode%20%7B%0D%0A%20%20kind%3A%20'token'%3B%0D%0A%20%20data%3A%20TokenData%3B%0D%0A%7D%0D%0A%0D%0Ainterface%20TokenData%20%7B%0D%0A%20%20offset%3A%20number%3B%0D%0A%20%20width%3A%20number%3B%0D%0A%20%20leading_width%3A%20number%3B%0D%0A%20%20trailing_width%3A%20number%3B%0D%0A%7D%0D%0A) [Code above with the fix, no errors](https://www.typescriptlang.org/play/#src=%0D%0Ainterface%20BaseNode%20%7B%0D%0A%20%20kind%3A%20string%3B%0D%0A%20%20%5Bkey%3A%20string%5D%3A%20string%20%7C%20TokenData%3B%0D%0A%7D%0D%0A%0D%0Ainterface%20TokenNode%20extends%20BaseNode%20%7B%0D%0A%20%20kind%3A%20'token'%3B%0D%0A%20%20data%3A%20TokenData%3B%0D%0A%7D%0D%0A%0D%0Ainterface%20TokenData%20%7B%0D%0A%20%20offset%3A%20number%3B%0D%0A%20%20width%3A%20number%3B%0D%0A%20%20leading_width%3A%20number%3B%0D%0A%20%20trailing_width%3A%20number%3B%0D%0A%7D%0D%0A)
Bug
low
Critical
434,039,832
TypeScript
Make `DOMStringList` generic
<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Please read the FAQ first, especially the "Common Feature Requests" section. --> ## Search Terms DOMStringList, DOMStringMap, DOMString <!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily --> ## Suggestion I'd be nice if `DOMStringList` had an optional generic so that a more restricted string type could be used for the list item type. The generic could default to `string` so that existing code using the type does not break. The implementation would be along the lines of: ```ts interface DOMStringList<T extends string = string> { readonly length: number; contains(string: T): boolean; item(index: number): T | null; [index: number]: T; } ``` <!-- A summary of what you'd like to see added or changed --> ## Use Cases Libraries that wrap native DOM methods may return the `DOMStringList`s but want more strict types. ## Examples ```ts const dbOpenRequest = indexedDB.open("store", 1); dbOpenRequest.onupgradeneeded = () => { const db = dbOpenRequest.result; db.createObjectStore('fruits'); db.createObjectStore('meats'); } dbOpenRequest.onsuccess = () => { const db = dbOpenRequest.result; const storeNames = db.objectStoreNames as DOMStringList<'fruits' | 'meats'>; }; ``` <!-- Show how this would be used and what the behavior would be --> ## Checklist My suggestion meets these guidelines: * [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code * [x] This wouldn't change the runtime behavior of existing JavaScript code * [x] This could be implemented without emitting different JS based on the types of the expressions * [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.) * [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
Suggestion,Awaiting More Feedback
low
Critical
434,051,757
go
x/tools/go/ssa: SrcFuncs is missing top-level anonymous functions
buildssa walks the AST, collecting all *ast.FuncDecl and all anonymous functions declared inside of those. This misses top-level anonymous functions a la ``` package pkg var Fn = func() {} ``` Such a function is owned by the init function, which has no syntactic representation in the AST. /cc @ianthehat
NeedsFix,Tools
low
Minor
434,053,529
pytorch
Multiprocessing on distributed Multi-nodes shutdown error: ‘spawn’ on slave node leads to semaphore_tracker leaked
Hi Masters, I am trying the following code on 2 nodes with diff num of CPU/GPU devices, running one parameter server (ps) process and diff num of worker processes on each node.(e.g. global_ranks:[ [0(ps), 2(worker), 3(worker)], [1(ps), 4(worker)] ]) For CUDA init reasons, I turned mp.set_start_method('spawn', force=True) on slave node and leads to the following crash:(NOT warning) /home/simon/anaconda3/lib/python3.6/multiprocessing/semaphore_tracker.py:146: UserWarning: semaphore_tracker: There appear to be 1 leaked semaphores to clean up at shutdown len(cache)) Could somebody help? Thanks in advance. ## Results ``` $Slave Node <Process(Process-1, started)> is started... <Process(Process-2, started)> is started... 0 test_run_worker() on global_rank: 4 ,global_c: 1 ,counter_list: [tensor([1.]), tensor([0.]), tensor([1.])] 0 test_run_ps() on global_rank: 1 , global_c= 0 ,counter_list: [tensor([1.]), tensor([0.]), tensor([1.])] 1 test_run_worker() on global_rank: 4 ,global_c: 4 ,counter_list: [tensor([2.]), tensor([1.]), tensor([2.])] 2 test_run_worker() on global_rank: 4 ,global_c: 6 ,counter_list: [tensor([2.]), tensor([1.]), tensor([3.])] 1 test_run_ps() on global_rank: 1 , global_c= 3 ,counter_list: [tensor([2.]), tensor([1.]), tensor([2.])] 3 test_run_worker() on global_rank: 4 ,global_c: 9 ,counter_list: [tensor([3.]), tensor([2.]), tensor([4.])] 4 test_run_worker() on global_rank: 4 ,global_c: 10 ,counter_list: [tensor([3.]), tensor([2.]), tensor([5.])] 2 test_run_ps() on global_rank: 1 , global_c= 6 ,counter_list: [tensor([3.]), tensor([2.]), tensor([3.])] 3 test_run_ps() on global_rank: 1 , global_c= 9 ,counter_list: [tensor([4.]), tensor([3.]), tensor([4.])] 4 test_run_ps() on global_rank: 1 , global_c= 12 ,counter_list: [tensor([5.]), tensor([4.]), tensor([5.])] /home/simon/anaconda3/lib/python3.6/multiprocessing/semaphore_tracker.py:146: UserWarning: semaphore_tracker: There appear to be 1 leaked semaphores to clean up at shutdown len(cache)) /home/simon/anaconda3/lib/python3.6/multiprocessing/semaphore_tracker.py:146: UserWarning: semaphore_tracker: There appear to be 1 leaked semaphores to clean up at shutdown len(cache)) ``` ## Debug Info ``` [INFO/Process-2] process shutting down [DEBUG/Process-2] running all "atexit" finalizers with priority >= 0 [DEBUG/Process-2] running the remaining "atexit" finalizers [INFO/Process-2] process exiting with exitcode 0 /home/simon/anaconda3/lib/python3.6/multiprocessing/semaphore_tracker.py:146: UserWarning: semaphore_tracker: There appear to be 1 leaked semaphores to clean up at shutdown len(cache)) [INFO/Process-1] process shutting down [DEBUG/Process-1] running all "atexit" finalizers with priority >= 0 [DEBUG/Process-1] running the remaining "atexit" finalizers [INFO/Process-1] process exiting with exitcode 0 /home/simon/anaconda3/lib/python3.6/multiprocessing/semaphore_tracker.py:146: UserWarning: semaphore_tracker: There appear to be 1 leaked semaphores to clean up at shutdown len(cache)) [INFO/MainProcess] process shutting down [DEBUG/MainProcess] running all "atexit" finalizers with priority >= 0 [DEBUG/MainProcess] running the remaining "atexit" finalizers [Level 5/MainProcess] calling <Finalize object, dead> [Level 5/MainProcess] finalizer calling <function rmtree at 0x7fab0b4bfea0> with args ['/tmp/pymp-hfadelk_'] and kwargs {} ``` ## Some Code ``` #Master Node: #GLOO_SOCKET_IFNAME=enp0s31f6 python -m torch.distributed.launch torch_dist_test2.py --local_rank=0 #Slave Node: #GLOO_SOCKET_IFNAME=enp7s0 python -m torch.distributed.launch torch_dist_test2.py --local_rank=1 def init_dist_multi_process(world_size, global_rank, backend='gloo'):#'nccl' dist.init_process_group(backend=backend, init_method='tcp://192.168.1.12:23457', world_size=world_size, rank=global_rank) def dist_broadcast(src, dic=None, tensor=None, async_op=True, p_device=torch.device('cpu')): if not dic == None: for key, value in dic.items(): dist.broadcast(tensor=torch.Tensor(value).to(p_device), src=src, async_op=async_op) else: dist.broadcast(tensor=tensor.to(p_device), src=src, async_op=async_op) def test_run_ps(shared_coms): init_dist_multi_process(world_size=shared_coms.world_size, global_rank=shared_coms.server_rank, backend='gloo') counter_list = [torch.Tensor([0]) for _ in shared_coms.global_worker_rank_flatten_list] for _ in range(5): time.sleep(0.5) for r, gr in enumerate(shared_coms.global_worker_rank_flatten_list):## dist_broadcast(src=gr,tensor=counter_list[r]) global_c = sum([int(x) for x in counter_list]) print(_,'test_run_ps() on global_rank:',shared_coms.server_rank,', global_c=',global_c,',counter_list:',counter_list) print('test_run_ps() time up') time.sleep(5) def test_run_worker(shared_coms, device_r): init_dist_multi_process(world_size=shared_coms.world_size, global_rank=shared_coms.worker_rank_list[device_r], backend='gloo') c = 0 counter_list = [torch.Tensor([0]) for _ in shared_coms.global_worker_rank_flatten_list] for _ in range(5): time.sleep(0.25*(1+device_r)) c+=1 i=0 for r, gr in enumerate(shared_coms.global_worker_rank_flatten_list):## if gr == shared_coms.global_worker_rank_list[shared_coms.server_rank][device_r]: counter_list[r] = torch.Tensor([c]) dist_broadcast(src=gr,tensor=counter_list[r]) global_c = sum([int(x) for x in counter_list]) print(_,'test_run_worker() on global_rank:',shared_coms.worker_rank_list[device_r],',global_c:',global_c,',counter_list:',counter_list) print('test_run_worker() time up') time.sleep(5) if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("--local_rank", type=int, default=0) parser.add_argument("--global_rank_list", type=list, default=[[0,2,3],[1,4]]) parser.add_argument("--n_worker", type=int, default=16) args = parser.parse_args() server_rank = args.local_rank global_rank_list = args.global_rank_list world_size = sum([1 for y in global_rank_list for x in y]) n_proc = len(global_rank_list[server_rank])-1 global_n_proc = world_size - len(global_rank_list) n_server = len(global_rank_list) worker_rank_list = global_rank_list[server_rank][1:] global_worker_rank_list = [global_rank_list[x][1:] for x in range(len(global_rank_list))] global_worker_rank_flatten_list = [] for x in global_worker_rank_list: global_worker_rank_flatten_list+=x n_workers_per_slave = args.n_worker game = 'BreakoutNoFrameskip-v4' process_list = [] shared_coms = SharedComponents(game, server_rank, global_rank_list, p_device=torch.device('cuda')) mp.set_start_method('spawn', force=True) p = mp.Process(target=test_run_ps, args=(shared_coms, ))#, args=(None)) process_list.append(p) for device_r in range(n_proc):## p = mp.Process(target=test_run_worker, args=(shared_coms, device_r)) process_list.append(p) for p in process_list: p.start() print(p,' is started...') for p in process_list: p.join() ```
oncall: distributed,triaged
low
Critical
434,064,382
pytorch
CUDA optimization: using `__restrict__` whenever possible
## 🚀 Feature <!-- A clear and concise description of the feature proposal --> ## Motivation to increase throughput ## Pitch for every feasible CUDA kernel, take input as `THCDeviceTensor<T, DIM, IndexT, RestrictPtrTraits>` instead of `DefaultPtrTraits` in order to add `__restrict__` keyword to the device tensors. This alone seems to increase throughput about 3~5%. The increase of throughput is tested with upsampling bilinear code. ## Alternatives <!-- A clear and concise description of any alternative solutions or features you've considered, if any. --> ## Additional context <!-- Add any other context or screenshots about the feature request here. -->
module: cuda,triaged
low
Major
434,085,801
godot
Sync Script Changes Does Not Resume After Error in Code is Fixed
<!-- Please search existing issues for potential duplicates before filing yours: https://github.com/godotengine/godot/issues?q=is%3Aissue --> **Godot version:** 3.1 **OS/device including version:** Mac OS Sierra 10.12.6 **Issue description:** <!-- What happened, and what was expected. --> When sync script changes is turned on from the debug menu, it works as expected. However, if their is a bug in the code, execution is paused. This is what should happen, but afterwards execution should be resumed. Instead the user has to manually resume execution after fixing the bug. I realized this while watching GDQuest's [video](https://youtu.be/oNNaMQtqHMU?t=286). I have linked to the part in the video where he explains this issue basically explaining everything I have already written. I tried to fix this issue myself, as I feel it shouldn't be too hard to implement, but I've never contributed to a project this big, and I simply can not figure out where the code is that is doing this. If anybody might be able to point me in the right direction I might be able to try and fix this issue. Otherwise, here's a minor issue that may be worth taking a look at. **Steps to reproduce:** Create a test scene and attach a script to the root node. Write a small program in the script such as: ``` func _process(delta): print("test") ``` Make sure that sync script changes is checked in the debug drop down menu in the top left corner of the editor, and then run the scene. Go back into the editor and create a bug in the code such as: ``` func _process(delta): print("test ``` This will pause execution as expected. Now fix the error in the code. Execution will not be resumed after fixing the error. **Minimal reproduction project:** <!-- Recommended as it greatly speeds up debugging. Drag and drop a zip archive to upload it. --> [Sync Script Changes Issue.zip](https://github.com/godotengine/godot/files/3087922/Sync.Script.Changes.Issue.zip)
enhancement,topic:editor,usability
low
Critical
434,175,304
neovim
floating :pedit (Vim's `:help preview-popup`)
First of all, sorry if this has been suggested before, I haven't found anything about it, but there's a lot of issues on here regarding floating windows, and it's a tricky subject to search... I recently wrote a short [blog article](https://www.zingiber.nl/blog/hacking-neovims-new-floating-windows/) about a simple, generic workflow tweak that leverages floating window support. In short, I really liked the idea of using floating windows on top of (both literally and figuratively) regular split windows. It would basically allow me to toggle an additional floating window that i could use for whatever buffer (scratch, terminal, any file) I wanted at the time. This allows for a lot of flexibility in my workflow. The article shows a very simple (and quite hacky) plugin, that implemented this the way i pictured it. I linked this article on the subreddit, and I was asked to open an issue regarding my suggested workflow. For completeness sake, this is how I described it in the article: - one simple keyboard mapping that shows a floating window over all the other split windows - by default, it will simply show the buffer that was active when using the keyboard mapping - opening other files, loading other buffers etc. should work the same as always (vim-vinegar is excellent for this) - this floating window can be closed normally, or by hitting the mapping again - closing the window won't actually delete the buffer, and when hitting the mapping again, will pull up the buffer you last looked at
enhancement,has:vim-patch,core,floatwin
low
Minor
434,183,521
flutter
PageView should preload pages
Page view should preload at least its next page otherwise user can experience delay when changing pages. In the following example I'm using larger images ~5mb. I'm aware that there are already topics that image load is slow, but I can imagine there are other examples to demonstrate this problem with page view as well. Did try release, still an issue. Tested on iOS device + simulator. ## Steps to Reproduce ``` import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', theme: ThemeData( primarySwatch: Colors.blue, ), home: MyHomePage(title: 'Flutter Demo Home Page'), ); } } class MyHomePage extends StatefulWidget { MyHomePage({Key key, this.title}) : super(key: key); final String title; @override _MyHomePageState createState() => _MyHomePageState(); } class _MyHomePageState extends State<MyHomePage> { @override void initState() { super.initState(); } @override Widget build(BuildContext context) { return PageView.builder( itemBuilder: (context, index) { return Image.asset( 'lib/photo$index.png', fit: BoxFit.cover, ); }, itemCount: 4, ); } } ``` ## Logs ``` Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel beta, v1.4.9-hotfix.1, on Mac OS X 10.14.3 18D109, locale en-US) [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3) [✓] iOS toolchain - develop for iOS devices (Xcode 10.2) [✓] Android Studio (version 3.3) [!] IntelliJ IDEA Ultimate Edition (version 2018.1.2) ✗ Flutter plugin not installed; this adds Flutter specific functionality. ✗ Dart plugin not installed; this adds Dart specific functionality. [✓] Connected device (2 available) ```
c: new feature,framework,a: accessibility,f: scrolling,customer: crowd,P3,team-framework,triaged-framework
high
Major
434,203,803
go
compress/flate: implement partial flush
<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? go-1.11.5 while trying to implement zlib compression for SSH (by internal Google request, https://github.com/golang/go/issues/31369), I stumbled on lack of support for partial flush. partial flush is described more precisely here: https://www.bolet.org/~pornin/deflate-flush.html (look for Z_PARTIAL_FLUSH). While this is deprecated functionality, it has also made its way into the SSH RFC. For the write side, it looks like I can't truncate the sync marker from a full flush to get the same effect. For the read side, feeding packets from OpenSSH into zlib.Reader leads to errors ("unexpected EOF").
help wanted,NeedsFix,FeatureRequest
medium
Critical
434,216,957
pytorch
Different behavior when trace model.
## 🐛 Bug When I use torch.jit.trace() to trace a model, it gives me different results with same code. ## To Reproduce I write a simple test example ```python import torch.nn as nn import torch class Net(nn.Module): def __init__(self): super(Net, self).__init__() print() def set_test_name(self, name): self.test_name = name def forward(self, input): print(self.test_name, ':', input.shape[2], '\n') output = input return output if __name__ == '__main__': model = Net() model.eval() inputs = torch.ones(1, 1, 32, 160) model.set_test_name('predict') output = model(inputs) model.set_test_name('trace') traced = torch.jit.trace(model, inputs) traced.save('stm.pt') ``` ## Expected behavior it should print this ``` predict : 32 trace : 32 trace : 32 trace : 32 ``` yet it gives me : ``` C:\ProgramData\Anaconda3\lib\site-packages\torch\tensor.py:427: RuntimeWarning: Iterating over a tensor might cause the trace to be incorrect. Passing a tensor of different shape won't change the number of iterations executed (and might lead to errors or silently give incorrect results). predict : 32 trace : tensor(32) 'incorrect results).', category=RuntimeWarning) trace : tensor(32) trace : 32 ``` As you can see, the type of input.shape[2] is different. ## Environment - PyTorch Version (e.g., 1.0): 1.0.1 - OS (e.g., Linux): Win10 - How you installed PyTorch (`conda`, `pip`, source): conda - Python version: 3.7.1 cc @suo
oncall: jit,triaged
low
Critical
434,245,661
flutter
Icon button with padding with wrong splash and highlight position
I am using an IconButton on my application like this: ```dart IconButton( // highlightColor: Colors.transparent, // splashColor: Colors.transparent, padding: EdgeInsets.only(top: 32), icon: Icon( Icons.next_week, color: Color(0xFF282828), size: 42, ), onPressed: () {}, ), ``` And i have to remove splash and highlight because it is showing where the button was before padding and it very wrong. Also, since the button is size 42 (too big) the splash is also wrong without padding. <details> <summary>flutter doctor -v</summary> ```bash [✓] Flutter (Channel beta, v1.4.9-hotfix.1, on Mac OS X 10.14.4 18E226, locale pt-BR) • Flutter version 1.4.9-hotfix.1 at /Users/danvilela/Code/flutter • Framework revision 88fa7ea403 (6 days ago), 2019-04-11 14:01:46 -0700 • Engine revision 4737fc5cd8 • Dart version 2.2.1 (build 2.2.1-dev.4.0 None) [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3) • Android SDK at /Users/danvilela/Library/Android/sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-28, build-tools 28.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-1248-b01) • All Android licenses accepted. [✓] iOS toolchain - develop for iOS devices (Xcode 10.2) • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 10.2, Build version 10E125 • ios-deploy 1.9.4 • CocoaPods version 1.6.1 [✓] Android Studio (version 3.3) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin version 34.0.1 • Dart plugin version 182.5215 • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01) [✓] IntelliJ IDEA Community Edition (version 2018.2.2) • IntelliJ at /Applications/IntelliJ IDEA CE.app • Flutter plugin version 27.1.3 • Dart plugin version 182.4129.13 [✓] VS Code (version 1.33.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 2.25.1 [✓] Connected device (1 available) • iPhone 8 • D8370516-7F68-4767-964E-69699A49D3DC • ios • com.apple.CoreSimulator.SimRuntime.iOS-12-2 (simulator) • No issues found! ``` </details>
framework,f: material design,a: quality,has reproducible steps,P2,found in release: 3.3,found in release: 3.7,team-design,triaged-design
low
Major
434,261,736
TypeScript
ConstructorParameters is not working for private constructors (and protected constructors)
**TypeScript Version:** 3.4 **Search Terms:** ConstructorParameters, private constructor **Code** ```ts class Foo { public constructor(a: number, b: boolean, c: string) { } } class Bar { private constructor(a: number, b: boolean, c: string) { } } type FooCtorArgs = ConstructorParameters<typeof Foo>; type BarCtorArgs = ConstructorParameters<typeof Bar>; ``` **Expected behavior:** `BarCtorArgs` is `[number, boolean, string]`. **Actual behavior:** Error in line 8: `Type 'typeof Bar' does not satisfy the constraint 'new (...args: any) => any'. Cannot assign a 'private' constructor type to a 'public' constructor type.` **Playground Link:** https://www.typescriptlang.org/play/#src=class%20Foo%0D%0A%7B%20public%20constructor(a%3A%20number%2C%20b%3A%20boolean%2C%20c%3A%20string)%20%7B%20%7D%20%7D%0D%0A%0D%0Aclass%20Bar%0D%0A%7B%20private%20constructor(a%3A%20number%2C%20b%3A%20boolean%2C%20c%3A%20string)%20%7B%20%7D%20%7D%0D%0A%0D%0Atype%20FooCtorArgs%20%3D%20ConstructorParameters%3Ctypeof%20Foo%3E%3B%0D%0Atype%20BarCtorArgs%20%3D%20ConstructorParameters%3Ctypeof%20Bar%3E%3B ---- **Use Case** Convenient factory pattern to mimic asynchronous object construction. ```ts class Component { public static async create(...args: ConstructorParameters<typeof Component>) { const component = new Component(...args); await component.initialize(); return component; } private constructor(a: number, b: boolean, c: string) { /* stuff */ } private async initialize() { /* asynchronous setup */ } } ``` **Ideas for Solution** Allow visibility modifiers in interfaces. Yes, if you use an interface to outline the visible properties of an object to a user this makes no sense, but why not allow interfaces to be a flexible tool to specify internal rules of implementations? I think this problem could be solved, if the `ConstructorParameters` type could be defined like the following: ```ts type ConstructorParameters<T extends {private new (...args: any[]): any}> = T extends new (...args: infer P) => any ? P : never; ``` Which is of course no allowed at the moment.
Suggestion,Awaiting More Feedback
medium
Critical
434,315,813
go
cmd/cover: add number of uncovered lines
The coverage HTML file generated by `go tool cover -html=coverage.out` only displays the coverage *percentage* per package; as a result it's hard to identify, by just glancing at the list of packages and their coverage, where the coverage is lacking because small packages and giant packages are treated the same. This is a feature request to add, in addition to the coverage percentage, the number of lines that are uncovered: this will enable to see what packages are big contributors to the lack of coverage.
NeedsInvestigation,FeatureRequest,compiler/runtime
low
Major
434,390,336
rust
Missed NonZero optimization opportunity
Godbolt [link](https://rust.godbolt.org/z/lc6Jl0) When a `NonZeroUsize` is created through `new_unchecked` and wrapped in a `Some`, the optimizer does not recognize that the value is always `Some`. This can be fixed by adding a `std::intrinsics::assume(value != 0)` line before creating the NonZero type. ```rust use std::num::NonZeroUsize; use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering::Relaxed; pub static X: AtomicUsize = AtomicUsize::new(1); pub unsafe fn get() -> Option<NonZeroUsize> { let x = X.load(Relaxed); Some(NonZeroUsize::new_unchecked(x)) } pub unsafe fn get2() -> usize { match get() { Some(x) => x.get(), None => unreachable!(), // not optimized out } } ``` Lots of panicking code gets generated in this example. Fixed by: ```rust #![feature(core_intrinsics)] use std::num::NonZeroUsize; use std::sync::atomic::AtomicUsize; use std::sync::atomic::Ordering::Relaxed; pub static X: AtomicUsize = AtomicUsize::new(1); pub unsafe fn get() -> Option<NonZeroUsize> { let x = X.load(Relaxed); std::intrinsics::assume(x != 0); // gets rid of the panicking code Some(NonZeroUsize::new_unchecked(x)) } pub unsafe fn get2() -> usize { match get() { Some(x) => x.get(), None => unreachable!(), // optimized away } } ``` I would guess that adding `assume` inside of `new_unchecked` would be ok, since it's already UB if it's not zero. Related: #51346. Posted as a new issue, because it can be fixed without any LLVM pass changes.
A-LLVM,I-slow,E-needs-test,T-compiler
low
Major
434,412,122
create-react-app
react-scripts v3 via npm requires a peer of typescript@*
The inclusion of @typescript-eslint/eslint-plugin and @typescript-eslint/parser in react-scripts means there are now a lot of warnings about typescript being an unmet peer dependency when part of a project not using typescript. I understand it is just a warning and I know I can ignore it, but I still wanted to bring it up. So many warnings coming from this package makes it harder to pull out the warnings I do want to fix.
issue: needs investigation
medium
Critical
434,412,767
TypeScript
Refactoring to convert destructuring declaration to property accesses
From https://github.com/Microsoft/vscode/issues/72502 **Feature request** Add a refactoring that converts a destructured local to normal propery access: ```ts const {x, y, z} = someObject; console.log(x + y * z); ``` Would be converted to: ```ts const newLocal = someObject; console.log(newLocal.x + newLocal.y * newLocal.z); ``` We would want to also trigger a rename on `newLocal`, similar to how the extract refactorings work This would be the inverse refactoring of #25946
Suggestion,Awaiting More Feedback,Domain: Refactorings
low
Minor
434,416,290
go
cmd/compile: more fine-grained mechanism for escape analysis of assembly functions
test/escape_runtime_atomic.go is failing on linux/arm. E.g., https://build.golang.org/log/b9cb939c683aed32bfa9ce69dbf44df63e291507
NeedsFix,compiler/runtime
low
Major
434,416,558
create-react-app
Style sheets referenced in XML or SVG
<!-- PLEASE READ THE FIRST SECTION :-) --> ### Is this a bug report? Maybe? I'm trying to use an SVG which references an external CSS file. When the browser requests the external style sheet, create-react is redirecting the request to the index page with a status of 304. This does work correctly if I us an absolute path in the SVG, but a relative path is changed to /static/media/svg_style.css Do I have an incorrect relative path in the SVG, or is this a bug? ``` <?xml-stylesheet type="text/css" href="../public/svg_style.css" ?> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"> <g class='svgTestFill'> <path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0..."/> <circle cx="420.9" cy="296.5" r="45.7"/> <path d="M520.5 78.1z"/> </g> </svg> ``` This also works if I bring in the SVG as `import {ReactComponent as Logo }from './logo.svg';` but I'd like to know if it's possible to load css from the SVG without having to load the SVG as a react component.
issue: needs investigation
low
Critical
434,423,764
opencv
Feature request: cv::erf() and cv::erfc()
- OpenCV => 3.4.5 - Operating System / Platform => Ubuntu 16.04 - Compiler => GCC 5.4.0 ##### Detailed description This is a feature request for two core functions/operations on arrays: `void cv::erf(InputArray src, OutputArray dst)` and `void cv::erfc(InputArray src, OutputArray dst)` These would provide the element-wise [error function](http://www.cplusplus.com/reference/cmath/erf/) and the element-wise [complementary error-function](http://www.cplusplus.com/reference/cmath/erfc/). Given fabs(X) standard deviations, erf returns the probability of observing a less extreme sample. See also: [wikipedia](https://en.wikipedia.org/wiki/Error_function). ##### Steps to reproduce N/A
feature,priority: low
low
Critical
434,452,754
vscode
index.js/index.ts file should show at top of file picker when searching for the name of the directory
- VSCode Version: Version 1.34.0-insider (1.34.0-insider) 6d5feae57959287fb116467f4eb6c7079571b466 - OS Version: MacOS 10.14.4 **Expected:** In TypeScript, index.js should show up at or near the top of the list, identically to if it was called `./MyComponent.ts`. (Since index.ts is a shorthand for "whatever this directory is" - e.g. `MyComponent/index.ts` can be imported as just `./MyComponent`). Note that there is currently no clean and quick way to open such a file since typing "index" is highly general and may bring up a huge list, and the dev doesn't know to type both the component name and index because it's not clear by looking at the import line that the module is being imported from a file named "index.ts". **Actual:** File often appears well down the list of choices, including below items that are seldom if ever selected. Example typing "regi" and wanting to open "registerLoginRoutes/index.ts": <img width="592" alt="image" src="https://user-images.githubusercontent.com/19214773/56315943-b24fd400-611e-11e9-9eb0-8d9c1047dd4a.png"> **Steps to Reproduce:** 1. Create an index.ts file within a directory 2. Cmd+p to open file search box 3. Start typing the name of the directory Does this issue occur when all extensions are disabled?: Yes
feature-request,search,quick-open
medium
Critical
434,463,077
godot
Can't access rotation and transform in Node2Ds and call functions on Transform2Ds
In VisualScript you can only get access to members that show up in the inspector, which means that rotation (not rotation_degrees) and transform members of Node2D are inaccessible. Furthermore, you can't call functions on a Transform2D object as you would with others, you have to search for Transform in the node search to get a `Transform Do X` node. This is the same with all basic types. Why does the `Basic Type` call mode even exist? ![image](https://user-images.githubusercontent.com/28286961/56317822-fca47580-615d-11e9-94e2-b3dc9db58127.png)
bug,confirmed,usability,topic:visualscript
low
Major
434,494,477
godot
WorldEnvironment Glow not working when background is transparent
**Godot version:** 3.1 **OS/device including version:** Linux 5.0.5-1-MANJARO GPU: AMD Radeon R7 260X using AMDGPU driver. **Issue description:** When setting the viewport to have a transparent background, the Glow effect from the WorldEnvironment gets disabled (Possibly other effects to, haven't tested). **Steps to reproduce:** 1. Create a scene with a bright object and a WorldEnvironment with Glow enabled. 2. Make the background transparent using `get_root().set_transparent_background(true)` **Minimal reproduction project:** [noglow.zip](https://github.com/godotengine/godot/files/3091614/noglow.zip)
discussion,topic:rendering,confirmed,topic:3d
low
Major
434,495,383
go
cmd/go: no way to `go get` source code for editing in module mode
<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? <pre> $ go version go version go1.12.4 darwin/amd64 </pre> ### Does this issue reproduce with the latest release? Yes ### What operating system and processor architecture are you using (`go env`)? <details><summary><code>go env</code> Output</summary><br><pre> $ go env GOARCH="amd64" GOBIN="" GOCACHE="/Users/matt/Library/Caches/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/matt/Dev" GOPROXY="" GORACE="" GOROOT="/usr/local/go" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/sf/7w4p15_15jb59d7kwy0wglh40000gn/T/go-build796937585=/tmp/go-build -gno-record-gcc-switches -fno-common" </pre></details> ### What are you trying to do? (Added this question, hope that's OK.) `go get` a Go project's source code and install its command (the repo contains both a command and library packages) while respecting module dependencies. In the past we used `vendor` to pin dependencies, but we'd rather use Go modules. `go get` has always worked great, even with an empty GOPATH. If possible, we'd like for the project to stay go-gettable. ### What did you do? 1. Make an empty GOPATH. (or, as I did, `export GOPATH=` and ensure no `~/go` folder exists) 2. `$ GO111MODULE=on go get github.com/mholt/testrepo/caddy` ### What did you expect to see? The `$GOPATH/src` (`~/go/src`) folder populated with the project's source code, and the binary installed to the `bin` folder, while honoring the versions specified in go.mod. ### What did you see instead? Only module folders were created. How does one get the source code, with dependencies, while honoring `go.mod`? The one-step install flow of `go get` was really nice. Will this no longer be the case with Go 1.13 when `GO111MODULE=on` becomes the default behavior? ### More info [We're in an awkward position in our transition to modules.](https://github.com/mholt/caddy/issues/2560) Many people are unable to build Caddy from source without some wrangling. We've added go.mod and go.sum, removed our vendor folder, and tagged a beta release (in the actual repo, not my test repo here). Unfortunately, modules seem to ignore the beta release tag so all module operations fail unless we explicitly specify the beta version in our commands. So it is not obvious how to test that we've transitioned correctly. Additionally, without modules (GO111MODULE=off), running `go get` on Caddy currently fails with: ``` package github.com/lucas-clemente/quic-go/h2quic: cannot find package "github.com/lucas-clemente/quic-go/h2quic" in any of: /usr/local/go/src/github.com/lucas-clemente/quic-go/h2quic (from $GOROOT) /Users/matt/go/src/github.com/lucas-clemente/quic-go/h2quic (from $GOPATH ``` because one of our upstream dependencies have had a breaking change. Our go.mod pins the working version of this dependency, but `go get` does not honor this (yet?). But setting `GO111MODULE=on` also doesn't work because the beta version isn't recognized. The last non-prerelease tag doesn't use modules, so the build also fails. (As an aside, `@v1.0.0-beta1` needs to be specified explicitly, which (temporarily?) breaks our build instructions and isn't obvious... it confused a lot of people including me.) Even still, if we start over on the test repo but set `GO111MODULE=on` this time, it does not pull down the source code so we can start developing on it. If `go get` is how the GOPATH is populated for development, it should put the source code in it so we can develop with it. If `go get` becomes a command for a read-only workflow, what is the alternative for "developers" as opposed to just "builders"?
NeedsInvestigation,FeatureRequest,modules
medium
Critical
434,502,246
TypeScript
String literals widened to string when destructuring function return
<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section! Please help us by doing the following steps before logging an issue: * Search: https://github.com/Microsoft/TypeScript/search?type=Issues * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ Please fill in the *entire* template below. --> <!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.4.x, @next <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** **Code** ```ts const func = <T extends string>(obj: { stringLiteral: T }): { stringLiteral: T } => { return obj; }; const { stringLiteral } = func({ stringLiteral: 'Literal' }); const Literal: 'Literal' = stringLiteral // Error: Type 'string' is not assignable to type '"Literal"' .ts(2322) ``` **Expected behavior:** `stringLiteral` should have type 'Literal' **Actual behavior:** When destructured immediately it's type is widened to `string`, however if it is not destructured immediately it's type is preserved ```ts const func = <T extends string>(obj: { stringLiteral: T }): { stringLiteral: T } => { return obj; }; const Obj = func({ stringLiteral: 'Literal' }); const { stringLiteral } = Obj const Literal2: 'Literal' = stringLiteral // Works fine ``` From my tests I discovered this happens either when the string literal is a property on an object the function takes as an input and the function has an explicit return type or returns the input object as is. Examples input object, explicit return type ```ts const func = <T extends string>({stringLiteral }: { stringLiteral: T }): { stringLiteral: T } => { return { stringLiteral }; }; const { stringLiteral } = func({ stringLiteral: 'Literal' }); const Literal: 'Literal' = stringLiteral // Error ``` ```ts const func = <T extends string>(obj: { stringLiteral: T }): { stringLiteral: T } => { return obj; }; const { stringLiteral } = func({ stringLiteral: 'Literal' }); const Literal: 'Literal' = stringLiteral // Error ``` input obj, no explicit return type ```ts const func8 = <T extends string>({stringLiteral }: { stringLiteral: T }) => { return { stringLiteral }; }; const { stringLiteral } = func8({ stringLiteral: 'Literal' }); const Literal: 'Literal' = stringLiteral // Works // // // // / // / // / /// // // // // // // // // // // // // // // // // const func9 = <T extends string>(obj: { stringLiteral: T }) => { return { stringLiteral: obj.stringLiteral }; }; const { stringLiteral: stringLiteral9 } = func9({ stringLiteral: 'Literal' }); const Literal9: 'Literal' = stringLiteral9; // Works ``` input obj, no explicit return type, returns input obj as is ```ts const func10 = <T extends string>(obj: { stringLiteral: T }) => { return obj; }; const { stringLiteral } = func10({ stringLiteral: 'Literal' }); const Literal: 'Literal' = stringLiteral // Error ``` It should be noted that all these errors scenario's can be fixed by asserting the input object as a const during function call ```ts const func = <T extends string>(obj: { stringLiteral: T }): { stringLiteral: T } => { return obj; }; const { stringLiteral } = func({ stringLiteral: 'Literal' } as const); // const assertion const Literal: 'Literal' = stringLiteral // Works!! ```
Bug
low
Critical
434,532,494
rust
-Clinker-plugin-lto doesn't work without extra manual work
``` $ cargo new testcase $ cd testcase $ RUSTFLAGS="-Clinker-plugin-lto" cargo run --release ``` Yields the following on mac: ``` Compiling testcase v0.1.0 (/Users/glandium/testcase) error: linking with `cc` failed: exit code: 1 | = note: "cc" "-m64" "-Wl,-plugin-opt=O3" "-Wl,-plugin-opt=mcpu=core2" "-L" "/Users/glandium/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/glandium/testcase/target/release/deps/testcase-d97266bc083c0e9e.testcase.4ank1dht-cgu.0.rcgu.o" "/Users/glandium/testcase/target/release/deps/testcase-d97266bc083c0e9e.testcase.4ank1dht-cgu.1.rcgu.o" "-o" "/Users/glandium/testcase/target/release/deps/testcase-d97266bc083c0e9e" "/Users/glandium/testcase/target/release/deps/testcase-d97266bc083c0e9e.3pvtkuuqiy7p6wge.rcgu.o" "-Wl,-dead_strip" "-nodefaultlibs" "-L" "/Users/glandium/testcase/target/release/deps" "-L" "/Users/glandium/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib" "/Users/glandium/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libstd-64d1544b9dc8a8d7.rlib" "/Users/glandium/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind-47702365139f147e.rlib" "/Users/glandium/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libbacktrace_sys-0aefa3a2bfa44649.rlib" "/Users/glandium/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libunwind-c2b22c88cacffeb6.rlib" "/Users/glandium/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_demangle-fca4484aa9be2d09.rlib" "/Users/glandium/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liblibc-4728c64ee20d89f8.rlib" "/Users/glandium/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc-1722fbf72ce989c9.rlib" "/Users/glandium/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/librustc_std_workspace_core-0836ff3f3d6a6ee6.rlib" "/Users/glandium/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcore-91c9fbc323ad09b7.rlib" "/Users/glandium/.rustup/toolchains/stable-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libcompiler_builtins-43b96ba2cdcc7cb3.rlib" "-lSystem" "-lresolv" "-lc" "-lm" = note: ld: unknown option: -plugin-opt=O3 clang: error: linker command failed with exit code 1 (use -v to see invocation) error: aborting due to previous error error: Could not compile `testcase`. To learn more, run the command again with --verbose. ``` On mac, the default linker is ld64. rustc really invokes cc, which invokes ld64 with the flags passed with `-Wl` and some others depending on the other command line arguments. ld64 does support the LLVM plugin... but doesn't support the -plugin-opt option to pass arguments to it. I know some things can be passed with -Wl,-mllvm,... but I don't know if that includes things that rust is trying to pass here. On Linux, it's funnier: ``` Compiling testcase v0.1.0 (/tmp/testcase) error: linking with `cc` failed: exit code: 1 | = note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-Wl,-plugin-opt=O3" "-Wl,-plugin-opt=mcpu=x86-64" "-L" "/home/glandium/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/tmp/testcase/target/release/deps/testcase-576934ab8201a4ea.testcase.dl00diw9-cgu.0.rcgu.o" "/tmp/testcase/target/release/deps/testcase-576934ab8201a4ea.testcase.dl00diw9-cgu.1.rcgu.o" "-o" "/tmp/testcase/target/release/deps/testcase-576934ab8201a4ea" "/tmp/testcase/target/release/deps/testcase-576934ab8201a4ea.y29oqvxl224jt9k.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/tmp/testcase/target/release/deps" "-L" "/home/glandium/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,--start-group" "-Wl,-Bstatic" "/home/glandium/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-bbd8cb236ab3b537.rlib" "/home/glandium/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-334e405e4bdf1791.rlib" "/home/glandium/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace_sys-1e14a089a9f63178.rlib" "/home/glandium/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-f1aae4818bd13556.rlib" "/home/glandium/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-a32c94e7da1105b4.rlib" "/home/glandium/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-e214e2acd110aec9.rlib" "/home/glandium/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-fbf429991e30afee.rlib" "/home/glandium/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-1734308ff05fb551.rlib" "/home/glandium/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-b349c8b817f959a5.rlib" "-Wl,--end-group" "/home/glandium/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-c4b4b16c70e666d9.rlib" "-Wl,-Bdynamic" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil" = note: /tmp/testcase/target/release/deps/testcase-576934ab8201a4ea.testcase.dl00diw9-cgu.0.rcgu.o: file not recognized: file format not recognized collect2: error: ld returned 1 exit status error: aborting due to previous error error: Could not compile `testcase`. To learn more, run the command again with --verbose. ``` Because `cc` is gcc, this just plain doesn't work, for no obvious reason. At the very least, it seems rust should try to use clang instead of cc in that case. But that also fails: ``` RUSTFLAGS="-Clinker=clang-8 -Clinker-plugin-lto" cargo run --release Compiling testcase v0.1.0 (/tmp/testcase) error: linking with `clang-8` failed: exit code: 1 | = note: "clang-8" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-Wl,-plugin-opt=O3" "-Wl,-plugin-opt=mcpu=x86-64" "-L" "/home/glandium/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/tmp/testcase/target/release/deps/testcase-e3dc53d119c25549.testcase.ci8upasg-cgu.0.rcgu.o" "/tmp/testcase/target/release/deps/testcase-e3dc53d119c25549.testcase.ci8upasg-cgu.1.rcgu.o" "-o" "/tmp/testcase/target/release/deps/testcase-e3dc53d119c25549" "/tmp/testcase/target/release/deps/testcase-e3dc53d119c25549.61wo3nlknhbro8d.rcgu.o" "-Wl,--gc-sections" "-pie" "-Wl,-zrelro" "-Wl,-znow" "-Wl,-O1" "-nodefaultlibs" "-L" "/tmp/testcase/target/release/deps" "-L" "/home/glandium/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "-Wl,--start-group" "-Wl,-Bstatic" "/home/glandium/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libstd-bbd8cb236ab3b537.rlib" "/home/glandium/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libpanic_unwind-334e405e4bdf1791.rlib" "/home/glandium/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libbacktrace_sys-1e14a089a9f63178.rlib" "/home/glandium/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libunwind-f1aae4818bd13556.rlib" "/home/glandium/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_demangle-a32c94e7da1105b4.rlib" "/home/glandium/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liblibc-e214e2acd110aec9.rlib" "/home/glandium/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/liballoc-fbf429991e30afee.rlib" "/home/glandium/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/librustc_std_workspace_core-1734308ff05fb551.rlib" "/home/glandium/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcore-b349c8b817f959a5.rlib" "-Wl,--end-group" "/home/glandium/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib/libcompiler_builtins-c4b4b16c70e666d9.rlib" "-Wl,-Bdynamic" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil" = note: /usr/bin/ld: bad -plugin-opt option clang: error: linker command failed with exit code 1 (use -v to see invocation) error: aborting due to previous error error: Could not compile `testcase`. To learn more, run the command again with --verbose. ``` And here, the reason is essentially the same: the underlying linker doesn't support the `-plugin-opt` flag... except it does, but not when it's not passed `-plugin`, which happens when the compiler passes it, which happens when `-flto` was on its command line: ``` $ RUSTFLAGS="-Clinker=clang-8 -Clinker-plugin-lto -Clink-arg=-flto" cargo run --release Compiling testcase v0.1.0 (/tmp/testcase) Finished release [optimized] target(s) in 0.28s Running `target/release/testcase` Hello, world! ``` Using lld works too, because it doesn't need an explicit `-plugin`: ``` $ RUSTFLAGS="-Clinker=clang-8 -Clinker-plugin-lto -Clink-arg=-fuse-ld=lld" cargo run --release Compiling testcase v0.1.0 (/tmp/testcase) Finished release [optimized] target(s) in 0.36s Running `target/release/testcase` Hello, world! ```
A-linkage,O-macos,T-compiler
medium
Critical
434,538,420
opencv
Building OpenCV 4.1.0 / 3.4.6 with OpenGL, CUDA 10.1 and OpenCL
<!-- 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). Please: * Read the documentation to test with the latest developer build. * Check if other person has already created the same issue to avoid duplicates. You can comment on it if there already is an issue. * Try to be as detailed as possible in your report. * Report only one problem per created issue. 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 => 4.1.0 / 3.4.6 - Operating System / Platform => Windows 64 Bit - Compiler =>Visual Studio 2019 ##### Detailed description Hi all, I have been unable to build OpenCV from source with support for CUDA 10.1, OpenCL and OpenGL. This issue applies to both the 4.1.0 and 3.4.6 versions of OpenCV. There seems to be an issue with a sharing function between OpenCL and OpenGL namely clGetGLContextInfoKHR. I need to develop an application similar to the video_reader.cpp sample thus I require all three modules to be supported. *Snippets* 7>C:\opencv\opencv41\modules\core\src\opengl.cpp(1640): warning C4459: declaration of 'clGetGLContextInfoKHR_pfn' hides global declaration 7>C:\opencv\opencv41\modules\core\include\opencv2\core\opencl\runtime\autogenerated/opencl_gl.hpp(58): note: see declaration of 'clGetGLContextInfoKHR_pfn' (compiling source file C:\opencv\opencv41\modules\core\src\opengl.cpp) 7>opencl_core.obj : error LNK2001: unresolved external symbol clGetGLContextInfoKHR 7>C:\opencv\install\opencv\bin\Debug\opencv_core410d.dll : fatal error LNK1120: 1 unresolved externals ##### Steps to reproduce Build OpenCV 4.1.0 / 3.4.6 using CMake 3.14.1 Compiler: Visual Studio 16 2019 x64 Options: WITH_CUDA WITH_OPENCL WITH_OPENGL
priority: low,category: build/install,category: gpu/cuda (contrib),category: ocl
low
Critical
434,544,660
rust
Generators should implement either Iterator or IntoIterator.
Generators (currently unstable) are used as an implementation detail for async/await support in rust, but they can also be useful for writing Iterators and similar. If you want to turn a Generator into an Iterator, you must wrap it in a new type, but it'd be useful to implement Iterator directory on Generator. Here's an example of how that could work: ```rust impl<G> Iterator for G where G: Generator<Return = ()> + Unpin { type Item = G::Yield; fn next(&mut self) -> Option<Self::Item> { match Pin::new(&mut self.generator).resume() { GeneratorState::Yielded(item) => Some(item), GeneratorState::Complete(_) => None, } } } ```
T-lang,T-libs-api,C-feature-request,A-coroutines,A-iterators
low
Major
434,556,998
vue-element-admin
编译的时候element的chunk出现了两处for(let i...),已经加了babel
<!-- 注意:为更好的解决你的问题,请参考模板提供完整信息,准确描述问题,信息不全的 issue 将被关闭。 Note: In order to better solve your problem, please refer to the template to provide complete information, accurately describe the problem, and the incomplete information issue will be closed. --> ## Bug report(问题描述) 编译后的代码除了这两处都正常转换成for(var i...),就这两处比较特殊,目前不明白为什么会这样 #### Steps to reproduce(问题复现步骤) <!-- 1. [xxx] 2. [xxx] 3. [xxxx] --> #### Screenshot or Gif(截图或动态图) 编译异常的代码片段: "6rf1":function(e,t,i){"use strict";t.a=function(e){for(let t=1,i=arguments.length;t<i;t++){let i=arguments[t]||{};for(let t in i)if(i.hasOwnProperty(t)){let n=i[t];void 0!==n&&(e[t]=n)}}return e}} #### Link to minimal reproduction(最小可在线还原demo) <!-- Please only use Codepen, JSFiddle, CodeSandbox or a github repo --> #### Other relevant information(格外信息) - Your OS: - Node.js version: 10.14.2 - vue-element-admin version:3.10.0
need repro :mag_right:
low
Critical
434,573,733
three.js
Editor:could the editor add Group/Ungroup function ? use ctrl + mouse-left select meshes。
Enhancement,Editor
low
Minor
434,590,680
pytorch
[jit] requires_grad in JIT constructor/factories
Something like: ``` t = torch.ones(2, requires_grad=True) ``` fails with: ``` RuntimeError: arguments for call are not valid: for operator aten::ones(int[] size, *, Tensor out) -> Tensor: argument out not provided. @torch.jit.script def foo(): t = torch.ones(2, requires_grad=True) ~~~~~~~~~~ <--- HERE for operator aten::ones(int[] size, *, int? dtype=<default>, int? layout=<default>, Device? device=<default >) -> Tensor: keyword argument requires_grad unknown for call at: @torch.jit.script def foo(): t = torch.ones(2, requires_grad=True) ~~~~~~~~~~ <--- HERE ``` We also can't do: ``` @torch.jit.script def foo(): t = torch.ones(2) t.requires_grad_(True) ``` I assume this had to do with lack of mutability annotations before? @zdevito are there any other difficulties you could see? cc @ezyang @gchanan @zou3519 @bdhirsh @jbschlosser @gmagogsfm @suo
high priority,triage review,oncall: jit
low
Critical
434,611,207
vscode
Support restart of remote EH to avoid window reloads
It looks like we added code to the workbench to reload the window in certain cases when entering a workspace or folders change: https://github.com/Microsoft/vscode/blob/053a32e2bbc354af2b19cb40758f615cefcb714e/src/vs/workbench/services/workspace/electron-browser/workspaceEditingService.ts#L366 https://github.com/Microsoft/vscode/blob/053a32e2bbc354af2b19cb40758f615cefcb714e/src/vs/workbench/contrib/relauncher/electron-browser/relauncher.contribution.ts#L163 There should only be very few reasons why this is needed (e.g. a global settings change) and in that case we tell the user at least and offer to cancel that. Here we just reload without warning (which is quite horrible if e.g. the user has decided to disable hot-exit and then needs to deal with untitled/unsaved buffers).
feature-request,extension-host
low
Major
434,651,024
go
x/net/http2: stream was reset: PROTOCOL_ERROR
<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? <pre> $ go version go version go1.12 linux/amd64 </pre> ### Does this issue reproduce with the latest release? ### What operating system and processor architecture are you using (`go env`)? <details><summary><code>go env</code> Output</summary><br><pre> $ go env ``` GOARCH="amd64" GOBIN="" GOCACHE="/home/ashish/.cache/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/ashish/code/go" GOPROXY="" GORACE="" GOROOT="/home/ashish/.gimme/versions/go1.12.linux.amd64" GOTMPDIR="" GOTOOLDIR="/home/ashish/.gimme/versions/go1.12.linux.amd64/pkg/tool/linux_amd64" GCCGO="gccgo" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/home/ashish/code/go/src/github.com/minio/minio-java/go.mod" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build786486078=/tmp/go-build -gno-record-gcc-switches" ``` </pre></details> ### What did you do? I am using minio for Object storage. Minio is a golang project using go1.12 as the base go version. The server is HTTP2 enabled. I use using minio java client which uses `okhttp3` . when i try to store the object in a bucket in multi threaded mode i get `okhttp3.internal.http2.StreamResetException: stream was reset: NO_ERROR`. Refer https://github.com/minio/minio/issues/7501 . `okhttp3.OkHttpClient` uses http2.0 by default which causes such issue. If i forcefuly set the protocol to 1.1 ,it works fine. Refer PR https://github.com/minio/minio-java/pull/766. I find there is some issue with `Go1.12` or `okhttp3` as i found this issue in the community. Refer https://github.com/square/okhttp/issues/3955 The only solution provided there was to revert to HTTP1_1 . Setting the protocol to 1.1 is not the solution as i am not using the functionality of HTTP2.0 enabled server. Raised the issue with `okhhttp` refer https://github.com/square/okhttp/issues/4964 Below is the code which replicates the problem ``` import io.minio.MinioClient; class PutObjectRunnable implements Runnable { MinioClient client; String bucketName; String filename; public PutObjectRunnable(MinioClient client, String bucketName, String filename) { this.client = client; this.bucketName = bucketName; this.filename = filename; } public void run() { StringBuffer traceBuffer = new StringBuffer(); try { client.putObject(bucketName, filename, filename); } catch (Exception e) { System.err.print(traceBuffer.toString()); e.printStackTrace(); } } } ``` ```import io.minio.*; public class ThreadedPutObject { public static void main(String args[]) throws Exception { try{ MinioClient client = new MinioClient("https://play.min.io:9000", "Q3AM3UQ867SPQQA43P2F", "zuf+tfteSlswRu7BJ86wekitnifILbZam1KYY3TG", true); client.traceOn(System.out); long startTime = System.currentTimeMillis(); boolean found = minioClient.bucketExists("my-bucketname"); if (found) { System.out.println("my-bucketname already exists"); } else { // Create bucket 'my-bucketname'. minioClient.makeBucket("my-bucketname"); System.out.println("my-bucketname is created successfully"); } Thread[] threads = new Thread[7]; String[] location = new String[]{"<<PATH_TO_OBJECT_1>>", "<<PATH_TO_OBJECT_2>>", "<<PATH_TO_OBJECT_3>>", "<<PATH_TO_OBJECT_4>>", "<<PATH_TO_OBJECT_5>>", "<<PATH_TO_OBJECT_6>>", "<<PATH_TO_OBJECT_7>>" }; for (int i = 0; i < 7; i++) { PutObjectRunnable pr = new PutObjectRunnable(client, "my-bucketname",location[i] ); threads[i] = new Thread(pr); } for (int i = 0; i < 7; i++) { threads[i].start(); } // Waiting for threads to complete. for (int i = 0; i < 7; i++) { threads[i].join(); System.out.println(i); } // All threads are completed. } catch (Exception e) { throw e; } System.out.println("uploaded"); } } ``` <!-- If possible, provide a recipe for reproducing the error. A complete runnable program is good. A link on play.golang.org is best. --> ### What did you expect to see? `Object should have been uploaded.` ### What did you see instead? `okhttp3.internal.http2.StreamResetException: stream was reset: PROTOCOL_ERROR`
NeedsInvestigation
low
Critical
434,669,614
ant-design
Layout.Sider should be allowed to used classes to solve width problems in responsive layouts instead of specifying width attribute
### What problem does this feature solve? Currently the the [Layout.Sider](https://ant.design/components/layout/) allows specifying both - **className** and **width**. **Width** is used to manually set the style width of the Sider's `<Div/>` div component in expanded mode. This works beautifully in most of the cases however if you want to have responsive design and control the width of the expanded state via **className** and `@media` CSS selector - you will fail to. This is because because the collapse/expand mechanism always sets width that overrides the set *className* that would otherwise the CSS `@media` selector. The problem in couple of examples. If I set *width* to: - *320*. It will always set the width to 320 px in expanded mode no matter the width of the screen. For portrait mode and mobile devices it makes sense to take 100% of the width and push the content below. - *null*. It will set the width 0 px in expanded mode, which breaks the visualisation. - *undefined*. It will set the width to 200 px, which will lead to case #1 ### What does the proposed API look like? I would like to have additional property like `disableCollapseWidthControl={true}` that will not control the width style of the Sider's `<Div/>` , so could fine tune the siders width in various positions. ### Related links Other people having the same problem [here on StackOverflow](https://stackoverflow.com/questions/50251476/how-to-avoid-content-reflow-with-ant-designs-responsive-sider?rq=1) <!-- generated by ant-design-issue-helper. DO NOT REMOVE -->
Inactive
low
Minor
434,719,128
rust
Implementation of Trait for different type of Fn doesn't work
Implementing a Trait for a type T (where T is a function with a given a signature) and then trying to implement the same trait for another type T (where T is a function with a different signature) doesn't compile. I tried this code: ```Rust trait MyTrait {} impl<F> MyTrait for F where F: Fn(u32) -> u32 {} impl<F> MyTrait for F where F: Fn(u32, u32) -> u32 {} ``` When compiling this code I get : ``` error[E0119]: conflicting implementations of trait `MyTrait`: --> src/main.rs:5:1 | 3 | impl<F> MyTrait for F where F: Fn(u32) -> u32 {} | ------------------------------------------------------ first implementation here 4 | 5 | impl<F> MyTrait for F where F: Fn(u32, u32) -> u32 {} | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation ``` What I would expect is that T here represent in the first implementation either a fn(u32) -> u32 or a closure the implement Fn(u32) -> u32, then in the second implementation, T would be either a fn(u32, u32) -> u32 or a closure the implement Fn(u32, u32) -> u32. ## Meta rustc 1.34.0 (91856ed52 2019-04-10) binary: rustc commit-hash: 91856ed52c58aa5ba66a015354d1cc69e9779bdf commit-date: 2019-04-10 host: x86_64-apple-darwin release: 1.34.0 LLVM version: 8.0
A-trait-system,A-closures,T-lang
medium
Critical
434,799,918
pytorch
Massive memory overhead over NumPy
## 🐛 Bug The memory usage comparison between the same data structures implemented with different backends (PyTorch tensors and NumPy arrays) shows over 4x higher usage when using PyTorch. Data structure consists of a list containing 5kk small tensors/arrays. ![](https://imgur.com/RtznFzw.png) ## To Reproduce Use this Gist: https://gist.github.com/iamhatesz/3ef34254febe482aa48e3e489f89b07b ## Expected behavior The memory usage for both data structures should be similar. ## Environment - PyTorch Version (e.g., 1.0): 1.0.1 - OS (e.g., Linux): Windows 10 - How you installed PyTorch (`conda`, `pip`, source): pip - Build command you used (if compiling from source): - - Python version: 3.7.1 - CUDA/cuDNN version: - - GPU models and configuration: - - Any other relevant information: - ## Additional context none
module: internals,module: memory usage,triaged
low
Critical
434,835,251
storybook
Ability to specify version in AboutScreen
**Is your feature request related to a problem? Please describe.** We build a static storybook to deploy for our designer to review and then also for reviewing code changes before approval. Currently, it's not possible to see when the storybook was built and what commit was used to build it. **Describe the solution you'd like** Add support for loading a `version.json` file whose contents are displayed in the `AboutScreen`. **Describe alternatives you've considered** Anything that allows the user to see the build date and other details about the build. **Are you able to assist bring the feature to reality?** possibly. I've never worked with the Storybook code base before, but this should be a simple change that I might be able to work with. **Additional context** A simple display of key/value pairs from the `version.json` is all that I'm looking for.
feature request,ui,has workaround
low
Minor
434,844,025
react-native
[a11y] Nested accessibility items are not respected on iOS
React Native apps often have many UI components that are touchable but also contain nested elements that are also touchable. For example, an entire list row may be touchable as a primary navigation option, but it might also have an auxiliary button nested inside of it for taking a specific action, like delete or save. Currently, if the touchable wrapper for the auxiliary button as well as the row container are properly tagged with accessibility props and accessibility labels it works fine on Android but on iOS, the nested 'save/delete' button is not selectable by VoiceOver. On Android, both will be accessible when accessibility features are enabled. The current workaround in user-land is to make some janky hierachry where the aux button is a sibling of its visual container, which often breaks encapsulation and is generally a pain. There are a couple ways we might be able to work around this at the framework level: 1) use UIAccessibilityContainer protocol 2) set the accessibilityElements property on the parent Those approaches are detailed a bit more here: https://stackoverflow.com/questions/38849389/voiceover-parent-and-child-views-as-accessibility-elements Looks like flutter had this same issue and fixed it here with UIAccessibilityContainer: https://github.com/flutter/engine/pull/4110 Tracked internally with T34121499
Platform: iOS,Ran Commands,Accessibility,Bug,Accessibility Team - Evaluated,Never gets stale
low
Major
434,847,956
react
Events before Client Side Hydration
Recently I detected a problem using React in SSR. Maybe is quite obvious, but all the JavaScript events that are fired before the JavaScript is loaded, are lost... This is something normal. The JS is not there yet... Ok. However, I expect to have some utility to do some exceptions. I'm going to try to explain my case: I'm using an image, and in the event `onError`, I want to change the src to render a fallback image. ```jsx function Img(props) { return ( <img {...props} onError={e => { e.target.src = fallbackSrc } } /> ) } ``` Nevertheless, this code loaded from SSR, is working "sometimes"... I guess that this "sometimes" is because if the event is fired before the client side hydration. Is not catched by my JS. And the `e => e.target.src = fallbackSrc` is never executed. However, if the JS is loaded faster than the onError event, is catched, and is rendering the fallback image as I expected. I want to propose some utility to do sometimes some exceptions, and render the JS inline on the first render. Perhaps, adding some extra config in `ReactDOM.hydrate`? I dunno... Or maybe someone can help me providing any tip in order to fix this?
Resolution: Backlog
high
Critical
434,859,596
rust
Add a new `--error-format` `human-sorted` for the test harness `libtest` // `--message-format` for `cargo test`
I run `cargo test` from the command line many times every day, always with the default `--message-format human` value. Usually, I have a quick scan through the list of test cases and look for any red FAILED text. I have three very minor annoyances about the `human` message format: 1. The list of tests isn't ordered by test name. This makes it hard to see at a glance if the failures are in one module or many. 2. The list of tests aren't ordered by pass/fail. This means I have to read through every line to see which tests failed. It also means if you have more tests than terminal rows, you have to scroll to find all the failing tests. 3. The green pass/red fail text is on the very end of the line, meaning it never lines up. Because each line is variable width (due to each test name having a variable length), I can't just glance my eyes down a column of text. My eyes have to dart around from column to column. These are really minor issues, but they slow down my reading comprehension. Given how often I read the `cargo test` output every day, it might be worth improving its glanceability. **Suggested solution 0** Do nothing. If users want to see failures more easily, they can just read through the more detailed failure output that each failed test outputs. This is a reasonable response. However, given that the summarized list of each test and its pass/fail status exists, I feel it should be as readable as possible. **Suggested solution 1** Add a new format flag, `--message-format human-sorted` which is identical to `--message-format human` except for these changes: 1. List of tests is ordered by pass/fail status, then by test name. This way, all failing tests are listed towards the end of the output (so users don't have to scroll their terminal), and tests from the same module will be next to each other (so users can tell which modules are failing). 2. Pass/fail status appears at the start of the line rather than the end. This way, users can just scan their eyes down a single aligned column of text, instead of needing to move their eyes in a diagonal down-left down-right way. Here is an example of `--message-format human` output ``` running 33 tests test config::tests::test_cloudflared_args ... ok test config::tests::test_contains_duplicate ... ok test monitor::poll::tests::test_event_into_fail ... ok test monitor::poll::tests::test_event_into_happened ... ok test monitor::poll::tests::test_event_into_wait ... ok test monitor::poll::tests::test_event_to_option ... ok test monitor::poll::tests::test_poll_always_succeed ... ok test monitor::poll::tests::test_poll_always_wait ... ok test monitor::poll::tests::test_poll_zero_timeout_wait ... ok test monitor::poll::tests::test_trimap ... ok test monitor::report::tests::test_fail_report_sentry_message ... ok test monitor::report::tests::test_fail_report_sentry_tags ... ok test monitor::tunnelchecker::tests::test_cname ... ok test monitor::tunnelchecker::tests::test_count_active_conns ... ok test monitor::tunnelchecker::tests::test_count_active_conns_malformed ... ok test monitor::tunnelchecker::tests::test_count_active_conns_no_conns ... ok test monitor::tunnelchecker::tests::test_count_active_conns_one_unregistered ... ok test monitor::tunnelchecker::tests::test_is_lb ... ok test monitor::tunnelchecker::tests::test_parse_tunnel_alphanumeric ... ok test monitor::tunnelchecker::tests::test_parse_tunnel_ids_many_lines ... ok test monitor::tunnelchecker::tests::test_parse_tunnel_ids_no_matches ... ok test monitor::tunnelchecker::tests::test_parse_tunnel_ids_single_line ... ok test monitor::tunnelchecker::tests::test_parse_tunnel_non_alphanumeric ... ok test monitor::tunnelchecker::tests::test_parse_tunnel_reg_fail_many_lines ... ok test monitor::tunnelchecker::tests::test_parse_tunnel_reg_fail_no_matches ... ok test monitor::tunnelchecker::tests::test_parse_tunnel_reg_fail_with_success_line ... ok test monitor::tunnelchecker::tests::test_parse_tunnel_reg_success ... ok test monitor::tunnelchecker::tests::test_register_tunnel_fail_response ... ok test monitor::tunnelchecker::tests::test_register_tunnel_timeout ... ok test monitor::tunnelstarter::tests::test_cloudflared_cli_args ... ok test monitor::tunnelstarter::tests::test_parse_hostname_fail ... ok test monitor::tunnelstarter::tests::test_parse_hostname_success ... ok ``` And here is the same test output but with `--message-format human-sorted` output: ``` running 33 tests ok ... test config::tests::test_cloudflared_args ok ... test config::tests::test_contains_duplicate ok ... test monitor::poll::tests::test_event_into_fail ok ... test monitor::poll::tests::test_event_into_happened ok ... test monitor::poll::tests::test_event_into_wait ok ... test monitor::poll::tests::test_event_to_option ok ... test monitor::poll::tests::test_poll_always_wait ok ... test monitor::poll::tests::test_poll_zero_timeout_wait ok ... test monitor::poll::tests::test_trimap ok ... test monitor::report::tests::test_fail_report_sentry_tags ok ... test monitor::tunnelchecker::tests::test_cname ok ... test monitor::tunnelchecker::tests::test_count_active_conns ok ... test monitor::tunnelchecker::tests::test_count_active_conns_malformed ok ... test monitor::tunnelchecker::tests::test_count_active_conns_no_conns ok ... test monitor::tunnelchecker::tests::test_count_active_conns_one_unregistered ok ... test monitor::tunnelchecker::tests::test_is_lb ok ... test monitor::tunnelchecker::tests::test_parse_tunnel_alphanumeric ok ... test monitor::tunnelchecker::tests::test_parse_tunnel_ids_many_lines ok ... test monitor::tunnelchecker::tests::test_parse_tunnel_ids_no_matches ok ... test monitor::tunnelchecker::tests::test_parse_tunnel_ids_single_line ok ... test monitor::tunnelchecker::tests::test_parse_tunnel_non_alphanumeric ok ... test monitor::tunnelchecker::tests::test_parse_tunnel_reg_fail_many_lines ok ... test monitor::tunnelchecker::tests::test_parse_tunnel_reg_fail_no_matches ok ... test monitor::tunnelchecker::tests::test_parse_tunnel_reg_fail_with_success_line ok ... test monitor::tunnelchecker::tests::test_parse_tunnel_reg_success ok ... test monitor::tunnelchecker::tests::test_register_tunnel_fail_response ok ... test monitor::tunnelchecker::tests::test_register_tunnel_timeout ok ... test monitor::tunnelstarter::tests::test_cloudflared_cli_args ok ... test monitor::tunnelstarter::tests::test_parse_hostname_fail FAILED ... test monitor::poll::tests::test_poll_always_succeed FAILED ... test monitor::report::tests::test_fail_report_sentry_message FAILED ... test monitor::tunnelstarter::tests::test_parse_hostname_success ``` I personally think this format is much more readable. It requires less eye motion and less scrolling (in the event that the list of tests doesn't fit in your terminal height). I would be happy to implement this change if the community thought it was helpful. I'd suggest keeping `human` as the default value for `--message-format` and adding `human-sorted` as an alternative, to avoid breaking anyone's code that relies on the current default format.
T-compiler,C-feature-request,A-libtest,needs-rfc,A-CLI
low
Critical
434,867,737
flutter
Make Tab widget _warpToCurrentIndex transition more robust
_warpToCurrentIndex is called when you jump more than two tabs. During the warping, didUpdateWidget will delay until warping finish. That mean any change to the widget will be postpone during warping. We should come up a better way to do this. This issue come up during the discussion in https://github.com/flutter/flutter/pull/29188#discussion_r276479006
framework,f: material design,c: proposal,P3,team-design,triaged-design
low
Major
434,873,040
go
x/tools/gopls: improve suggestions in completion placeholders
Context: #31547. We should suggest in-scope identifiers of the matching type when adding placeholders for a function. We would also need to develop some heuristics to determine which identifier to suggest, if there are multiple in scope. (Ideas: most recently declared, closest name to the one declared in the function signature.)
help wanted,FeatureRequest,gopls
low
Minor
434,875,813
go
cmd/go: 'go mod init' should validate module paths for v2+ dependencies
### What version of Go are you using (`go version`)? go 1.12.4 ### Does this issue reproduce with the latest release? Yes, including tip. ### What did you do? Observed problems in modules that were ultimately traced back to losing information in the `go mod init` process. ### What did you expect to see? `go mod init` setting proper module paths for v2+ dependencies when converting from a prior dependency manager. ### What did you see instead? `go mod init` never seems to set the `/vN` as part of the module path for a `require` statement ### Example from scratch This can happen in different ways in the wild, but here is an example from scratch. ``` $ export GO111MODULE=off $ go get github.com/gobuffalo/packr/v2 $ mkdir -p $GOPATH/src/example.com/hello $ cd $GOPATH/src/example.com/hello $ cat <<EOF > hello.go package hello import _ "github.com/gobuffalo/packr/v2" EOF $ dep init ... Using ^2.2.0 as constraint for direct dep github.com/gobuffalo/packr ... $ export GO111MODULE=on $ gotip mod init go: creating new go.mod: module example.com/scratchpad/hello go: copying requirements from Gopkg.lock $ grep packr go.mod github.com/gobuffalo/packr v0.0.0-20190416161152-cda4ac255773 ``` `cda4ac255773` corresponds to the [v2.2.0 tag](https://github.com/gobuffalo/packr/tree/v2.2.0), but the `require` in the created `go.mod` is missing the required `/v2` after `packr`. In other words, `go mod init` created an incorrect go.mod. <details><summary>Gopkg.lock and Gopkg.toml created by this example</summary><br> ``` $ cat Gopkg.lock # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. [[projects]] digest = "1:d29ee5ef14a7e0253facd0bcebe6a69a7a4e02a67eb24d2aacd8ccb4a7cea6fc" name = "github.com/gobuffalo/envy" packages = ["."] pruneopts = "UT" revision = "043cb4b8af871b49563291e32c66bb84378a60ac" version = "v1.7.0" [[projects]] branch = "master" digest = "1:5cc0801073158de62986111e35292e498e5d762a45da812bac744986fbe11daa" name = "github.com/gobuffalo/genny" packages = ["."] pruneopts = "UT" revision = "3ca520ef0d9ea4981534aae98bf9a003d9b18678" [[projects]] branch = "master" digest = "1:7779ec172ea5898029020425bf58586c68c341fe4c3c23c2508605767de3ce47" name = "github.com/gobuffalo/gogen" packages = [ ".", "goimports", "gomods", ] pruneopts = "UT" revision = "8f38393713f59beb43221f903c07f58f0377a063" [[projects]] branch = "master" digest = "1:f391538f4166f7c0aa50943372af196304488b039fe663c134d42f064e1ed92c" name = "github.com/gobuffalo/logger" packages = ["."] pruneopts = "UT" revision = "86e12af44bc273e0063fad5b6ad588890b8cfe6b" [[projects]] digest = "1:a3259d2a6c245b62e40232800e3ebb4d7d5840940638de0e4754cb13cdd37790" name = "github.com/gobuffalo/mapi" packages = ["."] pruneopts = "UT" revision = "0bb5e840be332d4280e40f2e6c50777c615bbac5" version = "v1.0.2" [[projects]] branch = "master" digest = "1:8561bb77169b6b26a39bcf2945f582a10ccbe3533d644ada72094bd5fc86b4d5" name = "github.com/gobuffalo/packd" packages = ["."] pruneopts = "UT" revision = "a385830c7fc0495b810318788a043c7655da337d" [[projects]] digest = "1:0fac441be66684180b031233313b8315644c0734fd73944c3e156e3cf5fbe203" name = "github.com/gobuffalo/packr" packages = [ "v2", "v2/file", "v2/file/resolver", "v2/file/resolver/encoding/hex", "v2/jam/parser", "v2/plog", ] pruneopts = "UT" revision = "cda4ac25577350dac682c8715dc6659327232596" version = "v2.2.0" [[projects]] branch = "master" digest = "1:b90ac64448d67ef218124185a8524f3c665fb7f51f096d5dd51ce950a1775d89" name = "github.com/gobuffalo/syncx" packages = ["."] pruneopts = "UT" revision = "33c29581e754bd354236e977dfe426e55331c45d" [[projects]] digest = "1:ecd9aa82687cf31d1585d4ac61d0ba180e42e8a6182b85bd785fcca8dfeefc1b" name = "github.com/joho/godotenv" packages = ["."] pruneopts = "UT" revision = "23d116af351c84513e1946b527c88823e476be13" version = "v1.3.0" [[projects]] digest = "1:38d2e838817528fd7d1ccdf7fa6700ee0f1727b3c484d13cab54bfbdaab12b0e" name = "github.com/karrick/godirwalk" packages = ["."] pruneopts = "UT" revision = "6d1c7760ec857d2984abe0a23fa263877f50d3f0" version = "v1.8.0" [[projects]] digest = "1:31e761d97c76151dde79e9d28964a812c46efc5baee4085b86f68f0c654450de" name = "github.com/konsorten/go-windows-terminal-sequences" packages = ["."] pruneopts = "UT" revision = "f55edac94c9bbba5d6182a4be46d86a2c9b5b50e" version = "v1.0.2" [[projects]] branch = "master" digest = "1:6e2ed1bdbf1d14b4d0be58bcd3f1c3000c1e226964354457b8e6ca69e83a1cbb" name = "github.com/markbates/oncer" packages = ["."] pruneopts = "UT" revision = "bf2de49a0be218916e69a11d22866e6cd0a560f2" [[projects]] digest = "1:28687e854cec240942c103259668b132a8450b05a6cc677eea2282b26ae29310" name = "github.com/markbates/safe" packages = ["."] pruneopts = "UT" revision = "6fea05a5732486546a4836b7a1d596c5ec687b98" version = "v1.0.1" [[projects]] digest = "1:cf31692c14422fa27c83a05292eb5cbe0fb2775972e8f1f8446a71549bd8980b" name = "github.com/pkg/errors" packages = ["."] pruneopts = "UT" revision = "ba968bfe8b2f7e042a574c888954fccecfa385b4" version = "v0.8.1" [[projects]] digest = "1:e09ada96a5a41deda4748b1659cc8953961799e798aea557257b56baee4ecaf3" name = "github.com/rogpeppe/go-internal" packages = [ "modfile", "module", "semver", ] pruneopts = "UT" revision = "438578804ca6f31be148c27683afc419ce47c06e" version = "v1.3.0" [[projects]] digest = "1:fd61cf4ae1953d55df708acb6b91492d538f49c305b364a014049914495db426" name = "github.com/sirupsen/logrus" packages = ["."] pruneopts = "UT" revision = "8bdbc7bcc01dcbb8ec23dc8a28e332258d25251f" version = "v1.4.1" [[projects]] branch = "master" digest = "1:bbe51412d9915d64ffaa96b51d409e070665efc5194fcf145c4a27d4133107a4" name = "golang.org/x/crypto" packages = ["ssh/terminal"] pruneopts = "UT" revision = "b43e412143f90fca62516c457cae5a8dc1595586" [[projects]] branch = "master" digest = "1:e18a5437c48ea1bd6dcd960efdd634d05ae5c2dd033d2d17f73cc20be92895ac" name = "golang.org/x/sys" packages = [ "unix", "windows", ] pruneopts = "UT" revision = "f0ce4c0180bef7e9c51babed693a6e47fdd8962f" [[projects]] branch = "master" digest = "1:be1ab6d2b333b1d487c01f1328aef9dc76cee4ff4f780775a552d2a1653f0207" name = "golang.org/x/tools" packages = [ "go/ast/astutil", "go/gcexportdata", "go/internal/gcimporter", "go/internal/packagesdriver", "go/packages", "go/types/typeutil", "imports", "internal/fastwalk", "internal/gopathwalk", "internal/module", "internal/semver", ] pruneopts = "UT" revision = "6732636ccdfd99c4301d1d1ac2307f091331f767" [solve-meta] analyzer-name = "dep" analyzer-version = 1 input-imports = ["github.com/gobuffalo/packr/v2"] solver-name = "gps-cdcl" solver-version = 1 $ cat Gopkg.toml # Gopkg.toml example # # Refer to https://golang.github.io/dep/docs/Gopkg.toml.html # for detailed Gopkg.toml documentation. # # required = ["github.com/user/thing/cmd/thing"] # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] # # [[constraint]] # name = "github.com/user/project" # version = "1.0.0" # # [[constraint]] # name = "github.com/user/project2" # branch = "dev" # source = "github.com/myfork/project2" # # [[override]] # name = "github.com/x/y" # version = "2.4.0" # # [prune] # non-go = false # go-tests = true # unused-packages = true [[constraint]] name = "github.com/gobuffalo/packr" version = "2.2.0" [prune] go-tests = true unused-packages = true ``` </details> ### Additional comments This issue is not about how to resolve this manually, which I know how to do. Rather, it would be better to not to have to resolve manually, but more importantly would better if others did not encounter follow-on issues due to this behavior. Also, in some cases `go mod tidy` or similar can let someone be "lucky" and not notice this, but in some cases the version information converted by `go mod init` is important to avoid follow-on issues. This was a less significant problem early in the history of modules because not many v2+ packages had adopted modules yet. However, more v2+ dependencies are adopting `go.mod` files themselves as modules move towards being on by default in 1.13. I have seen this behavior be the root cause of hard-to-diagnose problems in the wild, and the rate of those problems likely would increase with more v2+ modules in the ecosystem. (And then later, this problem rate of course would decrease, given it is transitional in nature). This is related to #30161, but that suggested an alternative solution of dropping the dependency during the conversion process, and that issue was ultimately closed by the reporter after the current behavior was explained and the reporter understood how to manually work around. However, ideally `go mod init` would record the right information here without the need for someone to read documentation or manually work around.
NeedsInvestigation,GoCommand,modules
low
Critical
434,897,291
pytorch
[caffe2]Reloading model gives segmentation fault
Here is the code ```python def create_model(hp_space): workspace.ResetWorkspace() with core.DeviceScope(core.DeviceOption(caffe2_pb2.CUDA, 0)): train_model = ModelHelper(init_params=True) if hp_space['model'] == 'DenseNet': obj_train = DenseNet((1, 3, 224, 224), model=train_model, workspace_name='default', is_test=False) else: print('Please check hyper parameter name and model name') sys.exit(0) collect_params = [] for ops in train_model.InitProto().op: for blob_name in ops.output: collect_params.append(blob_name) workspace.FeedBlob('label', np.ones(4).astype(np.int32)) obj_train.model.net.Softmax(['fc'], 'softmax') xent = obj_train.model.LabelCrossEntropy(['softmax', 'label'], 'xent') loss = obj_train.model.AveragedLoss(xent, 'loss') brew.accuracy(obj_train.model, ['softmax', 'label'], 'train') train_model.AddGradientOperators([loss]) if hp_space['optimizer'] == 'adam': optimizer.build_adam(train_model, base_learning_rate=hp_space[ 'learning_rate'], policy='step', stepsize=1, gamma=0.999) workspace.FeedBlob('input', np.ones((1, 3, 224, 224)). astype(np.float32)) workspace.RunNetOnce(obj_train.model.param_init_net) workspace.CreateNet(obj_train.model.net) ``` Saving using Export method from mobile_exporter ```python from caffe2.python.predictor.mobile_exporter import Export def save_checkpoint(model, init_net_name, params, path): init_net, predict_net = Export(workspace, model.net, params) with open(os.path.join(path, init_net_name), 'wb') as f: f.write(init_net.SerializeToString()) ``` Loading the model back ```python def load_trained_model(hp_space, path_to_file): workspace.ResetWorkspace() with core.DeviceScope(core.DeviceOption(caffe2_pb2.CUDA, 0)): train_model = ModelHelper(init_params=False) if hp_space['model'] == 'DenseNet': obj_train = DenseNet((1, 3, 224, 224), model=train_model, workspace_name='default', is_test=False) else: print('Please check hyper parameter name and model name') sys.exit(0) init_net_proto = caffe2_pb2.NetDef() with open(os.path.join(path_to_file, 'init_net_deploy.pb'), 'rb') as f: init_net_proto.ParseFromString(f.read()) train_model.param_init_net = train_model.param_init_net.\ AppendNet(core.Net(init_net_proto)) collect_params = [] for ops in train_model.InitProto().op: for blob_name in ops.output: collect_params.append(blob_name) train_model.net.Softmax(['fc'], 'softmax') workspace.FeedBlob('label', np.ones(4).astype(np.int32)) xent = train_model.LabelCrossEntropy(['softmax', 'label'], 'xent') loss = train_model.AveragedLoss(xent, 'loss') brew.accuracy(train_model, ['softmax', 'label'], 'train') train_model.AddGradientOperators([loss]) if hp_space['optimizer'] == 'adam': optimizer.build_adam(train_model, base_learning_rate=hp_space['learning_rate'], policy='step', stepsize=1, gamma=0.999) workspace.RunNetOnce(train_model.param_init_net) workspace.CreateNet(train_model.net, overwrite=True) ``` After the model is loaded ```python workspace.RunNet(train_model.net) # gives segmentation fault ```
caffe2
low
Minor
434,948,257
flutter
Add more tool analytics dimensions
Currently, the Usage.sendTiming sends a bunch of useful dimensions to the flutter run invocations such as success/failure, target platforms etc. But timing data is sampled and sendCommand / Screens should be the primary data gathering mechanism. But we don't have any data in terms dimensions besides the flutter tools command that was run. Add in things like success failure, target platform.
c: new feature,team,tool,P3,team-tool,triaged-tool
low
Critical
434,974,567
pytorch
The `unary_kernel` call should be pushed into CopyKernel.cpp and it should completely replace the current `copy_kernel`.
The `unary_kernel` call should be pushed into CopyKernel.cpp and it should completely replace the current `copy_kernel`. i.e. _copy_same_type__cpu should just be: ``` void _copy_same_type__cpu(Tensor& self, const Tensor& src) { if (self.is_same(src)) { return; } if (self.numel() == src.numel() && !(self.is_contiguous() && src.is_contiguous()) && copy_transpose_valid(self, src)) { _copy_same_type_transpose_(self, src); } copy_kernel(kCPU, *iter); } ``` You should also add an extra case to `unary_kernel` to handle the case where one operand is effectively a scalar (stride 0): `is_contiguous_s1` Here's the corresponding case for the binary_kernel: https://github.com/pytorch/pytorch/blob/3e0b46b6d132c22af84769a6df1ef8d1f785dbe2/aten/src/ATen/native/cpu/Loops.h#L21-L26 `is_contiguous_s1` should be the same but no check of `strides[2]` (because there are only two operands) _Originally posted by @colesbury in https://github.com/pytorch/pytorch/pull/18618/files_
module: cpu,triaged
low
Minor
434,979,127
TypeScript
Removing optional modifier also removes `undefined` from value type
<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section! Please help us by doing the following steps before logging an issue: * Search: https://github.com/Microsoft/TypeScript/search?type=Issues * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ Please fill in the *entire* template below. --> <!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.3.3333 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** NonPartial, remove optional modifier **Code** ```ts // A *self-contained* demonstration of the problem follows... // Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc. interface OptClass { opt?: number; } type NonPartialIsh = {[K in keyof OptClass]-?: OptClass[K] | undefined}; const test = {opt: undefined}; verify<NonPartialIsh>(test); // should NOT be error, but shows error function verify<T>(a: T) {} ``` **Expected behavior:** * Should not have any error. * `NonPartialish.opt` type should support `undefined`. **Actual behavior:** * Throws the following error: ``` ERROR(12,23): : Argument of type '{ opt: undefined; }' is not assignable to parameter of type 'NonPartialIsh'. Types of property 'opt' are incompatible. Type 'undefined' is not assignable to type 'number'. Transpiled code follows despite errors. ``` * `NonPartialish.opt` type does not support `undefined`. **Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> https://www.typescriptlang.org/play/#src=%2F%2F%20A%20*self-contained*%20demonstration%20of%20the%20problem%20follows...%0D%0A%2F%2F%20Test%20this%20by%20running%20%60tsc%60%20on%20the%20command-line%2C%20rather%20than%20through%20another%20build%20tool%20such%20as%20Gulp%2C%20Webpack%2C%20etc.%0D%0A%0D%0Ainterface%20OptClass%20%7B%0D%0A%20%20opt%3F%3A%20number%3B%0D%0A%7D%0D%0A%0D%0Atype%20NonPartialIsh%20%3D%20%7B%5BK%20in%20keyof%20OptClass%5D-%3F%3A%20OptClass%5BK%5D%20%7C%20undefined%7D%3B%0D%0A%0D%0Aconst%20test%20%3D%20%7Bopt%3A%20undefined%7D%3B%0D%0A%0D%0Averify%3CNonPartialIsh%3E(test)%3B%20%20%2F%2F%20should%20NOT%20be%20error%2C%20but%20shows%20error%0D%0A%0D%0Afunction%20verify%3CT%3E(a%3A%20T)%20%7B%20%7D%0D%0A **Related Issues:** <!-- Did you find other bugs that looked similar? -->
Bug
medium
Critical
434,995,966
go
net/http: roundtrip_js.go unusable in Node.js tests
<!-- Please answer these questions before submitting your issue. Thanks! --> ### What version of Go are you using (`go version`)? <pre> $ go version go version go1.12.3 darwin/amd64 </pre> ### Does this issue reproduce with the latest release? Yes. ### What operating system and processor architecture are you using (`go env`)? <details><summary><code>go env</code></summary><br><pre> $ go env GOARCH="amd64" GOBIN="" GOCACHE="/Users/fabioberger/Library/Caches/go-build" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin" GOPATH="/Users/fabioberger/Documents/projects/0x_project/go" GOPROXY="" GORACE="" GOROOT="/Users/fabioberger/.go" GOTMPDIR="" GOTOOLDIR="/Users/fabioberger/.go/pkg/tool/darwin_amd64" GCCGO="gccgo" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="" CGO_CFLAGS="-g -O2" CGO_CPPFLAGS="" CGO_CXXFLAGS="-g -O2" CGO_FFLAGS="-g -O2" CGO_LDFLAGS="-g -O2" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/91/m4w_p4fj06vc8vdzwqw7cqfc0000gn/T/go-build121993023=/tmp/go-build -gno-record-gcc-switches -fno-common" </pre></details> ### What did you do? I wrote a test that requires a network request to `localhost` using the `net/http` library, compiled it to WASM and attempted to run it using Node.js. In order to get it to work in a Node.js environment, I add a shim for `fetch` by requiring the `isomorphic-fetch` NPM package. ``` package main import ( "fmt" "net/http" ) func TestRequest(t *testing.T) { client := &http.Client{} req, err := http.NewRequest("GET", "http://localhost:8545", nil) if err != nil { t.Fatal(err) } _, err = client.Do(req) if err != nil { t.Fatal(err) } } ``` ### What did you expect to see? I expected the request to complete without an error. ### What did you see instead? ``` Post http://localhost:8545: dial tcp: Protocol not available ``` Digging into `roundtrip_js.go`, I found this check: ``` if useFakeNetwork() { return t.roundTrip(req) } ``` Where `useFakeNetwork` is defined as: ``` // useFakeNetwork is used to determine whether the request is made // by a test and should be made to use the fake in-memory network. func useFakeNetwork() bool { return len(os.Args) > 0 && strings.HasSuffix(os.Args[0], ".test") } ``` This logic means that _any_ test making a network request that gets compiled to WASM is re-routed to a fake in-memory network. Non-WASM tests do not exhibit this behavior. Is there any chance the core devs would consider making this behavior optional? Perhaps via an environment variable?
NeedsInvestigation,arch-wasm
low
Critical
435,011,295
flutter
On Windows, check if aria2, curl or wget are installed before downloading via BITS
**I'm just nitpicking**, I admit, but on my Windows systems I use [`Scoop`](https://github.com/lukesampson/scoop) and that allows me to install a bunch of commands like `aria2c`, `curl` and `wget`, all of which are incredibly faster than BITS. You see, I like to *not* have to wait for an eternity to download something that takes 20 seconds with another program. A solution to this would be to check if better tools are installed, then use those if available. <!-- Thank you for using Flutter! If you are looking for support, please check out our documentation or consider asking a question on Stack Overflow: * https://flutter.dev/ * https://docs.flutter.io/ * https://stackoverflow.com/questions/tagged/flutter?sort=frequent If you have found a bug or if our documentation doesn't have an answer to what you're looking for, then fill our the template below. Please read our guide to filing a bug first: https://flutter.dev/bug-reports/ --> ## Steps to Reproduce <!-- Please tell us exactly how to reproduce the problem you are running into. --> 1. Install Flutter 2. Run `flutter` ## Logs <!-- Include the full logs of the commands you are running between the lines with the backticks below. If you are running any "flutter" commands, please include the output of running them with "--verbose"; for example, the output of running "flutter --verbose create foo". --> ![flutter-bits](https://user-images.githubusercontent.com/10495562/56399267-e9a3ab00-621a-11e9-876a-a440af8bb7db.PNG)
c: new feature,tool,P3,team-tool,triaged-tool
low
Critical
435,023,886
pytorch
How to load PyTorch model with LSTM using C++ api
## 🐛 Bug <!-- A clear and concise description of what the bug is. --> ## To Reproduce Steps to reproduce the behavior: 1. Establish a PyTorch model with LSTM module using python, and store the script module after using torch.jit.trace. Python code like this: ```python class MyModule(nn.Module): def __init__(self, N, M): super(MyModule, self).__init__() self.lstm = nn.LSTM(M, M, batch_first=True) self.linear = nn.Linear(M, 1) def forward(self, inputs, h0, c0): output, (_, _) = self.lstm(inputs, h0, c0) output, _ = torch.max(output, dim=1) # output, _ = torch.max(inputs, dim=1) output = self.linear(output) return output batch_size = 8 h = 33 w = 45 model = MyModule(h, w) data = np.random.normal(1, 1, size=(batch_size, h, w)) data = torch.Tensor(data) h0, c0 = torch.zeros(1, batch_size, w), torch.zeros(1, batch_size, w) traced_script_module = torch.jit.trace(model, (data, h0,c0)) traced_script_module.save('model.pt') ``` 2. Load the model and move the model to GPU, then when the script exit, there is a core dump. However, If we don't move the model to gpu, the cpp script exits normally.My cpp script like this: ```c++ int main(int argc, const char* argv[]) { if (argc != 2) { std::cerr << "usage: example-app <path-to-exported-script-module>\n"; return -1; } // Deserialize the ScriptModule from a file using torch::jit::load(). std::shared_ptr<torch::jit::script::Module> module = torch::jit::load(argv[1]); assert(module != nullptr); std::cout << "ok\n"; this->module->to(at::Device("cuda:0")) vector<torch::jit::IValue> inputs; int b = 2, h = 33, w = 45; vector<float> data(b*h*w, 1.0); torch::Tensor data_tensor = torch::from_blob(data.data(), {b, h, w}.to(at::Device("cuda:0")); torch::Tensor h0 = torch::from_blob(vector<float>(1*b*w, 0.0), {b, h, w}).to(at::Device("cuda:0")); torch::Tensor c0 = torch::from_blob(vector<float>(1*b*w, 0.0), {b, h, w}).to(at::Device("cuda:0")); inputs.push_back(data_tensor); inputs.push_back(h0); inputs.push(c0); torch::Tensor output = module->forward(inputs).toTensor().cpu(); auto accessor = output.accessor<float, 2>(); vector<float> answer(b); for (int i=0; i<accessor.size(0); ++i){ answer[i] = accessor[i][0]; } cout << "predict ok" << endl; } ``` > Note: There is a bug to move init hidden state tensor of lstm to gpu [link](https://github.com/pytorch/pytorch/issues/15272) I use two methods to solve this problem, one is to specify the device in python model using hard code, another is to pass init hidden state as input parameter of forward in cpp script, which may cause a warning [link](https://discuss.pytorch.org/t/rnn-module-weights-are-not-part-of-single-contiguous-chunk-of-memory/6011/14) the gdb trace info like this: ```shell (gdb) where #0 0x00007ffff61ca9fe in ?? () from /usr/local/cuda/lib64/libcudart.so.10.0 #1 0x00007ffff61cf96b in ?? () from /usr/local/cuda/lib64/libcudart.so.10.0 #2 0x00007ffff61e4be2 in cudaDeviceSynchronize () from /usr/local/cuda/lib64/libcudart.so.10.0 #3 0x00007fffb945dcf4 in cudnnDestroy () from repo/pytorch_cpp/libtorch/lib/libcaffe2_gpu.so #4 0x00007fffb4fca17d in std::unordered_map<int, std::vector<at::native::(anonymous namespace)::Handle, std::allocator<at::native::(anonymous namespace)::Handle> >, std::hash<int>, std::equal_to<int>, std::allocator<std::pair<int const, std::vector<at::native::(anonymous namespace)::Handle, std::allocator<at::native::(anonymous namespace)::Handle> > > > >::~unordered_map() () from repo/pytorch_cpp/libtorch/lib/libcaffe2_gpu.so #5 0x00007fffb31fe615 in __cxa_finalize (d=0x7fffe8519680) at cxa_finalize.c:83 #6 0x00007fffb4dd3ac3 in __do_global_dtors_aux () from repo/pytorch_cpp/libtorch/lib/libcaffe2_gpu.so #7 0x00007fffffffe010 in ?? () #8 0x00007ffff7de5b73 in _dl_fini () at dl-fini.c:138 Backtrace stopped: frame did not save the PC ``` 3. When I remove the LSTM in python model, then the cpp script exits normally. 4. I guess the hidden state of LSTM cause the core dump, maybe relate to the release the init hidden state memory? <!-- If you have a code sample, error messages, stack traces, please provide it here as well --> ## Expected behavior So, When I want to load a model with LSTM using c++, how to deal with the hidden state, and how to avoid core dump? ## Environment PyTorch version: 1.0.1.post2 Is debug build: No CUDA used to build PyTorch: 10.0.130 OS: Ubuntu 18.04.2 LTS GCC version: (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0 CMake version: version 3.10.2 Python version: 3.6 Is CUDA available: Yes CUDA runtime version: 10.0.130 GPU models and configuration: GPU 0: GeForce RTX 2080 Ti GPU 1: GeForce RTX 2080 Ti Nvidia driver version: 410.48 cuDNN version: Could not collect Versions of relevant libraries: [pip3] numpy==1.16.0 [pip3] numpydoc==0.8.0 [pip3] torch==1.0.1.post2 [pip3] torchvision==0.2.2.post3 ## Additional context <!-- Add any other context about the problem here. -->
module: cpp,triaged
medium
Critical
435,160,732
vscode
[scss] Incorrect selector specificity in hover tooltip
<!-- Please search existing issues to avoid creating duplicates. --> <!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: https://code.visualstudio.com/insiders/ --> <!-- Use Help > Report Issue to prefill these. --> - VSCode Version: 1.33.1 - OS Version: Windows 10 Steps to Reproduce: 1. Type the code like ![image](https://user-images.githubusercontent.com/8168391/56423945-d3602280-62e0-11e9-88fc-8eb0bdc3f27d.png) 2. Move the mouse over `&__b` ![image](https://user-images.githubusercontent.com/8168391/56424018-128e7380-62e1-11e9-82d7-a5141b3c2b60.png) The selector specificity is displayed as (0, 0, 0) instead of the correct (0, 1, 0), it being a class selector. <!-- Launch with `code --disable-extensions` to check. --> Does this issue occur when all extensions are disabled?: Yes/No Yes.
bug,css-less-scss
low
Minor
435,161,931
TypeScript
flatMap errors when callback returns certain union types
<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨 Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section! Please help us by doing the following steps before logging an issue: * Search: https://github.com/Microsoft/TypeScript/search?type=Issues * Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ Please fill in the *entire* template below. --> <!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. --> **TypeScript Version:** 3.4.3 <!-- Search terms you tried before logging this (so others can find this issue more easily) --> **Search Terms:** flat, flatmap **Code** ```ts // Map<string, number[]> const myMap = new Map([ ['foo', [1, 2, 3]], ['bar', [4, 5, 6]] ]); // string[] const myArray = ['foo', 'bar', 'baz']; // (key: any) => number[] | undefined const mapFn = key => myMap.get(key); const flatMapped = myArray.flatMap(mapFn); ``` **Actual behavior:** With strict null checks on: ``` Argument of type '(key: any) => number[] | undefined' is not assignable to parameter of type '(this: undefined, value: string, index: number, array: string[]) => number | readonly number[]'. Type 'number[] | undefined' is not assignable to type 'number | readonly number[]'. Type 'undefined' is not assignable to type 'number | readonly number[]'. ts(2345) ``` Turning strict null checks off prevents the error as you might expect, but that's obviously not desirable. More generally, any callback that returns `foo[] | bar` (where `bar` is not compatible with `foo`) seems to run into the same issue. The `Map.prototype.get` example I've used here just seems like it would be a relatively common use case in particular (you'd typically follow it up by calling `.filter(Boolean)` or similar on the mapped result). **More code** Seeing if doing the operations separately will help: ```ts // (number[] | undefined)[] const mapped = myArray.map(mapFn); // any[] !! const flattened = mapped.flat(); ``` **Expected behavior:** `flatMapped`/`flattened` result to be inferred as `(number | undefined)[]`. **Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior --> Doesn't seem to be able to load the appropriate library definition, even with `/// <reference lib="es2019.array" />` **Related Issues:** <!-- Did you find other bugs that looked similar? --> #29604 seems to be related to the `.flat()` part.
Suggestion,Awaiting More Feedback
low
Critical
435,214,388
rust
Type alias definition changed during reexport
Consider the following crate (`test2`): ```rust pub trait Foo { } pub type FooDyn = dyn Foo; pub struct Bar; impl Bar { pub fn bar(&self) -> &FooDyn { unimplemented!(); } } ``` Documentation for this crate says that `FooDyn` and `bar` signatures are the following: ```rust type FooDyn = dyn Foo; pub fn bar(&self) -> &FooDyn ``` You can assume that according to the lifetime elision rules you will get the following equivalent signature: ```rust pub fn bar(&'a self) -> &'a FooDyn ``` However, it's not true. If you reexport `FooDyn` and `Bar` types in another crate (`test1`), you will get the following signatures in `test1` crate: ```rust type FooDyn = dyn Foo + 'static; pub fn bar(&self) -> &(dyn Foo + 'static) ``` One of the ways of resolving the issue is the following declaration: ```rust pub type FooDyn<'a> = dyn 'a + Foo; ``` As for me, it's strange to have `'static` lifetime here by default, so maybe there should be an error if lifetime is omitted.
T-rustdoc,C-bug
low
Critical
435,253,645
pytorch
C++ API 'nn::Sequential' has inconsistent behavior with python conterpart
## 🐛 Bug ## To Reproduce C++ version ```c++ class FakeNet : public torch::nn::Module { public: FakeNet() { id = register_module("id", nn::Sequential()); } torch::Tensor forward(torch::Tensor x) { // Runtime Error: Cannot call forward() on an empty Sequential return id->forward(x); } private: nn::Sequential id; }; ``` Python Version ```python class FakeNet(nn.Module): def __init___(self): self.id = nn.Sequential() def forward(self, x): x = id(x) # OK return x ``` `nn::Sequential` doesn't overload `operator()` like other functions (e.g., `nn::Conv2d, nn::BatchNorm`), while in its `forward` function, it has an `AT_CHECK` on `is_empty() == false`, which makes using `nn::Sequential` as identity function impossible. ## Suggestion The C++ version should implement `nn::Sequential::operator()(...)`, which should silently return x when `is_empty() == true`. ## Environment - PyTorch Version (e.g., 1.0.1):
module: cpp,triaged
low
Critical
435,254,548
godot
Importer cannot load materials before images
**Godot version:** 3.1 stable **OS/device including version:** Windows 10, GTX 1080, 419.67 **Issue description:** Imported a bunch of 3D Objects (Wavefront) and Textures at once. Godot couldn't load the Materials (.mtl) properly. **Steps to reproduce:** - Create a new Project - Close Godot - Make inside the Project a folder and put there some Wavefront Object with its Material Files - Put also the Textures inside the folder - Open godot and let it import everything - Try to place one of the Objects: no texture or material on it - Console also reports errors like: ``` ERROR: Couldn't open MTL file 'curve_01.mtl', it may not exist or not be readable. At: editor/import/resource_importer_obj.cpp:49 WARNING: _parse_material_library: OBJ: Ambient light for material 'street_01' is ignored in PBR At: editor/import/resource_importer_obj.cpp:67 ERROR: No loader found for resource: res://Models/Streets/street_base_01.png At: core/io/resource_loader.cpp:285 WARNING: _parse_material_library: OBJ: Ambient light for material 'street_01_NONE' is ignored in PBR At: editor/import/resource_importer_obj.cpp:67 ERROR: No loader found for resource: res://Models/Streets/street_base_01.png At: core/io/resource_loader.cpp:285 ```
bug,confirmed,usability,topic:import
low
Critical
435,256,029
godot
Thirdparty Base64 license is *possibly* missing
**Godot version:** **All** versions of Godot starting with **1.0**, maybe even **before the first release**. **Issue description:** **/thirdparty/misc/base64.[c|h]** (**/core/io/base64.[c|h]** in Godot 1.0) claim that the files are in public domain and provide a link to the site of the author. The same is stated in **/COPYRIGHT.txt**. However, there is no dedication to public domain in the provided link and I can't find even a mention of license or usage conditions/public domain dedication, even by searching their site with google. The author seems to have a github account with a [project that contains base64 code](https://github.com/edelkind/filthttp), but just like before, there is no license/dedication/conditions. Either there was a dedication and it was lost to time (couldn't find it even with Wayback Machine), or the "public domain" was attached by a mistake. The files might need to be removed and rewritten or replaced with another base64 library.
discussion,topic:thirdparty
low
Minor
435,278,129
pytorch
[jit] Bad error when calling `ScriptModule`s with attributes/parameters
```python class Vocab(torch.jit.ScriptModule): def __init__(self): self.i = torch.jit.Attribute(2, int) @torch.jit.script_method def forward(self, x): return x + self.i v = Vocab() @torch.jit.script def lookup(y): return v(y) ``` results in ``` for operator forward(Tensor x, int slot0) -> Tensor: argument slot0 not provided. @torch.jit.script def lookup(y): return v(y) ~ <--- HERE : @torch.jit.script def lookup(y): return v(y) ``` Script functions cannot call stateful modules, so this should produce an error but it should say something to that effect instead of a schema-mismatch.
oncall: jit,triaged
low
Critical
435,284,450
godot
Can't create function named "_text_changed" in LineEdit
**Godot version:** 3.1 **Issue description:** Trying to create a function named `_text_changed` without any arguments in a script which extends `LineEdit` works fine. Trying to add an argument creates an error: ![image](https://user-images.githubusercontent.com/8056898/56441078-18d61d00-62ec-11e9-8d19-4d6da274341e.png) The problem is, that I can't find the "parent's function". `void _text_changed()` doesn't seem to exist. **Steps to reproduce:** Create LineEdit. Attach a script. Add the line `void _text_changed(a):` Receive an error
bug,topic:core,confirmed
low
Critical
435,304,231
godot
Use the same region for equal images in Texture Atlas importer
<!-- Please search existing issues for potential duplicates before filing yours: https://github.com/godotengine/godot/issues?q=is%3Aissue --> **Godot version:** 1120b0b **OS/device including version:** 5.0.7-arch1-1-ARCH **Issue description:** Just a suggestion, atlas pack could be even better if we don't repeat the same textures like this example below: ![Captura de tela de 2019-04-19 17-59-12](https://user-images.githubusercontent.com/1387165/56443883-dd782600-62cc-11e9-8602-80f4cffa7371.png) I work with thousands of frames and some of them are repeated for some animations.
enhancement,topic:editor
low
Minor