sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: flutter
Issue: Sharing constants between Flutter, Android, and iOS code
Labels: c: new feature,tool,P2,team-tool,triaged-tool

.. to reduce risks associated with duplication (values going out of sync).

Is there perhaps a solution for this already?

It would be especially useful when using platform channels, for the channel and argument names.
(-> sharing constants between Flutter, Android, iOS code)

But I assume it could be useful for any other configuration values as well that are used only in native code.
(-> sharing constants between Android, iOS code)

I guess a simple properties file at the project root could do, and generate the Dart, Java, Swift source file from it (a class having String constant fields), with a Gradle task.
(Android has something similar with BuildConfig file which has generated fields from gradle configuration.)

Example:

`project_config.properties` file at project root:
```properties
calendarSubscriptionChannel=calendarChannel
calendarUrl=calendarUrl
calendarTitle=calendarTitle
```

`project_config.dart` Dart file:
```dart
class ProjectConfig {
    static const String calendarSubscriptionChannel = 'calendarChannel';
    static const String calendarUrl = 'calendarUrl';
    static const String calendarTitle = 'calendarTitle';
}

```
`ProjectConfig.java` Java file:
```java
class ProjectConfig {
    public static final String calendarSubscriptionChannel = "calendarChannel";
    public static final String calendarUrl = "calendarUrl";
    public static final String calendarTitle = "calendarTitle";
}
```
Swift file:
```swift
// I don't know Swift.. :)
```
Repository: neovim
Issue: :substitute and preserve case of replaced text
Labels: enhancement,needs:vim-patch

FEATURE REQUEST:
New flag for the substitute command (:substitute / :s) to
perform search and replace while keeping the case.


Hello,

in Vim/NeoVim/MacVim/gVim there is currently no built-in solution
to run search-and-replace in a way that the replacement text
has the same lower and upper case letters as the replaced text.

We suggest to add a new flag [k] that enables this behaviour.

k == keep

EXAMPLE:
-------------
foo
Foo
FOO
-------------
:%s/foo/bar/k
-------------
bar
Bar
BAR
-------------

I guess the k flag would implicitly also activate the i flag.

Additionally it could also be activated globally by extending the
options "ignorecase" and "smartcase" with a new setting e.g. "keepcase".

There is a plug-in called abolish.vim by Tim Pope that provides
this feature, but we have the opinion that it could be built-in.
https://github.com/tpope/vim-abolish

Even the "enemy" has it built-in.
http://ergoemacs.org/emacs/emacs_find_replace.html


Thanks for thinking about it.


Best regards,

International Vim User Group on Telegram
Repository: godot
Issue: RichTextLabel::_process_line error makes Godot unresponsive during One-Click Deploy
Labels: bug,topic:editor,usability,high priority

<!-- Please search existing issues for potential duplicates before filing yours:
https://github.com/godotengine/godot/issues?q=is%3Aissue
-->

**Godot version:**
<!-- Specify commit hash if non-official. -->
3.02

**Issue description:**
<!-- What happened, and what was expected. -->
I have changed nothing in my program, but out of nowhere I can't One-Click Deploy my app to my phone without Godot freezing and the terminal goes to an endless loop saying:

"error: richtextlabel::_process_line: index line=0 out of size"

This may not be enough info, but again everything was running fine, then out of nowhere this is occurring.
Repository: rust
Issue: Tracking issue for generalized two-phase borrows
Labels: C-enhancement,P-medium,A-NLL,C-tracking-issue,NLL-complete,S-tracking-design-concerns,T-types

This can be sort-of considered a tracking issue for the implementation of rust-lang/rfcs#2025

Right now, two phase borrow support can only handle the very simple case where there is exactly one activation point. In particular, this means we can't expose two-phase borrows to user code since the following wouldn't work:

```rust
let x = &mut some_val;
if some_cond {
   *x = 1;
} else {
   *x = 2;
}
```
We also intentionally limit two-phase borrows to a very narrow subset of its possible applications; specifically cases where the compiler is injecting mutable auto borrows which are used as method/function parameters. In practice, this covers the following cases:

 - using `x.some_method()` syntax, where some_method takes &mut self
 - using `Foo::some_method(&mut x, ...)` syntax
 - binary assignment operators (+=, -=, *=, etc.) Note this does /not/ include `IndexMut` operations at this time

