sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: go
Issue: crypto/x509: Provide a mechanism for accessing SRVNames
Labels: Proposal,Proposal-Accepted,Proposal-Crypto

The `SRVName` field of an X.509 certificate defined by [RFC 4985] allows a certificate to be used to verify that a service is managed by a particular entity without giving the same entity control over the entire domain or subdomain (eg. if DNSName or CommonName were used).

I would like to be able to access the SRVNames from a certificate parsed using `x509.ParseCertificate` and the like. I can see two ways of doing this, depending on how accessible this information needs to be. The easiest would be to add a field to the `Certificate` struct alongside the existing SAN fields:

```
type Certificate struct {
    …
    // Subject Alternate Name values
    DNSNames       []string
    SRVNames       []string
    EmailAddresses []string
    IPAddresses    []net.IP
    …
}
```

and parse the SRVNames at the same time we parse DNSNames. This is easy to use, but it may not be desirable to pollute the struct with fields for more otherName values that aren't as widely used (especially when issues like #15196 may already cause it to balloon).

Alternatively, the raw SAN field can already be pulled out of the `Extensions []pkix.Extension` field. A more extensible approach might be to create a raw SAN field similar to Extensions that contains the raw map of OIDs and their values. Something like:

```
type Certificate struct {
    …
    // Extensions contains raw X.509 extensions. When parsing certificates,
    // this can be used to extract non-critical extensions that are not
    // parsed by this package. When marshaling certificates, the Extensions
    // field is ignored, see ExtraExtensions.
    Extensions []pkix.Extension

    // SAN contains raw X.509 extensions that were not parsed into the DNSNames,
    // EmailAddresses, or IPAddresses fields..
    SAN []pkix.Extension
    …
}
```

