sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: next.js
Issue: Incremental Static Regeneration replaces `.amp` with `?amp=1`
Labels: good first issue,Pages Router

# Bug report

## Describe the bug

- When the page is built with Amp and SSG config, the output url of amp page becomes `/foo.amp` (routing is `pages/[slug]`)
- In the build phase, the non-amp page `/foo` refers to `/foo.amp` in `<link rel="amphtml">` correctly.
- However when Incremental Static Regeneration is turned on, the `/foo.amp` is replaced with `/foo?amp=1`

## To Reproduce

set
- amp: "hybrid"
- add `unstable_revalidate: 30` to getStaticProps return value.

reproduce:
https://github.com/wawoon/next-amp-ssg-reproduce

yarn build
yarn start
go to `http://localhost:3000/foo`

## Expected behavior

The non amp page should always refer to`/foo.amp` in `<link rel="amphtml">` tag even if Incremental Static Regeneration is turned on.

## Screenshots

initial access:

<img width="1042" alt="スクリーンショット 2020-06-17 12 59 06" src="https://user-images.githubusercontent.com/36811303/84853875-27a89300-b09b-11ea-85b7-5b9cba21fab2.png">

after 30sec

<img width="1017" alt="スクリーンショット 2020-06-17 12 59 35" src="https://user-images.githubusercontent.com/36811303/84853964-59b9f500-b09b-11ea-8945-93c680da978a.png">

## System information

- macOS
- Chrome
- Next: 9.4.5-canary.12
- Node: v12.14.1

## Additional context

https://github.com/vercel/next.js/issues/13038
https://github.com/vercel/next.js/pull/13046
Repository: storybook
Issue: Opt-in to *not* re-mount in React on HMR
Labels: feature request,react,core

**Is your feature request related to a problem? Please describe.**
Long discussion on this here: https://github.com/storybookjs/storybook/issues/10616

The idea is that if you are willing to forgo React Hooks in your stories + decorators (instead you can just render components that use hooks), you can alter your stories (specifically the *args*) and not have the component remount, just like if you "edit" args via the controls addon.

**Describe the solution you'd like**

1. Add a parameter `parameters.react.remountOnHMR` that changes this line not to use JSX/`React.createElement`: 
https://github.com/storybookjs/storybook/blob/a2e2ac8fab073ebf58e92a720400ba5c4b801746/app/react/src/client/preview/render.tsx#L61

2. Pass `implementationChanged` in `RenderContext` so we can not force a remount here: https://github.com/storybookjs/storybook/blob/a2e2ac8fab073ebf58e92a720400ba5c4b801746/app/react/src/client/preview/render.tsx#L70-L72

Note doing 2 alone will have no effect without doing 1 as react will see `<StoryFn>` as a new component and remount it (as `StoryFn` is different). However `StoryFn()` may return something that has not changed in the two implementations.

3. Document the above.

4. Investigate if 2. should/could be applied to other frameworks.
Repository: pytorch
Issue: SyncBatchNorm doesn't work when I set track_running_stats False
Labels: oncall: distributed,triaged