Basically, things that desugar to method calls with a mutable self parameter with the exception of `IndexMut`. The intention with these restrictions is leverage two-phase borrows to make MIR borrowck accept AST borrowck can, without introducing too much new flexibility (ref #48431 for a more detailed discussion of how and why this came to be). The eventual intention (per rust-lang/rfcs#2025) is to extend this to the general case outlined above, which is what this issue tracks.
Repository: vscode
Issue: Issue reporter - disable extensions should be a button and not a link
Labels: feature-request,issue-reporter

Testing #46595
It is great that you can disable all extensions from the issue reporter. However, I got tricked by the fact that the action is triggered by a link. 

![image](https://user-images.githubusercontent.com/172399/38014976-a2a1c358-326a-11e8-8914-369124d0e96c.png)

I was expecting that the link points me to some documentation for how to do it. I therefore suggest that the link is replaced with a button `disable all extensions`. There could still be a link that points to the documentation for how to enable/disable extension (should cover the uninstall/install from the command line when an extension runs amoc on startup).
Repository: rust
Issue: Reject bounds in type aliases with edition 2024
Labels: A-type-system,C-enhancement,A-trait-system,T-lang,WG-epoch,T-types

I propose to make the `type_alias_bounds` lint deny-by-default with the next edition. See <https://github.com/rust-lang/rust/issues/21903> for more information on the issue being linted, and https://github.com/rust-lang/rust/pull/48326 and https://github.com/rust-lang/rust/pull/48909 for the PRs implementing the lint.

Cc @nikomatsakis @Manishearth (and Manish told me to also Cc someone else but I forgot whom)
Repository: You-Dont-Know-JS
Issue: Async & Performance Chapter 3: Promises - ReferenceError instead of TypeError
Labels: for second edition

https://github.com/iDanbo/You-Dont-Know-JS/blob/master/async%20%26%20performance/ch3.md#swallowing-any-errorsexceptions

```javascript
var p = new Promise( function(resolve,reject){
	resolve( 42 );
} );

p.then(
	function fulfilled(msg){
		foo.bar();
		console.log( msg );	// never gets here :(
	},
	function rejected(err){
		// never gets here either :(
	}
);
```

I get a `ReferenceError: foo is not defined` instead of `TypeError`.  Is it a typo?
As I understood, the error will be caught anyway because of the spec changes, so running the code in Chrome will give `Uncaught (in promise) ReferenceError: foo is not defined`. But where is the `TypeError`?
Repository: rust
Issue: Try different Deref/PartialEq orderings before erroring
Labels: C-enhancement,A-diagnostics,T-compiler,A-inference,D-confusing

I just got this error:

```rust
djc@djc-mbp cargo $ cargo check
   Compiling cargo v0.27.0 (file:///Users/djc/src/cargo)
error[E0308]: mismatched types
   --> src/cargo/core/summary.rs:150:58
    |
150 |                 dependencies.iter().find(|d| d.name() == dep_name)
    |                                                          ^^^^^^^^ expected struct `core::interning::InternedString`, found &str
    |
    = note: expected type `core::interning::InternedString`
               found type `&str`
```

`InternedString` implements `Deref<Target = str>`, so I'd expected that this could somehow be made to work. `*d.name() == *dep_name` seems to work, but dereferencing explicitly always feels bad. Is there a better way out here? If not, could this solution be suggested?

cc @estebank @ehuss
Repository: puppeteer
Issue: Headless PDF printing inconsistent page width and height
Labels: bug,upstream,chromium,confirmed

I'm currently encountering some potential rounding issues with the PDF page size where I have to use an additional few 10ths of a millimetre on the width and height for the pages, the `@page`s declaration in my CSS, and also the CSS height of my `section`s to render (mostly) correctly.

Even after adding the extra mm to cover the issue, the width then increases by about 1-2mm on either side of the page, only when Puppeteer is used to generate the PDF, but not when printed as PDF directly from my local Chrome (65.0.3325.181).

The removal of the additional mm breaks the layout in both local Chrome and puppeteer rendered PDFs.

Possibly similar issue to #666.

**Tell us about your environment:**

* Puppeteer version: 1.2.0
* Platform / OS version: MacOS 10.13.3
* URLs (if applicable): https://gist.github.com/Jarrydcrawford/9b64fc289e58d990aa4a8990331538e4
* Node.js version: 8.10.0

**What steps will reproduce the problem?**

```js
const puppeteer = require('puppeteer');
const fs = require('fs');

const DELTA = 0.27; // closest additional mm to not break layout

(async () => {
  let browser;
  try {
    browser = await puppeteer.launch({
      headless: true,
      args: [
        '--no-sandbox',
        '--disable-setuid-sandbox',
        '--disable-gpu',
        '--hide-scrollbars',
        '--disable-web-security',
      ],
    });
    const page = await browser.newPage();
    await page.goto(
      `data:text/html,${fs.readFileSync('index.html').toString('utf8')}`,
    );
    await page.pdf({
      path: './index.pdf',
      displayHeaderFooter: false,
      printBackground: true,
      pageRanges: '1-2',
      height: 139 + DELTA + 3 + 3 + 'mm', // Additional page margins of 3mm
      width: 550 + DELTA + 3 + 3 + 'mm', // Additional page margins of 3mm
      margin: {
        top: 0,
        right: 0,
        bottom: 0,
        left: 0,
      },
    });
    await browser.close();
  } catch (err) {
    if (browser) {
      await browser.close();
    }
    throw err;
  }
})();
```

1. `node index.js`.
2. Open PDF.
3. Open HTML file directly in Chrome browser.
4. Print as PDF.
5. Compare (may have to zoom in to see).

**What is the expected result?**

PDF should not have any margin/whitespace on the page edges.

**What happens instead?**

There is a horizontal page gap on either side of each page of about 1mm.
Should not need to use any additional mm adjustment - raw sizes should render as expected.
Repository: pytorch
Issue: Repeated 'python setup.py install' with clang leads to -lcpuinfo not found
Labels: module: build,triaged

Steps to reproduce:

```
docker run -it registry.pytorch.org/pytorch/pytorch-linux-xenial-py3-clang5-asan:169 /bin/bash
cd ~
git clone https://github.com/pytorch/pytorch
cd pytorch
CC=clang CXX=clang++ LDSHARED='clang --shared' LDFLAGS=-stdlib=libstdc++ NO_CUDA=1 python setup.py build_deps develop
CC=clang CXX=clang++ LDSHARED='clang --shared' LDFLAGS=-stdlib=libstdc++ NO_CUDA=1 python setup.py build_deps develop
```

Error message:

```
/usr/bin/ld: cannot find -lcpuinfo
clang: error: linker command failed with exit code 1 (use -v to see invocation)
src/ATen/CMakeFiles/ATen.dir/build.make:3388: recipe for target 'src/ATen/libATen.so.1' failed
make[2]: *** [src/ATen/libATen.so.1] Error 1
CMakeFiles/Makefile2:147: recipe for target 'src/ATen/CMakeFiles/ATen.dir/all' failed
make[1]: *** [src/ATen/CMakeFiles/ATen.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
```

cc @malfet @seemethere @walterddr
Repository: neovim
Issue: writedelay cannot be canceled
Labels: bug,ui

Using `:set writedelay=10` and then calling `:redraw!` cannot be canceled using `Ctrl-c`: Neovim will stop the delayed redrawing, but appears to still apply the delays, i.e. it takes a while until the screen is updated and it accepts input again.
Vim behaves better in this regard.

NVIM v0.2.3-901-ga9c94f7bb
Repository: pytorch
Issue: [feature request] DC-ASGD (Delay Compensated Asynchronous Stochastic Gradient Descent)
Labels: oncall: distributed,module: optimizer,triaged

DC-ASGD is an optimizer described in this [paper](https://arxiv.org/abs/1609.08326)

Frameworks like [MXNET](https://mxnet.apache.org/api/python/optimization/optimization.html#mxnet.optimizer.DCASGD) have the feature, are there plans to implement this feature into PyTorch? 

If approved by community, I would like to start the process of a feature request. I'm happy to create a pull request and implement the code after discussion.
Repository: go
Issue: cmd/compile: opt: reuse interface payload during interface conversion
Labels: Performance,compiler/runtime

The current representation of interface values is a two-word (type, data) pair where data is always a reference; multiword values such as strings must be copied to a hidden variable whose address is saved in the data field.  The compiler is currently smart about avoiding unnecessary allocations in some cases, such as this one:

```
func f(x interface{}) interface{} {
    return x.(string)
}
```

However, if the interface type has methods, the compiler does not appear to perform this optimization:

```
type S string
func (S) f() {}
type I interface{ f() }
func f(x interface{}) I {
        return x.(S) // calls runtime.convT2Istring
}
```

It would be nice if it did; I suspect the hard part is mostly done already.

The fact that assigning a string value to an interface variable allocates memory caught me out when I first noticed it in a profile.
Repository: flutter
Issue: Friction adding swift plugin to objective-c project
Labels: platform-ios,tool,a: first hour,t: xcode,P2,a: plugins,team-ios,triaged-ios

`flutter create` a non-swift project

In `pubspec.yaml`, add a swift plugin such as `flutter_iap`.

1. `flutter run` warns about `use_frameworks!` from `pod install`. Easy to resolve so far.
2. Building gives `The “Swift Language Version” (SWIFT_VERSION) build setting must be set to a supported value for targets which use Swift. This setting can be set in the build settings editor.` error. 
Seems like swift pod developers need to specify 
`s.pod_target_xcconfig = { 'SWIFT_VERSION' => <a version above 2.3 for it to work with Xcode 9> }` 
in their podspec. Added temporary hack in Podfile with 
```ruby
post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['SWIFT_VERSION'] = '3.2'
    end
  end
end
```
and re-`pod install`
3. 
``` 
#import "Headers/flutter_iap-umbrella.h"
            ^
   .../ios/Pods/Target Support Files/flutter_iap/flutter_iap-umbrella.h:13:9: error: include of non-modular header inside framework module 'flutter_iap': '.../.pub-cache/hosted/pub.dartlang.org/flutter_iap-1.0.1/ios/Classes/FlutterIapPlugin.h'
```
Add 
```ruby
pre_install do |installer|
  # workaround for https://github.com/CocoaPods/CocoaPods/issues/3289
  Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
end
```
and 
```ruby
post_install do |installer|
  installer.pods_project.targets.each do |target|
    # workaround for https://github.com/CocoaPods/CocoaPods/issues/7463
    target.headers_build_phase.files.each do |file|
      file.settings = { 'ATTRIBUTES' => ['Public'] }
    end
  end
end
```
to make it work.

Wonder if we can add some automatic handling of swift plugins in the default objective-c project's Podfile
Repository: youtube-dl
Issue: [ninateka] "unsupported" error.
Labels: site-support-request

Hello, I am using windows version 2018.03.26.
This site http://ninateka.pl/ return "unsupported" error.

**url examples:**
http://ninateka.pl/film/2007-macbeth
http://ninateka.pl/film/swiadkowie-albo-nasza-mala-stabilizacja-jerzy-jarocki

**Below one feedback:**
youtube-dl -v "http://ninateka.pl/film/2007-macbeth"
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'http://ninateka.pl/film/2007-macbeth']
[debug] Encodings: locale cp1250, fs mbcs, out cp852, pref cp1250
[debug] youtube-dl version 2018.03.26.1
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.16299
[debug] exe versions: none
[debug] Proxy map: {}
[generic] 2007-macbeth: Requesting header
WARNING: Could not send HEAD request to http://ninateka.pl/film/2007-macbeth: HTTP Error 500: Internal Server Error
[generic] 2007-macbeth: Downloading webpage
WARNING: Falling back on generic information extractor.
[generic] 2007-macbeth: Extracting information
ERROR: Unsupported URL: http://ninateka.pl/film/2007-macbeth
Traceback (most recent call last):
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph9lcnopy\build\youtube_dl\YoutubeDL.py", line 785, in extract_info
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph9lcnopy\build\youtube_dl\extractor\common.py", line 440, in extract
  File "C:\Users\dst\AppData\Roaming\Build archive\youtube-dl\rg3\tmph9lcnopy\build\youtube_dl\extractor\generic.py", line 3143, in _real_extract
youtube_dl.utils.UnsupportedError: Unsupported URL: http://ninateka.pl/film/2007-macbeth


Thanks for your answer.
Repository: youtube-dl
Issue: Add support for orfium.com
Labels: site-support-request

- [x] I've **verified** and **I assure** that I'm running youtube-dl **2018.03.26.1**

### Before submitting an *issue* make sure you have:
- [x] At least skimmed through the [README](https://github.com/rg3/youtube-dl/blob/master/README.md), **most notably** the [FAQ](https://github.com/rg3/youtube-dl#faq) and [BUGS](https://github.com/rg3/youtube-dl#bugs) sections
- [x] [Searched](https://github.com/rg3/youtube-dl/search?type=Issues) the bugtracker for similar issues including closed ones
- [x] Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

### What is the purpose of your *issue*?
- [ ] Bug report (encountered problems with youtube-dl)
- [x] Site support request (request for adding support for a new site)
- [ ] Feature request (request for a new functionality)
- [ ] Question
- [ ] Other

### If the purpose of this *issue* is a *bug report*, *site support request* or you are not completely sure provide the full verbose output as follows:

```
$ youtube-dl -v https://www.orfium.com/track/694466/misery-aciou/
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['-v', 'https://www.orfium.com/track/694466/misery-aciou/']
[debug] Encodings: locale UTF-8, fs utf-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.03.26.1
[debug] Python version 3.5.4 (CPython) - Linux-4.15.1-gentoo-x86_64-AMD_Ryzen_7_1800X_Eight-Core_Processor-with-gentoo-2.4.1
[debug] exe versions: ffmpeg 3.3.6, ffprobe 3.3.6
[debug] Proxy map: {}
[generic] misery-aciou: Requesting header
WARNING: Falling back on generic information extractor.
[generic] misery-aciou: Downloading webpage
[generic] misery-aciou: Extracting information
[generic] a281276f-8126-48aa-98ad-9121c282e6eb-1522252311-preview: Requesting header
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'https://cdn.orfium.com/tracks/a281276f-8126-48aa-98ad-9121c282e6eb-1522252311-preview.mp3'
[download] Destination: a281276f-8126-48aa-98ad-9121c282e6eb-1522252311-preview-a281276f-8126-48aa-98ad-9121c282e6eb-1522252311-preview.mp3
[download] 100% of 2.33MiB in 00:00

```

---

### If the purpose of this *issue* is a *site support request* please provide all kinds of example URLs support for which should be included (replace following example URLs by **yours**):
- Single track: https://www.orfium.com/track/694466/misery-aciou/

---

### Description of your *issue*, suggested solution and other information

Site seems to be new, less horrible version of soundcloud.

Generic fallback extractor pulls 1m preview tracks.
Even though full tracks are easily available and scheme seems to be pretty straightforward:
Preview - https://cdn.orfium.com/tracks/a281276f-8126-48aa-98ad-9121c282e6eb-1522252311-preview.mp3
Full track - https://cdn.orfium.com/tracks/a281276f-8126-48aa-98ad-9121c282e6eb-1522252307.mp3

Could not find a single playlist on the site though - every lookup returns empty. Not sure if they are implemented yet.
Repository: vue
Issue: root opts attributes support
Labels: feature request

### What problem does this feature solve?
The desired opts feature should offer the possibility to provide data from the markup (mostly from backend) to the vue instance.
So you can pass options/params from outside the vue scope. Example use case:
https://forum.vuejs.org/t/passing-props-to-root-instances-in-2-0/244

Right now this requires custom helpers/code to pipe the data through to the component.
Much better would be a more comfortable way similar the way riot does it with opts
http://riotjs.com/api/#mounting


### What does the proposed API look like?
Since the instance root is not a custom tag (compared to riot) I can imagine using prefixed attributes e.g. `data-opt-[NAME]`
So the root may look like this:
```html
<div id="myRoot" data-opt-firstname="John" data-opt-lastname="Smith"></div>
```
and within the template you can access it as
```
<template>
    <span>Hello {{ opts.firstname }} {{ opts.lastname }}</span>
</template>
```

<!-- generated by vue-issues. DO NOT REMOVE -->
Repository: scrcpy
Issue: Request: even on split window mode, changing orientation changes the window size
Labels: feature request,window

Steps:
1. Have 2 windows on Windows OS, side by side, using the split window mode:
https://www.digitaltrends.com/computing/how-to-split-your-screen-in-windows-10/
One of Chrome (for example), and one of this tool.

2. On the device, change its orientation.

There is an issue with this:
The window of the tool exits split mode, and if it was portrait, its window is even partially outside of the screen.

See video:
[ice_video_20180329-142158.zip](https://github.com/Genymobile/scrcpy/files/1859844/ice_video_20180329-142158.zip)

What I'd like, is the ability to stay on same window size, especially on this case.
Repository: TypeScript
Issue: Support max-line-length in organize imports
Labels: Suggestion,Domain: Formatter,Domain: Organize Imports,Experience Enhancement

Referenced in https://github.com/Microsoft/TypeScript/issues/22974

> By the way, I ran "organize imports" on about 800 files. Works really well other than this problem and it puts imports that were previously on multiple lines onto one... so that will break my linting rule for "max-line-length". Luckily it's easy to write a script to investigate and break them back onto multiple lines 😄