which would make it possible for users to get ahold of arbitrary fields from the SAN without requiring that they pull the blob out of Extensions and re-parse it again.
Note that this would have to be in *addition* to the existing raw SAN field from Extensions (we probably can't remove it since code might already be pulling the SAN field out of Extensions). I have not included an ExtraExtensions (for marshalling) equivalent for this reason (what happens when both exist and you go to create a certificate?).

/cc @agl 

[RFC 4985]: https://tools.ietf.org/html/rfc4985
Repository: rust
Issue: Consider making `std::time::SystemTime` platform-independent
Labels: C-enhancement,T-libs-api,A-time

It was found in https://github.com/rust-lang/rust/pull/44220#issuecomment-327744848 that certain systems in Tier-2 support still uses a 32-bit `time_t`. `SystemTime` on them will suffer from the Year-2038 problem, and also cannot perform arithmetic for a duration >68 years. This introduces a portability hazard, in which on some systems the time arithmetic works normally, and in some more legacy system it suddenly panics.

The `SystemTime` struct is a wrapper around [`timespec`](http://en.cppreference.com/w/c/chrono/timespec) on Unix and Redox, and [`FILETIME`](https://msdn.microsoft.com/en-us/library/windows/desktop/ms724284.aspx) on Windows. Nevertheless, the public API involving `SystemTime` never exposes this detail:

* You cannot construct a `SystemTime` from a `timespec`/`FILETIME`, nor the other way round
* The only place where `SystemTime` interacts with the OS are being returned

    1. `SystemTime::now`, returning a `SystemTime`
    2. `Metadata::{modified, accessed, created}`, returning an `io::Result<SystemTime>`

* There are no OS-specific APIs reading a `SystemTime`. 

This means expanding the precision and range of `SystemTime` is safe. In fact, we could even make the `SystemTime` structure itself platform-agnostic, just like `Duration`:

```rust
struct SystemTime {
    secs: i64,
    nanos: u32,
}
```
Repository: TypeScript
Issue: Surprising `Not all code paths return a value`
Labels: Suggestion,Help Wanted

**TypeScript Version:**  2.5.2

**Code**

```ts
type AsyncFunction<T> = () => Promise<T>;

const f: AsyncFunction<number | void> = async () => {
  if (Math.random()) {
    return 1;
  }
};
```

**Expected behavior:**

No tsc errors.

**Actual behavior:**

```ts
const f: AsyncFunction<number | void> = async () => {
//                                      ~~~~~~~~~~~~~ [ts] Not all code paths return a value.

  if (Math.random()) {
    return 1;
  }
};
```

Notably, when using return-type annotation, this error does not occur:

```ts
async function a(): Promise<number | void> {
  if (Math.random()) {
    return 1;
  }
}

const b = async (): Promise<number | void> => {
  if (Math.random()) {
    return 1;
  }
};
```

In our real-world scenario, it would not be sufficient to look for this syntactic pattern. Rather, the fact that the async function is assigned to a union containing void should be the trigger that silences this error.
Repository: vscode
Issue: Smart Tabs - Feature Request
Labels: feature-request,editor-core

Some editors support what's called "smart tabs." The spec for vscode might look like the following:

>Indentation defined by the nesting of code blocks is made of tabs, while any alignment that follows is made only of spaces.

Conceptually, this would ensure that mixed tabs and spaces for indentation would never occur.

![tabs-vs-spaces](https://cloud.githubusercontent.com/assets/1058243/18036844/49a9426c-6d3b-11e6-98ae-2c9c3db623ae.gif)

[IntelliJ IDEA | Tabs and Indents | Smart Tabs](https://www.jetbrains.com/help/idea/2017.1/code-style-java.html#tabs_and_indents)
_Related discussion: https://github.com/editorconfig/editorconfig/issues/323#issuecomment-327935294_
Repository: opencv
Issue: Conversion from BGR to YUV 4:2:2
Labels: feature,category: imgproc

##### System information (version)
- OpenCV => 3.3
- Operating System / Platform => -
- Compiler => -

##### Detailed description

There is a conversion from YUV 4:2:2 to BGR, but not in the opposite direction. 

##### Steps to reproduce
`COLOR_BGR2YUV_I420` has `COLOR_YUV2BGR_I420` for the opposite direction, while there is no `COLOR_BGR2YUV_Y422` for `COLOR_YUV2BGR_Y422`. I would kindly suggest to include a conversion ID `COLOR_BGR2YUV_Y422` for `cvtColor`.
Repository: vscode
Issue: Debug console link detection issues
Labels: debug,debt,debug-console

Also consider a way for extensions to contribute link detection rules
Repository: puppeteer
Issue: Get ssl certificate
Labels: feature,chromium,P3

I am unable to get ssl certificate. I went through all the documentation and response object I couldn't figure out a way to get SSL certificate.

I would like to inspect the details of SSL certificate.

Is it even possible with current puppeteer API?

No luck on stackoverflow: 

https://stackoverflow.com/questions/46108756/how-to-access-ssl-certificate-content-using-chrome-puppeteer
Repository: kubernetes
Issue: Storage upgrade mechanism
Labels: priority/important-soon,sig/network,sig/api-machinery,kind/api-change,kind/feature,lifecycle/frozen

Before we remove an API object version, we need to be certain that all stored objects have been upgraded to a version that will be readable in the future. The old plan for that was to run the cluster/upgrade-storage-objects.sh script after each upgrade. Unfortunately, there are a number of problems with this:

* The script is old and incomplete, as api authors haven't been consistently adding their API objects to it (no doubt due to a lack of documentation in the right places).
* Instructions to run the script in the release notes have been spotty.
* We believe not all distributions have been running the script after upgrades.

Therefore, we need to design a robust solution for this problem, which works in the face of HA installations, user-provided apiservers, rollbacks, patch version releases, etc. Probably this won't look much like a script that you run after an upgrade, instead it may look more like a system where apiservers come to consensus on the desired storage version, plus a controller that does the job that script was supposed to do after a consensus change.

In the mean time, **it is not safe to remove API object versions, so we are instating a moratorium on API object version removal until this system is in place**. (Deprecations are still fine.)
Repository: opencv
Issue: Documentation issue
Labels: feature,category: documentation

related issues : #9520

##### Detailed description
link to documentation page : http://docs.opencv.org/master/d1/d10/classcv_1_1MatExpr.html#details
link to source code:
https://github.com/opencv/opencv/blob/2ac57a2b1fc0b49ddd07f3e3633461fcab5fc3f0/modules/core/include/opencv2/core/mat.hpp#L3456-L3459



"The result of comparison is an 8-bit single channel..." explanation is true when the source is gray image. 

**TO DO :** need more explanation about when the source is color image 
##### Steps to reproduce
```
	Mat mask = imread("lena.jpg", IMREAD_GRAYSCALE)>127;
	imshow("gray", mask);
	mask = imread("lena.jpg")>127;
	imshow("color", mask);
	waitKey();
```
![gray](https://user-images.githubusercontent.com/12151541/30226640-7292a1ce-94df-11e7-8fea-c83b5b710459.png)

![mask](https://user-images.githubusercontent.com/12151541/30226197-d0768d2a-94dd-11e7-8420-c3b86b1bfe15.jpg)
Repository: kubernetes
Issue: kubectl logs should allow -f, -l, and -c together
Labels: area/kubectl,kind/feature,sig/cli,lifecycle/frozen

Seriously, I need it to draw some kind of truth table or something about what's allowed.

Why do we have so many restrictions?

```console
% kc logs -f -nsonobuoy -lsonobuoy-plugin=e2e     
error: only one of follow (-f) or selector (-l) is allowed
See 'kubectl logs -h' for help and examples.

% kc logs -nsonobuoy -lsonobuoy-plugin=e2e    
Error from server (BadRequest): a container name must be specified for pod sonobuoy-e2e-job-533c18a33be34f79, choose one of: [e2e sonobuoy-worker]

% kc logs -nsonobuoy -lsonobuoy-plugin=e2e  -c e2e
error: a container cannot be specified when using a selector (-l)
See 'kubectl logs -h' for help and examples.
# OK, this one is fixed at head
```

And this works just fine, so it really strike me as strange that kubectl won't do it for me.

```console
% kc logs -nsonobuoy -f $(kc get pod -oname -nsonobuoy -lsonobuoy-plugin=e2e)  -c e2e
```

/kind feature
@kubernetes/sig-cli-feature-requests
Repository: angular
Issue: ng-host 
Labels: feature,area: core,core: host and host bindings,feature: under consideration

## Proposal

I'd like an `<ng-host>` that would act in a  similar way as the `:host` css property. That would apply **directives** and **classes** to the host component. [Related #8785 ](https://github.com/angular/angular/issues/8785) 


## Current behavior

#### my-component.template.ts
```
<div>1</div>
<div>2</div>
```

Currently to apply a class `flex` to the host component one can 
 1. use `host` in the component decorator (or `@HostBinding)`; 
 2. use a wrapping element 
 3. apply the class on the host from the parent template. 

All of which are suboptimal. 

#### 1. Host

```
@Component({
 //... 
host: { class : 'flex' }
})
```
(Same applies for `@HostBinding()`).
Class declarations belongs in my template. Directives don't work here

#### 2. Wrapper

```
<div class="flex">
  <div>1</div>
  <div>2</div>
</div>
```
Adds an additional tag. 

 #### 3. Defining in parent

```
<my-component class="flex">
```

Leaks implementation outside the component itself.




## Expected behavior

```
<ng-host class="flex">
 <div>1</div>
 <div>2</div>
<ng-host>
```

result

```
  <my-component class="flex">
    <div>1</div>
   <div>2</div>
 </my-component>
```

## Compiling wrong usages


#### 1. multiple ng-host

```
<ng-host class="flex"><ng-host>
<ng-host class="flexEnd">
  <div>1</div>
  <div>2</div>
<ng-host>
```

 #### 2. Multiple ng-host nested

```
<ng-host class="flex">
    <ng-host class="flexEnd">
        <div>1</div>
        <div>2</div>
    <ng-host>
<ng-host>
```

 #### 3. ng-host not used as the topmost component
```
<div> 1
     <ng-host class="flex flexEnd"><ng-host>
</div>
<div>2</div>
```

#### solution 1

Strictly speaking it would make sens to have those be invalid. 

#### solution 2

`ng-host` act as a strict link to the host. Meaning that the above scenarios would result, in all cases, in this 


```
<my-component class="flex flexEnd">
  <div>1</div>
  <div>2</div>
</my-component>
```

Thus when the compiler finds a `ng-host` element it just links whatever it finds to the host. No matter where it's put. I find this a bit less intuitive but could be easier to implement.

#### solution 3

```
<li> <ng-host></ng-host> </li>
```

compiles to this

```
<li><my-component></my-component></li>
```
Repository: TypeScript
Issue: JSX: Add a way to specify children as not a part of props
Labels: Suggestion,In Discussion,Domain: JSX/TSX

Right now there's no way to specify what children representation is, except specifying `ElementChildrenAttribute` inside JSX namespace. It's heavily coupled with React representation for children which implies that children is a part of props. This makes impossible to enable type checking for children with implementations which store children separately, for instance https://github.com/dfilatov/vidom/wiki/Component-properties.
Probably it could be `ElementChildrenProperty` (like `ElementAttributesProperty`).
Repository: react
Issue: Form restoration & React hydration
Labels: Type: Bug,Type: Feature Request,Component: DOM

**Do you want to request a *feature* or report a *bug*?**

 Bug

**Reproduction**

1. Open https://codesandbox.io/p/sandbox/form-restoration-react-hydration-cz1xgj?file=%2Fapp%2Fpage.js%3A2%2C1, see the source
2. Open https://cz1xgj-3000.csb.app/
3. Fill in the input, for example, you can type "foo"
4. Press submit
5. Undo the navigation
6. See how the "input value" is outdated, it doesn’t match what's inside the textbox.

https://github.com/facebook/react/assets/3165635/d29dd884-8896-4b59-8a55-16eb5145dfc7

**What is the current behavior?**

Let's say you start filling a form input type text or a select element with `foo`. Then you click on a link and press the back button. The browser back-forward cache (or maybe the form restauration logic) will kick in and change the initial value of the form elements. You will get the `foo` value back in the input. However, React doesn't account for it when the component is controlled.

For end-users, it means that they will try to submit a form because they see values in the inputs, but it won't work. They need to go back to each field and make a "fake" change so that React registers it.

This issue could also be worked around by not controlling the inputs, but I'm not sure how popular form libraries handle this.

**What is the expected behavior?**

I expect React to trigger an `onChange` event to replicate the actual form value. 
At the fundamental level, there is a coordination issue between the browser and React.

**Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?**

- React `@latest` (v18.2.0).
- Chrome `@latest` (v112.0)

**Details**

We have been using the following hack on Material UI:
```js
  componentDidMount() {
    // Fix SSR issue with the go back feature of the browsers.
    // Let's say you start filling the input with "foo", you change the page then after comes back.
    // The browser will reset the input value to "foo", but we also need to tell React about it.
    this.handleChange({
      target: this.input,
    });
  }
```

But it comes with issues: https://github.com/mui/material-ui/pull/8110.
So instead, we tried simulating a change event [as suggested in Stack Overflow](https://stackoverflow.com/questions/23892547/what-is-the-best-way-to-trigger-onchange-event-in-react-js) but it doesn't work anymore
```js
var event = new Event('input', { bubbles: true });
element.dispatchEvent(event);
```

So for now, we are going to disable the cache with `<form autoComplete="off">`.
Repository: go
Issue: plugin: plugin.Open() segfault with statically linked binaries
Labels: NeedsInvestigation

**What version of Go are you using (`go version`)?**
go version go1.9 linux/amd64

**Does this issue reproduce with the latest release?**
Yes

**What operating system and processor architecture are you using (`go env`)?**
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/opt/gopath"
GORACE=""
GOROOT="/opt/go"
GOTOOLDIR="/opt/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build683959130=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"

**What did you do?**
Compiled the simple plugin example described in the plugin [docs](https://golang.org/pkg/plugin/) with the -static flag
go run -ldflags '-extldflags "-static"'  main.go 

**What did you expect to see?**
The same output as building without the -static flag:
go run main.go 
Hello, number 7

**What did you see instead?**
Segfault in cgo runtime:

go run -ldflags '-extldflags "-static"'  main.go 
\# command-line-arguments
/tmp/go-link-658275617/000000.o: In function `pluginOpen':
/tmp/workdir/go/src/plugin/plugin_dlopen.go:19: warning: Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x0]

runtime stack:
runtime.throw(0x52c324, 0x2a)
	/opt/go/src/runtime/panic.go:605 +0x95
runtime.sigpanic()
	/opt/go/src/runtime/signal_unix.go:351 +0x2b8

goroutine 1 [syscall, locked to thread]:
runtime.cgocall(0x459260, 0xc420053c18, 0xc42000e010)
	/opt/go/src/runtime/cgocall.go:132 +0xe4 fp=0xc420053be8 sp=0xc420053ba8 pc=0x401f84
plugin._Cfunc_pluginOpen(0x25cdfe0, 0xc42000e010, 0x0)
	plugin/_obj/_cgo_gotypes.go:98 +0x4e fp=0xc420053c18 sp=0xc420053be8 pc=0x45758e
plugin.open.func3(0x25cdfe0, 0xc42000e010, 0xc42001c0a0)
	/tmp/workdir/go/src/plugin/plugin_dlopen.go:102 +0xae fp=0xc420053c58 sp=0xc420053c18 pc=0x4589ae
plugin.open(0x52ce1a, 0x4c, 0x0, 0x0, 0x0)
	/tmp/workdir/go/src/plugin/plugin_dlopen.go:102 +0x1d1 fp=0xc420053e88 sp=0xc420053c58 pc=0x457c31
plugin.Open(0x52ce1a, 0x4c, 0xc42007a000, 0xe, 0xc420012000)
	/opt/go/src/plugin/plugin.go:31 +0x35 fp=0xc420053ec0 sp=0xc420053e88 pc=0x4570c5
main.loadPlugins()
Repository: go
Issue: encoding/xml: very low performance in xml parser
Labels: Performance,NeedsInvestigation

### What version of Go are you using (`go version`)?
1.9

### Does this issue reproduce with the latest release?
True

### What operating system and processor architecture are you using (`go env`)?
Windows

### What did you do?
I trying to parse large files with SAX with go, and get decadent performance.
I rewrite code in C#, and get maximum performance.

```go
file, err := os.Open(filename)
handle(err)
defer file.Close()
buffer := bufio.NewReaderSize(file, 1024*1024*256) // 33554432
decoder := xml.NewDecoder(buffer)
for {
        t, _ := decoder.Token()
        if t == nil {
            break
        }
        switch se := t.(type) {
        case xml.StartElement:
            if se.Name.Local == "House" {
                house := House{}
                err := decoder.DecodeElement(&house, &se)
                handle(err)
            }
        }
    }
```

```c#
using (XmlReader reader = XmlReader.Create(filename)
            {
                while (reader.Read())
                {
                    switch (reader.NodeType)
                    {
                        case XmlNodeType.Element:
                            if (reader.Name == "House")
                            {
                                //Code
                            }
                            break;
                    }
                }
            }
```
### What did you expect to see?
Mature and fast xml parser in golang.

### What did you see instead?

The bottleneck in SAX xml parsing with go is CPU, instead of low HDD io performance.
Repository: electron
Issue: WebRequest can't using multi time with a type event.
Labels: enhancement :sparkles:

```javascript
const {session} = require('electron')

// Modify the user agent for all requests to the following urls.
const filter_mainFrame = {
  urls: ['*://example.com/*']
}
const filter_stylesheet = {
  urls: ['*://otherpage.com/*']
}

session.defaultSession.webRequest.onBeforeSendHeaders(filter_mainFrame, (details, callback) => {
  if(details.resourceType=="mainFrame") callback({cancel: true})
})
session.defaultSession.webRequest.onBeforeSendHeaders(filter_stylesheet, (details, callback) => {
  if(details.resourceType=="stylesheet") callback({cancel: true})
})
```
i think it only work with `filter_stylesheet `.
I want it to work both filters, but not possible.
Repository: vscode
Issue: Enable fuzzy matching for picker
Labels: feature-request,api,quick-pick

Have a quick pick control with these values `["hello", "hello_there"]`

Type `ht` or `hello_` -> `hello_there` will show up
Type `he_` -> no results
Repository: vscode
Issue: Feature request - undo after moving cursor should optionally just put the cursor back, without undoing
Labels: feature-request,editor-core,undo-redo

There's a feature I'm missing that I've used in other IDE's, when finishing typing, moving somewhere else (for example to select+copy some variable name), then pressing CMD+Z should bring the cursor back to the last edit location without actually undoing the typing there.

I know there's some "last cursor position" keyboard shortcut, but I believe this should be a first-class functionality of the undo, like it is in other editors (I remember this from webstorm, but I'm pretty sure the muscle memory for doing this comes from way before webstorm).

What do you think? 
Thanks

- VSCode Version: 1.16
- OS Version: OSX 10.11
Repository: neovim
Issue: Multiple cursors (again)
Labels: enhancement,multicursor

See also  #211, #3845, #299

Multiple cursors. Even though other ways of doing things may be more powerful, there are still users who'd prefer to use them.

There are some definite problems with "virtual cursors" like in [vim-multiple-cursors](https://github.com/terryma/vim-multiple-cursors).

>Is not that easy. It also requires multiple buffers, like when you copy using (i.e.) six carets and then pastes accordingly in the six current positions.

>This also means every caret can have it's own selection and context, so the solution of "virtual carets" is unfeasible because when (for example) a plugin relies on a caret-position-change-event it will break thanks to the wrongly assumption that the event did indeed happen.

~ @Ivanca

There's already been plenty of discussion on this, so let's try to keep away from "why" (because people want it, and it's useful for some things) and focus on the "how". That is, how to expand vims underlying metaphors to support multiple cursors cleanly and powerfully.