Hi, 
I try to apply a DDP to a model. However, when I set track_running_stats False, it output a error
![image](https://user-images.githubusercontent.com/39251602/84854955-8834d180-b095-11ea-9725-723310f81b50.png)
And when I turn it to True, it works well. Then I read the source
![image](https://user-images.githubusercontent.com/39251602/84855266-42c4d400-b096-11ea-9aef-8d9a8e3ed858.png)

and try to print it, it says
![image](https://user-images.githubusercontent.com/39251602/84855244-350f4e80-b096-11ea-82c9-daae77f56a3f.png)

running mean and running var is none. I konw it beacause I set track_running_stas False. 
And the actual bug is in here
![image](https://user-images.githubusercontent.com/39251602/84855389-9a633f80-b096-11ea-8169-b36a571d475a.png)
![image](https://user-images.githubusercontent.com/39251602/84855404-a222e400-b096-11ea-9fbf-93b848f561a7.png)
It seems that the "None" of running mean and the running var caused it. But I did need it set to False. I would be grateful if someone else could tell me how to fix it.  


cc @pietern @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @xush6528 @osalpekar
Repository: go
Issue: x/crypto/acme/autocert: new certificate rejected by Chrome client for 1h if client's clock is behind.
Labels: NeedsInvestigation

### What version of Go are you using (`go version`)?

<pre>
$ go version
go version go1.14.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
GO111MODULE="off"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/h8liu/Library/Caches/go-build"
GOENV="/Users/h8liu/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/h8liu/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
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/4l/dcqzjhqn65gggmw9qrlnksx00000gn/T/go-build462787337=/tmp/go-build -gno-record-gcc-switches -fno-common"
</pre></details>

### What did you do?

1. use autocert to host a new site
2. change client's system clock to 3 second behind UTC. (1 second would also work).
3. visit the site with Google Chrome, the site will be rejected due to SCT timestamp was in the past.
4. in fact, even 5 seconds later, when the certificate is valid again, the site will still get rejected.

Chrome version: 83.0.4103.97

### What did you expect to see?

Certificate won't get rejected, at least not for one hour.

I think the rejection can also happen when the visit is on a new renewal, but renewals often happen in the background, so it is slightly harder to hit the particular time window in a debug session.

### What did you see instead?

Certificate got rejected for 1 hour.

----

to be fair, I think the root cause is on chrome browser side. I also filed the issue to chrome, and chrome marked it as won't fix:
https://bugs.chromium.org/p/chromium/issues/detail?id=1093183

so one mitigation `autocert` can have, is to have an config to optionally insert a sleeping delay after a certificate is issued and before the certificate can be returned to a `GetCertificate()` call.
Repository: next.js
Issue: SSG with fallback doesn't generate AMP page dynamically
Labels: Pages Router

# Bug report

## Describe the bug

- When SSG with `fallback: true` and `amp: "hybrid"` are used together, the paths not specified in `getStaticPaths` have an invalid href in `<link rel="amphtml">` tag.
  - For example, when there is a `pages/[slug].jsx` and the user visits `/bar`, the `<link rel="amphtml">` tag will refer to `/[slug].amp`.

## To Reproduce

https://github.com/wawoon/next-amp-ssg-fallback-reproduce

pages/[slug]/index.jsx
```jsx
export default (props) => {
  return <div>slug: {props.slug}</div>;
};

export const config = {
  amp: "hybrid",
};

export const getStaticProps = async (ctx) => {
  return {
    props: {
      slug: ctx.params.slug,
    },
  };
};

export const getStaticPaths = async () => {
  return { paths: [{ params: { slug: "foo" } }], fallback: true };
};
```

※ caution: When you add `unstable_revalidate` to getStaticProps, the href of `<link rel="amphtml">` is overwritten while regeneration by #14251

When the user visits `http://localhost:3000/bar`, `bar` is not specified in `getStaticPaths`, the href of `<link rel="amphtml">` refers to `/[slug].amp`.  And this `/[slug].amp` is invalid url.

<img width="1022" alt="スクリーンショット 2020-06-17 14 21 57" src="https://user-images.githubusercontent.com/36811303/84858863-f2a23d80-b0a6-11ea-9f42-9c66e2ced23a.png">

## Expected behavior

- The `/bar` should have correct amp page path, even when the path is not included in `getStaticPaths`.
- The amp version of `/bar` should be generated using `getStaticProps` dynamically.

## Screenshots

## System information

- macOS
- Chrome
- Next: 9.4.5-canary.12
- Node: v12.14.1

## Additional context

- I have recently created #14251 which is related with amp page with SSG.
Repository: flutter
Issue: Listener or rule for flutter_driver tests, to make automatically screenshot, if any one test failed
Labels: c: new feature,tool,t: flutter driver,a: debugging,c: proposal,P3,team-tool,triaged-tool

**Hello!**
There is huge trouble with taking automatically screenshot, if any test failed in test suite. In general I mean the same solution as it working in JUnit or TestNG.
Also I'm tried to wrap all test cases in try/catch, but it didn't work properly...
Please help if have any idea how to solve it.
Thanks in advance)

**For example**
_In JUnit it's:_
import com.codeborne.selenide.junit.ScreenShooter;

public class MyTest {
  @Rule
  public ScreenShooter makeScreenshotOnFailure = ScreenShooter.failedTests();

  // ...
}

_In TestNG it's:_
import com.codeborne.selenide.testng.ScreenShooter;

@Listeners({ ScreenShooter.class})
public class MyTest {
  // ...
}
Repository: flutter
Issue: [flutter driver] Run a single test or group test by command 
Labels: c: new feature,tool,t: flutter driver,c: proposal,P3,team-tool,triaged-tool

In unit/widget test I can do something like this to run only one test:
```
flutter test --plain-name="simple test name"
```

But "--plain-name" seems do not exist inside dirve, and I do not find any alternative. I try this:
```
flutter drive --target=test_driver/app.dart --release --plain-name="simple test name"
```
but oviously do not work. 
How can I run only one test or only a group of test with flutter drive?
Repository: godot
Issue: Godot overwrites the Project Manager list on close
Labels: discussion,topic:editor,usability

**Godot version:**
3.2.2.rc.custom_build.2e8480d56

**OS/device including version:**
Debian Buster amd64, Radeon RX550

**Issue description:**
Apparently, closing Godot forces it to overwrite the Project Manager list with whatever it was when the project was opened.

**Steps to reproduce:**
- Open a project in Godot
- Open another Godot window, "star" or "unstar" some project, close it
- Open Godot again - the project list is how you left it
- Close the first window
- Open another Godot window - the list is back to what it was before opening the first project

This happens with "starring", "unstarring", creating or deleting projects - the list will be overwritten with an old list when you close Godot.

I would understand this if it happened when closing the Project Manager, but it does not make sense when closing Godot. I often have multiple projects opened, and to modify the list, I have to close them all first.
Repository: flutter
Issue: [animations] Name conflict for DualTransitionBuilder
Labels: package,p: animations,team-ecosystem,P3,triaged-ecosystem

Since DualTransitionBuilder was introduced to `flutter/flutter`: https://github.com/flutter/flutter/pull/58686, this can result in a naming conflict for the `animations` package, since the `animations` package also contains an identical `DualTransitionBuilder`. 

We should have the `animations` package use its own copy of the widget until DualTransitionBuilder reaches the `stable` branch. Then, we can safely remove the copy of DualTransitionBuilder in the animations package.
Repository: flutter
Issue: How to disable text anti-aliasing
Labels: framework,engine,dependency: skia,d: api docs,a: typography,c: rendering,P2,team-engine,triaged-engine

Trying to disable text anti-aliasing I've build my own local engine with `font.setEdging(SkFont::Edging::kAlias);` instead of `kAntiAlias` in /engine/src/flutter/third_party/txt/src/txt/paragraph_txt.cc.

Running application with local engine leads to result where text is not rendered at all, although it is seems the layout and decoration (wavy underline) are correctly drawn.
![notext](https://user-images.githubusercontent.com/5055566/84875926-4a34af00-b08f-11ea-9a88-228219a63112.png)

Is there any way to disable text anti-aliasing?
Repository: angular
Issue: strictTemplates and strictNullChecks doesn't work well with optional chaining in templates
Labels: type: bug/fix,freq1: low,workaround2: non-obvious,area: compiler,state: confirmed,P3,compiler: template type-checking

<!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅

Oh hi there! 😄

To expedite issue processing please search open and closed issues before submitting a new one.
Existing issues often contain information about workarounds, resolution, or progress updates.

🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅-->


# 🐞 bug report

### Affected Package
<!-- Can you pin-point one or more @angular/* packages as the source of the bug? -->
<!-- ✍️edit: --> The issue is caused by package @angular/compiler?


### Is this a regression?

?

### Description

* enable Ivy
* enable `strictTemplates`
* enable `strictNullChecks`
* use an expression like `foo?.bar.baz` in a template
  * `foo` is nullable, `bar` is not
  * template compiler shows error on `baz`: `Object is possibly 'undefined'.`
* note that the whole chain ends if `foo` is nullish (long short circuiting), therefore accessing `baz` is always safe
* disabling `strictNullChecks` makes the compile error go away and everything functions as expected without runtime error (i.e. Angular's optional chaining also does long short circuiting)


## 🔬 Minimal Reproduction
https://stackblitz.com/edit/angular-ivy-pu8dk5

<!--
If StackBlitz is not suitable for reproduction of your issue, please create a minimal GitHub repository with the reproduction of the issue.
A good way to make a minimal reproduction is to create a new app via `ng new repro-app` and add the minimum possible code to show the problem.
Share the link to the repo below along with step-by-step instructions to reproduce the problem, as well as expected and actual behavior.

Issues that don't have enough info and can't be reproduced will be closed.

You can read more about issue submission guidelines here: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-submitting-an-issue
-->

## 🔥 Exception or Error
<pre><code>
`Object is possibly 'undefined'.`
</code></pre>


## 🌍  Your Environment

**Angular Version:**
<pre><code>
@angular/animations 9.1.11
@angular/common 9.1.11
@angular/compiler 9.1.11
@angular/core 9.1.11
@angular/forms 9.1.11
@angular/platform-browser 9.1.11
@angular/platform-browser-dynamic 9.1.11
@angular/router 9.1.11

</code></pre>

**Anything else relevant?**
<!-- ✍️Is this a browser specific issue? If so, please specify the browser and version. -->

<!-- ✍️Do any of these matter: operating system, IDE, package manager, HTTP server, ...? If so, please mention it below. -->
Repository: rust
Issue: Not desugaring to HRTB for closure argument
Labels: A-lifetimes,A-closures,T-compiler

My understanding was that `FnMut(&T)` desugars to `for<'a> FnMut(&'a T)`. In this instance, it is seemingly not doing so. If you comment out line 44 then this compiles. Why is the `map` function triggering the incorrect (?) desugaring, and how can I fix it?

```rust
trait Pipe<In> {
    type Out;
}

struct Identity;
impl<In> Pipe<In> for Identity {
    type Out = In;
}

struct Map<P, F> {
    p: P,
    f: F,
}
impl<P, In, F, R> Pipe<In> for Map<P, F>
where
    P: Pipe<In>,
    F: FnMut(P::Out) -> R,
{
    type Out = R;
}

fn map<P, In, F, R>(p: P, f: F) -> Map<P, F>
where
    P: Pipe<In>,
    F: FnMut(P::Out) -> R,
{
    Map { p, f }
}

fn pipe<T, Sink>(_: Sink)
where
    Sink: for<'a> Pipe<&'a T>,
    T: 'static,
{
}

fn main() {
    fn abc<'a>(_: &'a String) {}
    pipe(Map {
        p: Identity,
        f: |_: &String| {},
    });
    pipe(map(Identity, abc));
    pipe(map(Identity, |_: &String| {}));
}

```

([Playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=e96ca22d8ef90e5d72062cd4a4f95398))

Errors:

```
   Compiling playground v0.0.1 (/playground)
error[E0308]: mismatched types
  --> src/main.rs:44:5
   |
44 |     pipe(map(Identity, |_: &String| {}));
   |     ^^^^ one type is more general than the other
   |
   = note: expected type `std::ops::FnOnce<(&'a std::string::String,)>`
              found type `std::ops::FnOnce<(&std::string::String,)>`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.
error: could not compile `playground`.

To learn more, run the command again with --verbose.

```

---

Possibly related: https://github.com/rust-lang/rust/issues/70263
Repository: rust
Issue: Warn on assert!(always_false)
Labels: A-lints,T-compiler,C-feature-request

It would be useful if rustc emitted a warning on assertions when the condition can be statically proven to always be false.

Example:

```rust
pub fn meh() {
    let always_false = 2 > 3;
    assert!(always_false);
    println!("foo");
}
```
Currently compiles cleanly without any warnings ([playground](https://play.rust-lang.org/?version=stable&mode=release&edition=2018&gist=74a4e2c9abeda1dd2d52887e8b44f71a)) — neither about the always false assertion, nor about the unreachable statement.

The LLVM IR emitted:

```
; playground::meh
; Function Attrs: noreturn nonlazybind uwtable
define void @_ZN10playground3meh17h3a7dd68d372b246aE() unnamed_addr #3 {
start:
; call std::panicking::begin_panic
  tail call fastcc void @_ZN3std9panicking11begin_panic17h982033eda4eb16e4E()
  unreachable
}
```

suggests rustc is able to statically prove the assertion to be always false even before LLVM optimization is run.

I would expect to get something similar to this:

```
warning: assertion is always false: `always_false`
 --> meh.rs:3:15
  |
3 |     assert!(always_false);
  |             ^^^^^^^^^^^^ the assertion is always false                                  
  |
  = help: to unconditionally panic, use `panic!()` or `unreachable!()` 
  = note: `#[warn(assert_is_always_false)]` on by default

warning: unreachable statement
 --> meh.rs:4:5
  |
3 |     assert!(always_false);
  |     ---------------------- any code following this expression is unreachable
4 |     println!("foo");
  |     ^^^^^^^^^^^^^^^^ unreachable statement
  |
  = note: `#[warn(unreachable_code)]` on by default

```

## Meta

This is not about any particular version or platform, but here it goes anyway:

`rustc --version --verbose`:

```
rustc 1.44.0 (49cae5576 2020-06-01)
binary: rustc
commit-hash: 49cae55760da0a43428eba73abcb659bb70cf2e4
commit-date: 2020-06-01
host: x86_64-unknown-linux-gnu
release: 1.44.0
LLVM version: 9.0
```
Repository: go
Issue: encoding/xml: Decoder does not decode innerxml when using a TokenReader
Labels: NeedsInvestigation

### What version of Go are you using (`go version`)?

1.14.4

### 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
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/hgoes/.cache/go-build"
GOENV="/home/hgoes/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY="git.engelvoelkers.com"
GONOSUMDB="git.engelvoelkers.com"
GOOS="linux"
GOPATH="/home/hgoes/go"
GOPRIVATE="git.engelvoelkers.com"
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
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-build309819268=/tmp/go-build -gno-record-gcc-switches"
</pre></details>

### What did you do?

When using `encoding/xml.NewTokenDecoder`, the decoder fails to fill fields marked `",innerxml"`.

Here's an example: https://play.golang.org/p/57xVMNiafsB

Removing the second assignment to the decoder gives the desired output.

### What did you expect to see?

The inner XML of the test element

### What did you see instead?

empty string

### Diagnosis
I've debugged this a bit and I'm fairly certain that the problem is that the "innerxml" feature relies on the internal `saved` state of the `Decoder` which is not updated when using a `TokenReader`. The solution would be to serialize the resulting token into the `saved` field in the `Decoder.rawToken` function.
Repository: angular
Issue: optional chaining in template uses 'null', but strictTemplates treats it as 'undefined'
Labels: type: bug/fix,workaround4: none,freq2: medium,area: compiler,state: confirmed,P3,compiler: template type-checking

<!--🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅

Oh hi there! 😄

To expedite issue processing please search open and closed issues before submitting a new one.
Existing issues often contain information about workarounds, resolution, or progress updates.

🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅🔅-->


# 🐞 bug report

### Affected Package
<!-- Can you pin-point one or more @angular/* packages as the source of the bug? -->
<!-- ✍️edit: --> The issue is caused by package @angular/compiler or @angular/language-service?


### Is this a regression?

no

### Description

Using optional chaining (or safe navigation operator) in templates uses `null`, but the language-service and compiler (with strictTemplates) treat it as `undefined`.

This is not a request to change `null` to `undefined` (that's proposed by #34385). Instead I want the static types to be correct so I'm not surprised by the different semantics of Angular's safe navigation operator compared to TypeScript/ECMAScript.

## 🔬 Minimal Reproduction
https://stackblitz.com/edit/angular-ivy-hh5mwz?file=src%2Fapp%2Fapp.component.ts

<!--
If StackBlitz is not suitable for reproduction of your issue, please create a minimal GitHub repository with the reproduction of the issue.
A good way to make a minimal reproduction is to create a new app via `ng new repro-app` and add the minimum possible code to show the problem.
Share the link to the repo below along with step-by-step instructions to reproduce the problem, as well as expected and actual behavior.

Issues that don't have enough info and can't be reproduced will be closed.

You can read more about issue submission guidelines here: https://github.com/angular/angular/blob/master/CONTRIBUTING.md#-submitting-an-issue
-->

## 🔥 Exception or Error
<pre><code>
<!-- If the issue is accompanied by an exception or an error, please share it below: -->
<!-- ✍️-->

</code></pre>


## 🌍  Your Environment

**Angular Version:**
<pre><code>
9.1.11
<!-- ✍️-->

</code></pre>

**Anything else relevant?**
<!-- ✍️Is this a browser specific issue? If so, please specify the browser and version. -->

<!-- ✍️Do any of these matter: operating system, IDE, package manager, HTTP server, ...? If so, please mention it below. -->