sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: next.js
Issue: AMP and blocking fallback
Labels: Pages Router

_For context, I'm using Next ~~`9.5.5`~~ and `9.5.6-canary.11` to test this and building my site locally using `yarn next build` as well as deploying to Vercel._

I know this feature is still marked as unstable, but I'm having some trouble getting it to work with incrementally generated pages. If you look at the code below, you can see I'm building a page with the slug `about` at build time. I'm able to access the amp page for `about`, but for any other page that is incrementally built, it returns a 404 page if I add `.amp` or `?amp=1`.

After building the site, I tested it a bunch trying to get it to generate an AMP page incrementally. I have a page with slug `oss`. Initially accessing that page with `oss.amp` returned 404, but then it worked for about 30 seconds. After that, it went back to 404.
```
export const getStaticProps: GetStaticProps = async (ctx) => {  
  const slug = processNextQueryStringParam(ctx.params?.slug);

  const page = await getPage({
    slug
  });

  return {
    props: {
      page: page ?? null
    },
    revalidate: 60 // seconds
  }
};

export async function getStaticPaths() {
  return {
    paths: [
      { params: { slug: 'about' } }
    ],
    fallback: 'unstable_blocking'
  };
}

export const config = { amp: 'hybrid' }
```

_You can view the rest of the file [in this repo](https://github.com/daily-targum/daily-targum-website/blob/c919f5208861277c1ad9dbdb488cbc3d81c79ded/src/pages/page/%5Bslug%5D.page.tsx#L93)._

When I look at my `.next` folder, I can see it successfully generating all the AMP pages, but for some reason, they still return 404 when I try and access them. This seems like a bug that it generates the page, but I'm unable to access it.

![image](https://user-images.githubusercontent.com/5768801/96896133-29280480-145b-11eb-8aa7-ecee5c396199.png)

**Update**
I must have made a mistake. ISG hybrid AMP pages work with Next `9.5.5`, but only locally and not on Vercel.  If I update to `9.5.6-canary.11` it no longer works locally or on Vercel.

_Originally posted by @christianjuth in https://github.com/vercel/next.js/issues/15637#issuecomment-714589265_
Repository: rust
Issue: `std::thread::Builder::spawn()` panics
Labels: C-bug,T-libs,A-thread

When trying to create a large number of threads, `std::thread::Builder::spawn()` can panic rather than returning an error.

I wrote this:

```rust
fn main() {
    let n: usize = std::env::args().nth(1).unwrap().parse().unwrap();

    let mut threads = Vec::new();
    for i in 0..n {
        let b = std::thread::Builder::new();
        let t = b.spawn(|| {
            std::thread::sleep(std::time::Duration::from_secs(3));
        }).unwrap_or_else(|e| {
            println!("{}: {}", i, e);
            std::process::exit(1);
        });
        threads.push(t);
    }
    println!("spawned");
    for t in threads {
        t.join().unwrap();
    }
    println!("joined");
}
```

When run as `cargo run --release 10000` on my box this works as I expected: prints "spawned" in a half-second, "joined" three seconds after that. When run as `cargo run --release 100000` I get

```
thread '<unnamed>' panicked at 'failed to set up alternative stack guard page', 16341: Resource temporarily unavailable (os error 11)
library/std/src/sys/unix/stack_overflow.rs:156:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
```

From the documentation for `Builder::spawn()` I expected to get an `Err` back instead of the panic.

### Meta

`rustc --version --verbose`:
```
rustc 1.47.0 (18bf6b4f0 2020-10-07)
binary: rustc
commit-hash: 18bf6b4f01a6feaf7259ba7cdae58031af1b7b39
commit-date: 2020-10-07
host: x86_64-unknown-linux-gnu
release: 1.47.0
LLVM version: 11.0
```

My environment: current Debian Linux, 32GB memory.

Fails the same way on nightly 2020-10-25. No stack backtrace is available.
Repository: flutter
Issue: Run on ARM Android emulators on Apple Silicon
Labels: platform-android,tool,platform-mac,P3,team-android,triaged-android

Android emulators will not be able to use Rosetta, which does not support whole system virtualization, so will be running in native ARM and not Rosetta translated x86.

Track down places in the tool where x86 is used as a proxy for "Android emulator".

https://github.com/flutter/flutter/blob/e0ec9a06dc8d244a9abb623d0dc4c5001c53b899/packages/flutter_tools/lib/src/android/android_device.dart#L229-L234

Blocked on [b/162290052](https://b.corp.google.com/issues/162290052)
Repository: flutter
Issue: Better MPL support in LicensePage
Labels: c: new feature,framework,P3,team-framework,triaged-framework

If an application uses an MPL package ([example](https://pub.dev/packages/dbus)) then the developer "must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form" (section 3.2). Currently its up to developers to a) find all their transient MPL dependencies, and b) figure out how best display that information in their app. It would be nice if just as we have tooling and drop-in UI to satisfy the requirements of purely notice-based licenses, we solved this problem for users by having `LicensePage` and the supporting tooling embed links to the source (maybe the pub.dev release archive link for the used version when pulled from pub?) in that UI.
Repository: pytorch
Issue: [JIT] Tracing turns None Device Input into a Constant
Labels: oncall: jit,weeks

## 🐛  Bug Tracing turns None Device Input into a Constant 

```
def foo(x):
    return torch.zeros_like(x)

print(torch.jit.trace(foo, (torch.rand(4, 4))).code)
```
> def foo(x: Tensor) -> Tensor:
  _0 = torch.zeros_like(x, dtype=6, layout=0, device=torch.device("cpu"), pin_memory=False, memory_format=None)
  return _0

Ideally we would insert `device` as `None`, so that this trace could be reused with a different device. I suspect this is some tricky interaction w/Tensor Options, where we set the optional device at the python layer and then it's turned into a constant when the C++ layer is reached. 

We don't make any guarantees about traces working across dtypes/devices, but this would be a nice incremental improvement. 

Context: https://github.com/pytorch/pytorch/issues/46580



cc @gmagogsfm
Repository: rust
Issue: [ER] Array.max and min ?
Labels: T-libs-api,C-feature-request,A-const-generics

When you want to compute the max or min of three or more items you have various options:

```rust
fn main() {
    let (a, b, c, d) = (10, 20, 30, 40);
    let m0 = a.max(b).max(c).max(d);
    let m2: u32 = [a, b, c, d].iter().copied().max().unwrap();
}
```

You can also introduce a macro:

```rust
#![feature(min_const_generics)]

macro_rules! max {
    ($x:expr) => ($x);
    ($x:expr, $($xs:expr),+) => {
        {
            std::cmp::max($x, max!( $($xs),+ ))
        }
    };
}

fn main() {
    let (a, b, c, d) = (10, 20, 30, 40);
    let m1 = max!{a, b, c, d};
}
```

But an array method may solve the problem better, without macros (code untested) and without unwraps:

```rust
// This should statically require N > 0.
impl<T: Ord, const N: usize> [T; N] {
    fn max(self) -> T {
        let mut result = self[0];
        for &x in &self[1 .. ] {
            result = result.max(x);
        }
        result
    }
}

fn main() {
    let (a, b, c, d) = (10, 20, 30, 40);
    let m3a: u32 = [a, b, c, d].min();
    let m3b: u32 = [a, b, c, d].max();
}
```
Repository: pytorch
Issue: Fix the way imports are done to be more correct for static type checkers
Labels: module: typing,triaged,enhancement

## 🐛 Bug

There are a number of imports in torch of submodules that are implicitly reexported. E.g. you can do (and it is commonly done in examples):

```
import torch

torch.nn.<something>
```

In `__init__.py`, the submodules are imported as (using the `nn` example):

```
import torch.nn
```

But to be properly re-exported for static type checkers, this is not correct. Instead, something like:

```
import torch.nn as nn
```

is needed.



cc @ezyang @malfet @rgommers @xuzhao9 @gramster
Repository: pytorch
Issue: torch.autograd.backward() fails to sync with other stream
Labels: module: autograd,triaged

The new test written for https://github.com/pytorch/pytorch/pull/45787 suggests a possible failure scenario, which indeed occurs.  It is a race condition, most often encountered by ROCm CI.

https://github.com/pytorch/pytorch/pull/45787/files#diff-893b1eea27352f336f4cd832919e48d721e4e90186e63400b8596db6b82e7450R1772-R1773

Putting torch.cuda.synchronize() right after backward() fixes the problem.

_Originally posted by @mcarilli in https://github.com/pytorch/pytorch/pull/45787#issuecomment-717417098_

cc @ezyang @albanD @zou3519 @gqchen @pearu @nikitaved
Repository: flutter
Issue: in_app_purchase only retrieves google play purchase options after hot restart on a debug build
Labels: t: hot reload,p: in_app_purchase,package,team-ecosystem,P2,triaged-ecosystem

Running my app on release build, i am retrieving 0 items from the google play store. 

If i run on debug, the first launch is also empty, however, after i hot restart, now my in app purchases are retrieved. I am getting no errors. Have not tested iOS
Repository: TypeScript
Issue: export access modifiers
Labels: Suggestion,Awaiting More Feedback

<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨

Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker.

Please help us by doing the following steps before logging an issue:
  * Search: https://github.com/Microsoft/TypeScript/search?type=Issues
  * Read the FAQ, especially the "Common Feature Requests" section: https://github.com/Microsoft/TypeScript/wiki/FAQ

-->

## Search Terms

<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->
export access modifiers public protected private

Related: #321

## Suggestion

<!-- A summary of what you'd like to see added or changed -->
Allow adding `public`, `protected` and `private` access modifiers to export statements. This would limit where the data can be imported from.

### Access Modifiers

#### `private`

Other file in the same directory scope have access to the export.

#### `protected`

Other file in the same directory scope or a nested scope have access to the export.

#### `public` (default)

Current behavior - Can be access from anywhere.

## Use Cases

Most useful for large projects - allows modules to limit where things they expose are used.

## Examples

Given the following director structure:

```txt
.
├── module
│   ├── submodule
│   │   └── index.ts
│   ├── file.ts
│   └── index.ts
└── index.ts
```

```ts
// module/file.ts
public export const foo = "hello";
protected export const bar = "world";
private export const baz = "!!!";
```

```ts
// module/submodule/index.ts
import { foo, bar, baz } from '../file';
                // ^^^ Cannot access baz as is private.
```

```ts
// module/index.ts
import { foo, bar, baz } from './file'; // All Ok.
```

```ts
// index.ts
import { foo, bar, baz } from './module/file';
           // ^^^ Cannot access bar as is protected.
                // ^^^ Cannot access baz as is private.
```

Note: If using `import * as X from ...`, `X`'s type simply wouldn't include things it doesn't have access to.

## 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).
Repository: create-react-app
Issue: [CRA v4] Support on preloading/prefetching resources 
Labels: issue: proposal,needs triage

### Is your proposal related to a problem?
Currently, there is no native support on preloading or prefetching resources (e.g. fonts and CSS). The workaround is to write a node script to modify the generated `index.html`. Yet, users are not supposed to do that and this trick is quite dirty.

(Write your answer here.)

### Describe the solution you'd like

<!--
  Provide a clear and concise description of what you want to happen.
-->

(Describe your proposed solution here.)
Native support of  preloading or prefetching resource, which will be translated to something like:

Font:
```html
<link rel="preload" href="/static/media/font.woff2" as="font" type="font/woff2" crossorigin />
```

CSS:
```html
<link rel="preload" href="styles.css" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="styles.css"></noscript>
```
Repository: PowerToys
Issue: [KBM] Allow key combinations that put CAPSLOCK to a known state 
Labels: Idea-Enhancement,Product-Keyboard Shortcut Manager

## 📝 Control CAPSLOCK state in a more consistent manner

Allow keyboard remappings like these:


__LEFT-SHIFT+CAPSLOCK press:__  Always turn CAPSLOCK to a known state: ON

__LEFT-SHIFT press:__ Always turn CAPSLOCK to a known state: OFF, while simultaneously acting as LEFT-SHIFT key press

__CAPSLOCK press:__ Always turn CAPSLOCK to a known state: OFF, while simultaneously acting as CTRL key press

Toggling is just a bad user interface. Why has it persisted so long? Practically everyone hates it. CTRL is also in an awkward position leading to potential repetitive strain injury. This solves both problems similar to how old typewriters used to control their shift-lock feature.

- So while I'm typing if I bump CAPSLOCK by mistake, nothing will happen! Safe! 👍 
- And when I want it, I press SHIFT+CAPSLOCK just like an old typewriter. Consistent! 👍 
- Furthermore when I don't want it anymore I just press shift and it goes away. Convenient! 👍 
- Finally if I want to use CTRL a lot, the CAPSLOCK key by itself will double for that job! Healthy 👍  

---

If you'd like to see this feature implemented, add a 👍 reaction to this post.
Repository: pytorch
Issue: Change "_next_index()" in DataLoader to a public and stable API
Labels: module: dataloader,triaged,needs research

## 🚀 Feature
<!-- A clear and concise description of the feature proposal -->
Change "_next_index()" in DataLoader to a public and stable API.
## Motivation
When a training task is resumed in PyTorch, the DataLoader should be synchronized to its previous state. A straightforward way is to call `next(data_iter)` (`data_iter=iter(dataloader)`) multiple times, but actual data fetching will be executed and `collate_fn` will be called each time which is a huge waste and makes the synchronization process quite slow.  Now I have to call the internal `_next_index()` to skip data fetching and collation. I think it's worthwhile to make it a public API for the implementation of resumable training.


<!-- Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too -->

## Pitch

<!-- A clear and concise description of what you want to happen. -->
Change "_next_index()" in DataLoader to a public and stable API ("next_index()")

## Alternatives
Create another API for increasing the data index in DataLoader without actual data fetching or collation.
<!-- A clear and concise description of any alternative solutions or features you've considered, if any. -->

## Additional context
The internal API has changed from `next(data_iter.sample_iter)` to `data_iter._next_index()` in around version 1.2. It's not stable if it's not public.
<!-- Add any other context or screenshots about the feature request here. -->


cc @SsnL @VitalyFedyunin @ejguan
Repository: go
Issue: math/big: Implement fft algorithm
Labels: Performance,NeedsDecision


From #30943. I think it's time for us to add fft to the big package. This implements Schönhage–Strassen algorithm in math/big and increased the multiplication speed several times to tens of times (depending on the length of the input). Although it is still not as fast as in GMP( which uses an advanced and more complex algorithm), it should solve the bottleneck of Go in multiplication of very large numbers(#30943, for example).
The benchmark test data is as follows:
Mul-4                 12.5ms ± 1%      6.9ms ± 3%  -45.08%  (p=0.016 n=4+5)
NatMul/10-4            251ns ± 3%      267ns ± 6%   +6.28%  (p=0.008 n=5+5)
NatMul/100-4          8.64µs ± 3%     8.80µs ± 1%     ~     (p=0.310 n=5+5)
NatMul/1000-4          358µs ± 5%      355µs ± 3%     ~     (p=0.841 n=5+5)
NatMul/10000-4        12.6ms ± 2%      7.0ms ± 5%  -44.11%  (p=0.008 n=5+5)
NatMul/100000-4        545ms ± 4%       90ms ± 3%  -83.43%  (p=0.008 n=5+5)
NatMul/1000000-4       21.2s ± 2%       1.2s ± 4%  -94.33%  (p=0.008 n=5+5)
Repository: rust
Issue: add a warning on attributes that can be confused with global ones
Labels: A-lints,C-feature-request

I was asked by a person new to Rust why `#[allow(unused_variables)]` does not work in the following code.
```rust
#[allow(dead_code)]
#[allow(unused_variables)]

fn trip() {
}

fn main() {
 let a =1;
// println!("{}",a);
}
```

It would be nice to have a warning here that these attributes are for the next item, not for the whole file as one could think from their position in file. Probably a warning when there's a blank line between item body and its attributes would work.
Repository: storybook
Issue: Set ngClass/ngStyle from props
Labels: question / support,help wanted,angular

Apologies, I'm still a bit of a noob writing stories with Storybook. When building out angular component stories, I'd like to be able to set a class to style the component in different ways. Currently I'm using templates to perform that:

```ts
export const Flashing = args => ({
  moduleMetadata: {
    imports: [DotModule],
  },
  template: `
  <app-dot
    [color]="color"
    [ngClass]="ngClass"
  ></app-dot>
  `,
  props: {
    color: '#00F',
    ngClass: DotState.Flashing
    ...args,
  },
});
```

I'd actually much prefer the following format, but it doesn't seem to work:

```ts
export const Flashing = args => ({
  moduleMetadata: {
    imports: [DotModule],
  },
  component: DotComponent,
  props: {
    color: '#00F',
    ngClass: ['flashing'],
    ...args,
  },
});
```

I'd be happy to help if this makes any sense to implement or there are no proposed alternatives.
Repository: godot
Issue: Cannot export `Variant` in GDScript 2.0
Labels: bug,discussion,topic:gdscript

**Godot version:**
a4f70d7e6cb2b83f152717a69c9c042dd9424fc9


**OS/device including version:**
Windows 10.


**Issue description:**
Try to export `Variant`:

![godot_export_variant_error](https://user-images.githubusercontent.com/17108460/97574907-95bf7800-19f4-11eb-83c2-373a98449b01.png)

This should be possible because it's possible to do in C++, as seen in https://github.com/godot-extended-libraries/json, with `PROPERTY_USAGE_NIL_IS_VARIANT` (which is *not* exposed to scripting either).

See also godotengine/godot-proposals#1740.

**Steps to reproduce:**
Write this script:
```gdscript
class_name JSONResource extends Resource

@export var data: Variant
@export var json: String
```

**Minimal reproduction project:**
[godot_export_variant.zip](https://github.com/godotengine/godot/files/5458369/godot_export_variant.zip)
Repository: flutter
Issue: Document CameraException error codes.
Labels: team,d: api docs,p: camera,package,team-ecosystem,P3,triaged-ecosystem

In the camera plugin - it's unclear what are the possible values of [CameraException.code](https://github.com/flutter/plugins/blob/8a613b9c55e4b52a7e815eeaafdf39d68176cb72/packages/camera/lib/camera.dart#L131).
Repository: pytorch
Issue: Tensor subclasses lose type when pickling
Labels: module: serialization,triaged,enhancement,module: __torch_function__

## 🐛 Bug

Pickling and then unpickling a subclass of `Tensor` should result in an object of the same class as what was pickled. However, it doesn't - instead it always creates something of class `Tensor`.

## To Reproduce

The following prints `torch.Tensor`, however it should print `_T`.

```
class _T(torch.Tensor): ...
t = tensor([1]).as_subclass(_T)
print(type(pickle.loads(pickle.dumps(t))))
```

## Expected behavior

It should print `_T`.

## Environment

`torch.__version__` == 1.7.0, running on Ubuntu.

## Additional context

Placing the following method in the base class resolves the problem:

```
    def __reduce_ex__(self,proto):
        torch.utils.hooks.warn_if_has_hooks(self)
        args = (type(self), self.storage(), self.storage_offset(), tuple(self.size()), self.stride())
        if self.is_quantized: args = args + (self.q_scale(), self.q_zero_point())
        f = _fa_rebuild_qtensor if self.is_quantized else  _fa_rebuild_tensor
        return (f, args + (self.requires_grad, OrderedDict()))
```

Perhaps something like this could be used to fix this issue.

cc @hameerabbasi @rgommers @mruberry
Repository: create-react-app
Issue: [v4] Bug: React 17, React is not defined after ejecting
Labels: issue: bug,contributions: up for grabs!,issue: needs investigation,good first issue

React version: 17.0.1

## Steps To Reproduce

1. npx create-react-app my-app
2. cd my-app
3. npm start (Works like a charm)
4. npm run eject
5. npm i
6. npm start (ReferenceError: React is not defined)

Link to code example: https://codesandbox.io/s/ecstatic-wood-ou6px

<!--
  Please provide a CodeSandbox (https://codesandbox.io/s/new), a link to a
  repository on GitHub, or provide a minimal code example that reproduces the
  problem. You may provide a screenshot of the application if you think it is
  relevant to your bug report. Here are some tips for providing a minimal
  example: https://stackoverflow.com/help/mcve.
-->

## The current behavior
I upgraded react to 17 and removed "import React"s from my project files (except index.js where react mounted). But I got "ReferenceError: React is not defined" in those files.
To investigate the issue behind this, I created a new react app, the new JSX transformation was working. But when I eject, it throws the same errors.
So;
Without react-scripts, new JSX transformation doesn't working.

## The expected behavior
Components should render without declaring React (import React from "react") if React is in scope.
Repository: rust
Issue: Compiler doesn't warn on infinite recursion in trait's method
Labels: C-enhancement,A-lints

Example: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=4782b3bebc1e92369e5ff7b3c5b4a6e1

Visible on both stable and nightly.

Compiler warns on infinite recursion in case of regular method:

```rust
impl AsyncTokioTimer<RawTimer> {
    #[inline]
    ///Creates new instance
    pub fn new(_time: time::Duration) -> Self {
        Self::new(_time)
    }
}
```

Compiler doesn't issue the same warning in case of trait's method

```rust
impl<T: TimerFd> Timer for AsyncTokioTimer<T> {
    fn new(timeout: time::Duration) -> Self {
        debug_assert!(timeout.as_millis() <= u32::max_value().into());
        Self::new(timeout)
    }
}
```

I suspect it should?