sharjeelyunus/github-issues-dataset huggingface dataset:
Repository: kubernetes
Issue: kubectl port-forward container listener to local port
Labels: priority/backlog,area/kubectl,sig/node,kind/feature,sig/cli

It would be great if `kubectl port-forward` offered the equivalent of `ssh -R`, such that it would open a _listening_ port on the container that forwards to a port on the local machine. I would be perfectly content if that port were only available to the container (i.e. just the 3-tuple `-R` flavor, without `bind_address`; no need to have other containers be able to connect to the port)

Since there is no `kubectl cp` command that I could find, this would make for a painless way to get content into a running container via http from a workstation
Repository: go
Issue: x/text/encoding/unicode: add examples
Labels: Documentation,NeedsInvestigation

golang.org/x/text/encoding/unicode's documentation is a bit unclear to the newbie like myself that just wants to read files that Windows folks send them without having to become an expert in UTF-16.  I think the docs make sense to someone that already understands transforms, unicode, etc, but not everyone should need to know such plumbing.  All I wanted was something like ioutil.ReadFile() that automagically read MS-Windows UTF-16 files and gave me UTF-8.

An example like this would have helped:

```
func NewReader(rd io.Reader) io.Reader {
    // Make an tranformer that decodes MS-Windows (16LE) UTF files:
    winutf := unicode.UTF16(unicode.LittleEndian, unicode.IgnoreBOM)
    // Make a transformer that is like winutf, but abides by BOM if found:
    decoder := winutf.NewDecoder()
    // Make a Reader that uses decoder:
    return transform.NewReader(rd, unicode.BOMOverride(decoder))
}

fd, _ := os.Open(filename)
r := NewReader(fd)  // Read from "r" to get UTF-8.
utf8, _ := ioutil.ReadAll(r)
text := string(utf8)
```

It would be awesome if that example (or one like it) was added to the documentation.  I'd be glad to submit a PR.

Furthermore, it would be useful to have a library similar to ioutil but automagically detects UTF-16 is found.  I've made an example here: https://github.com/TomOnTime/utfutil
Repository: opencv
Issue: OpenCV projectPoints jacobian matrix is not correct
Labels: bug,category: calib3d,affected: 2.4

We compared the Jacobian matrix coming from projectPoints in OpenCV 2.4.11 against the one we have provided with matlab code (we have written the projection formula exactly based on the OpenCV source code). We found out that when the Tangential distortion coefficients (p1 and p2) are not zero the output of MATLAB code and the OpenCV projectPoints are not identical for the Jacobian of rotation and translation. It seems that the OpenCV source code is not correct for computing the Jacobian for rotation and translation.
we are using Ubuntu 14.04 64 bit with gcc version 4.8.4.
for your convenience you can find our MATLAB code in the following:

% convert rotation vector to rotation matrix (world_in_camera)
syms rx ry rz real;
r=[rx; ry; rz];
theta=norm(r);
r=r/theta;
R=cos(theta)_eye(3)+(1-cos(theta))_(r_r')+sin(theta)_[0,-r(3), r(2);r(3),0,-r(1);-r(2),r(1),0];

% camera Position world_in_camera
syms tx ty tz real;
T = [tx; ty; tz];

syms fx fy cx cy real ; 

% 3D points in camera coordinate system
syms X Y Z real;   % position of 3D Points in world coordinate system
P = R*[X; Y; Z] + [tx; ty; tz];

% distortion
syms k1 k2 p1 p2 k3
x_perim = P(1)/P(3);
y_perim = P(2)/P(3);
r2 = (x_perim \* x_perim) + (y_perim \* y_perim);
r4 = r2 \* r2;
r6 = r4 \* r2;

cdist = 1 + k1_r2 + k2_r4 + k3_r6;
a1 = 2_x_perim_y_perim;
a2 = r2 + 2_x_perim_x_perim;
a3 = r2 + 2_y_perim*y_perim;

x_zegond = x_perim \* cdist + p1 \* a1 + p2 \* a2;
y_zegond = y_perim \* cdist + p1 \* a3 + p2 \* a1;

 % 3D point projection equation
xp(X, Y, Z) = x_zegond \* fx + cx;
yp(X, Y, Z) = y_zegond \* fy + cy;

syms X3 Y3 Z3 real;
x = xp(X3, Y3, Z3);
y = yp(X3, Y3, Z3);

imagePoints=[x;y];

% disp('imagePoints = ');
% pretty(imagePoints);

dp_dfx    = diff(imagePoints, fx);
dp_dfy    = diff(imagePoints, fy);
dp_dcx    = diff(imagePoints, cx);
dp_dcy    = diff(imagePoints, cy);

dp_dk1    = diff(imagePoints, k1);
dp_dk2    = diff(imagePoints, k2);
dp_dp1    = diff(imagePoints, p1);
dp_dp2    = diff(imagePoints, p2);
dp_dk3    = diff(imagePoints, k3);

dp_drx    = diff(imagePoints, rx);
dp_dry    = diff(imagePoints, ry);
dp_drz    = diff(imagePoints, rz);

dp_dtx    = diff(imagePoints, tx);
dp_dty    = diff(imagePoints, ty);
dp_dtz    = diff(imagePoints, tz);

jacobianMat = [dp_drx, dp_dry, dp_drz ,...
            dp_dtx, dp_dty, dp_dtz ,...
            dp_dfx, dp_dfy, dp_dcx, dp_dcy, ...
            dp_dk1, dp_dk2, dp_dp1, dp_dp2, dp_dk3];
fprintf('generating c code for jacobian \n');
ccode(jacobianMat,'file','jacobian.cpp');
Repository: youtube-dl
Issue: youtube-dl skips post-processing for M4As
Labels: bug,postprocessors

Hey there.

First of all, thanks for a great program, youtube-dl is the only program on the market I've come across that allows me to extract the audio from my huge YouTube playlists and convert them to M4A ready to be put on my phone. 

The problem I'm currently having is that after extracting the audio, ffmpeg skips the post-processing, leaving me with the original-quality audio files rather than converting them to the 192k bitrate that I need. After posting here in StackOverflow: http://stackoverflow.com/questions/34930699/cant-use-youtube-dl-to-download-specified-bitrate/34930832?noredirect=1#comment57644155_34930832, a user there informed me that I'm probably experiencing another instance of a previous bug that skipped post-processing on M4A files.

Here's what I'm getting when I try to extract and transcode:

```
B:\Users\Hashim>youtube-dl --extract-audio --audio-format m4a --audio-quality 19
2k --playlist-items 48 https://www.youtube.com/playlist?list=PLR
3nWwHlZ9WBpi3uWsjSe6r1PiA8MTbnE
[youtube:playlist] PLR3nWwHlZ9WBpi3uWsjSe6r1PiA8MTbnE: Downloading webpage
[download] Downloading playlist: Main Playlist
[youtube:playlist] PLR3nWwHlZ9WBpi3uWsjSe6r1PiA8MTbnE: Downloading page #1
[youtube:playlist] PLR3nWwHlZ9WBpi3uWsjSe6r1PiA8MTbnE: Downloading page #2
[youtube:playlist] PLR3nWwHlZ9WBpi3uWsjSe6r1PiA8MTbnE: Downloading page #3
[youtube:playlist] PLR3nWwHlZ9WBpi3uWsjSe6r1PiA8MTbnE: Downloading page #4
[youtube:playlist] playlist Main Playlist: Downloading 1 videos
[download] Downloading video 1 of 1
[youtube] -o36bO1XKnw: Downloading webpage
[youtube] -o36bO1XKnw: Downloading video info webpage
[youtube] -o36bO1XKnw: Extracting video information
[youtube] -o36bO1XKnw: Downloading DASH manifest
[download] Destination: B:\Users\Hashim\Desktop\New Folder\Have Mercy - Cigarett
es And Old Perfume.m4a
[download] 100% of 6.24MiB in 00:13
[ffmpeg] Correcting container in "B:\Users\Hashim\Desktop\New Folder\Have Mercy -
Cigarettes And Old Perfume.m4a"
[ffmpeg] Post-process file B:\Users\Hashim\Desktop\New Folder\Have Mercy - Cigar
ettes And Old Perfume.m4a exists, skipping
[download] Finished downloading playlist: Main Playlist
```

Note the final line, "Post-process file x exists, skipping"

Thanks, would really appreciate a fix for this as soon as possible as it's preventing me from getting my music in the format and quality I need.
Repository: opencv
Issue: Python Multiprocessing Problem
Labels: bug,category: python bindings,affected: 2.4

I'm using python 2.7 and opencv 2.4.11 and am having some trouble using the multiprocessing module for a very simple purpose. Here's a sample of my code with a consumer-producer framework employed.

```
class Consumer(multiprocessing.Process):

    def __init__(self, task_queue, result_queue):
        multiprocessing.Process.__init__(self)
        self.task_queue = task_queue
        self.result_queue = result_queue

    def run(self):
        #Creating window and starting video camputer from camera
        cv2.namedWindow("preview")
        vc = cv2.VideoCapture(0)
        vc.set(cv.CV_CAP_PROP_FRAME_WIDTH, 640)
        vc.set(cv.CV_CAP_PROP_FRAME_HEIGHT, 480)

        if vc.isOpened(): 
            rval, frame = vc.read()
        else:
            rval = False

        while rval:
            cv2.imshow("preview", frame)
            rval, frame = vc.read()
            key = cv2.waitKey(20)
            if key == 27: 
                break
        cv2.destroyWindow("preview")
        return

##################################
#MAIN PROGAM
##################################

#SETTING UP MULTIPROCESSING STUFF
tasks = multiprocessing.JoinableQueue()
results = multiprocessing.Queue()

consumer = Consumer(tasks,results)
consumer.start()
#Rest of main program
```

However, the process hangs on the line
`cv2.namedWindow("preview")`

Is this a bug? How do I work around this?
Repository: neovim
Issue: Support GUI signs
Labels: enhancement,gui,ui-extensibility

`sign` support allowed the GUI to place icons as defined through the `sign icon= command, but we have no equivalent for remote GUIs, and the old code got removed.

Ping equalsraf/neovim-qt#90.
Repository: TypeScript
Issue: Readonly indexer and constructor usage: question
Labels: Suggestion,Awaiting More Feedback

``` typescript
class A {
    readonly x;
    readonly [x: string]: string;

    constructor() {
        this.x = 5;  // that's okay
        this["a"] = "s"; // that yields an error
    }
}
```

Is that by design that readonly indexers for the same type in constructor yield errors?
Repository: TypeScript
Issue: Destructuring causes error for null/undefined properties
Labels: Suggestion,In Discussion,Help Wanted

The following code:

``` ts
interface Foo {
    x: number;
}

interface Bar {
    foo?: Foo;
}

function test( { foo: { x } }: Bar ) {
    alert( x );
}

test( {} ); // TypeError: Cannot read property 'x' of undefined
```

transpiles to:

``` js
function test(_a) {
    var x = _a.foo.x;
    alert(x);
}
```

instead of the (arguably) preferable:

``` js
function test(_a) {
    var x;
    if (_a.foo) x = _a.foo.x;
    alert(x);
}
```

The transpiled code does not check for the presence of optional property `foo` in the `Bar` interface.  This leads to an error at invocation.

I can see three possible solutions:
1. Always check for member existence when transpiling destructuring statements.
2. Check for member existence only when an element is optional in the interface or type declaration.
3. New syntax for destructuring that can indicate members should be checked.

E.g.

``` ts
function test( { foo?: { x } }: Bar ) {}
```
Repository: go
Issue: runtime: GC should wake up idle Ps
Labels: Performance,NeedsFix,compiler/runtime

Currently the GC doesn't always wake up idle Ps, and hence may not take full advantage of idle marking during the concurrent mark phase. This can happen during mark 2 because mark 1 completion preempts all workers; if the Ps running those workers have nothing else to do they will simply park, and there's no mechanism to wake them up after we allow mark workers to start again. It's possible this can happen during mark 1 as well, though it may be since we allow mark workers to run before starting the world for mark 1 that all of the Ps start running.

/cc @RLH
Repository: go
Issue: syscall: synchronization between clone() and execve()
Labels: compiler/runtime

I would like to see a synchronization primitive to be added between the clone() and the execve() call in the function forkAndExecInChild here https://golang.org/src/syscall/exec_linux.go so that the parent can setup the child after the clone() but before the execve().
Repository: youtube-dl
Issue: --download-archive doesn't create directories when needed
Labels: bug

So, I'm on Linux and this is the exact command I'm executing: 

```
sudo youtube-dl https://www.youtube.com/playlist?list=PLjlvXrjuRczngya2R6iQpUx8UnSCG7DAo --extract-audio --audio-format mp3 --playlist-start 1 -o playlist_storage/PLjlvXrjuRczngya2R6iQpUx8UnSCG7DAo/%\(title\)s.%\(ext\)s --download-archive playlist_storage/PLjlvXrjuRczngya2R6iQpUx8UnSCG7DAo/PLjlvXrjuRczngya2R6iQpUx8UnSCG7DAo.txt
```

And I get this error: 

```
    Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/bin/youtube-dl/__main__.py", line 19, in <module>
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 411, in main
  File "/usr/local/bin/youtube-dl/youtube_dl/__init__.py", line 401, in _real_main
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1690, in download
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 677, in extract_info
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 830, in process_ie_result
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 623, in _match_entry
  File "/usr/local/bin/youtube-dl/youtube_dl/YoutubeDL.py", line 1768, in in_download_archive
  File "/usr/local/bin/youtube-dl/youtube_dl/utils.py", line 1231, in __init__
IOError: [Errno 20] Not a directory: 'playlist_storage/PLjlvXrjuRczngya2R6iQpUx8UnSCG7DAo/PLjlvXrjuRczngya2R6iQpUx8UnSCG7DAo.txt'
```

What's causing this?
Repository: TypeScript
Issue: Enable JavaScript specific warning behavior
Labels: Suggestion,Committed,VS Code Tracked,Domain: JavaScript

See #6658 for background.

Currently for JavaScript files we provide a very limited set of errors, mostly for syntax errors. There are a number of grammatical and type errors that would be useful to display also.

Brief notes from ad hoc discussion in the team room include:
- Move the code that flags TypeScript syntax in JavaScript files for better error handling
- Add a distinction between errors and warnings to avoid "valid" JavaScript containing errors
- Make the warnings user configurable as part of the project (i.e. may enable/disable certain warnings)

More detailed design to come...
Repository: nvm
Issue: node not found after install
Labels: installing node,feature requests,pull request wanted

```
v21@v21:~$ nvm install 5.0
Downloading https://nodejs.org/dist/v5.0.0/node-v5.0.0-linux-x64.tar.xz...
######################################################################## 100.0%
WARNING: checksums are currently disabled for node.js v4.0 and later
/home/v21/.nvm/versions/node/v5.0.0/bin/npm: 2: exec: /home/v21/.nvm/versions/node/v5.0.0/bin/node: not found
nvm is not compatible with the npm config "prefix" option: currently set to ""
Run 'nvm use --delete-prefix v5.0.0' to unset it.
```

Seeing the same error on every version I try. nvm version is 0.30.2. I'm running Ubuntu 12.04.5 LTS (GNU/Linux 4.1.5-x86_64-linode61 x86_64) with bash. I have an install of 0.10 still working via nvm.

the node executable is visible with ls:

```
v21@v21:~$ ls -alh /home/v21/.nvm/versions/node/v5.5.0/bin/
total 25M
drwxrwxr-x 2 v21 v21 4.0K Jan 21 00:59 .
drwxrwxr-x 6 v21 v21 4.0K Feb  2 01:22 ..
-rwxrwxr-x 1 v21 v21  25M Jan 21 00:59 node
lrwxrwxrwx 1 v21 v21   38 Jan 21 00:59 npm -> ../lib/node_modules/npm/bin/npm-cli.js
```
Repository: go
Issue: net/http/httptest: optional faster test server
Labels: help wanted,NeedsFix,FeatureRequest

Look into making httptest.Server have a way to use in-memory networking (i.e. net.Pipe) instead of localhost TCP. Might be faster/cheaper and not hit ephemeral port issues under load?
Repository: youtube-dl
Issue: site request: atpworldtour
Labels: site-support-request

"Association of Tennis Professionals"

URL example: 
http://www.atpworldtour.com/en/video/rotterdam-2015-final-highlights-wawrinka-berdych

Thanks
Ringo
Repository: go
Issue: net/http: source of errors is unclear
Labels: Documentation,NeedsInvestigation

**What version of Go are you using (go version)?**

1.5.3.

**What operating system and processor architecture are you using?**

Linux. AMD 64.

**What did you do?**

I'm using `httputil.ReverseProxy` to proxy to a host behind ELB, and I'm getting the errors "http: proxy error: net/http: request canceled" & "http: proxy error: net/http: transport closed before response was received" occationally. The line that printed the error is [here](https://github.com/golang/go/blob/release-branch.go1.5/src/net/http/httputil/reverseproxy.go#L196). And the error came from [`http.Transport.RoundTrip`](https://github.com/golang/go/blob/release-branch.go1.5/src/net/http/httputil/reverseproxy.go#L194).

After more digging, [the errors](https://github.com/golang/go/blob/release-branch.go1.5/src/net/http/transport.go#L1093-L1094) could come from a couple places in `http.Transport.RoundTrip`. I was trying to find a way to print the callstacks of the error from `http.Transport.RoundTrip` to understand why it was returned but there's currently no way to do so.

Details can be found in [this golang-nuts thread](https://groups.google.com/forum/#!topic/golang-nuts/apVfiayC01I).

**What did you expect to see?**

I would expect I could instrument a method of either application code or Go's standard library and find out the callstacks at runtime.

**What did you see instead?**

No way to find out the callstack of a method from Go's stdlib. This is a feature request.
Repository: opencv
Issue: Support for HEVC and VP9 in cudacodec::VideoReader
Labels: feature,category: gpu/cuda (contrib)

Hello,

  Current version of cudacodec::VideoReader does not support hevc/vp9 decode, Nvidia cards with GM206 and above have a VP that supports both decode and encode of HEVC.
Repository: javascript
Issue: Exception for space-before-keywords?
Labels: needs eslint rule change/addition

Writing a React/redux app, I am occasionally declaring anonymous classes inside function calls:

``` javascript
export default connect()(class extends Component {
  // React component class definition
});
```

which gives this error: `Missing space before keyword "class". (space-before-keywords)`.

If I put a space there:

``` javascript
export default connect()( class extends Component {
  // React component class definition
});
```

It fails another rule: `There should be no spaces inside this paren. (space-in-parens)`.

Was wondering if that was an unintended effect of the `space-before-keywords` or if everything is working as expected.
Repository: opencv
Issue: BackgroundSubtractorMOG2 apply calls from python causes allocation error
Labels: bug,category: python bindings,affected: 3.4

Error message:

```
  File "(myfile.py)", line 1500, in (some function)
    bgsub.apply(frame)
error: /tmp/opencv-3.1.0/modules/python/src2/cv2.cpp:163: error: (-215) The data should normally be NULL! in function allocate
```

This appears to be a similar bug as [#5667](https://github.com/Itseez/opencv/issues/5667) for knnMatch, however the [fix](https://github.com/Itseez/opencv/pull/6009) for that bug doesn't apply here

The bug seems to be related to an allocate call.  It seems to be avoided for python3 and some people just disable the warning [link](http://stackoverflow.com/questions/32931856/cv2-3-0-0-cv2-flannbasedmatcher-flann-knnmatch-is-throwing-cv2-error), however it would be better to identify the problem (eg for python 2) and prevent it occurring.
Repository: go
Issue: tour: figure out how to make pic.Show interact well with debug prints
Labels: help wanted

Context: https://tour.golang.org/moretypes/15

Running the slices exercise doesn't display bluescale image. Instead it displays the slices of slices returned by Pic and as the last line prints "IMAGE: <base64-value>".
Repository: youtube-dl
Issue: Support request for http://knpuniversity.com
Labels: site-support-request

This website provides video tutorials in PHP programming.  

There are some free tracks on the website which can be downloaded by the tool. 

Example of video page: http://knpuniversity.com/screencast/symfony/twig-layouts
Example of playlist page: http://knpuniversity.com/screencast/symfony
Repository: rust
Issue: rustdoc's search-index.js file is huge for large projects
Labels: T-rustdoc,C-enhancement,I-heavy,A-rustdoc-search

See https://bugzilla.mozilla.org/show_bug.cgi?id=1245213#c3

We should fix SpiderMonkey / the profiler to be smarter, but 15.2 MB is a _lot_ of JS to load on every page load. Looks like this file will also create a ton of JS objects/strings.

Can we load this file only when we're using the search bar? Maybe we can split it up somehow and load only the relevant parts? Or come up with a more efficient format for it?
Repository: kubernetes
Issue: Support "Delete" and "Get" via UID or with UID as a precondition
Labels: area/api,sig/api-machinery,lifecycle/frozen

Currently we use `<namespace, name>` pair as the identifier for a delete operation, e.g., https://github.com/kubernetes/kubernetes/blob/master/pkg/client/unversioned/pods.go#L72. However, the `<namespace, name>` pair is not unique across time, and it may lead to a race condition like #19403.
To make the Delete unambiguous, we should support 
1. Delete via UID;
2. Delete via `<namepace, name>` and passing UID through DeleteOptions as a precondition.

The "Get" operation also suffers a similar problem. Users need to check the returned object' UID to make sure it is the object they intend to get. This is error prone. We should support "Get" via UID.
Repository: kubernetes
Issue: Umbrella issue for kubectl config command overhaul
Labels: priority/backlog,area/kubectl,sig/cli,lifecycle/frozen

`kubectl config` strongly departs from the command and output conventions of other commands. It shouldn't.

Current commands:
https://github.com/kubernetes/kubernetes/blob/master/docs/user-guide/kubectl/kubectl_config.md

Conventions:
https://github.com/kubernetes/kubernetes/blob/master/docs/devel/kubectl-conventions.md

Related: #5592, #7804, #8593, #8817, #9298, #10516, #10626, #10693, #10735, #11233, #16085, #16935, #20374

@deads2k proposed English descriptions: 
https://github.com/kubernetes/kubernetes/issues/8593#issuecomment-104272624
https://github.com/kubernetes/kubernetes/pull/20468#issuecomment-179812594

@thockin proposed a family of commands:
https://github.com/kubernetes/kubernetes/issues/8593#issuecomment-104503048
https://github.com/kubernetes/kubernetes/issues/10516#issuecomment-116965691

TODO: Create proposal

cc @jlowdermilk @deads2k @thockin @quinton-hoole @kubernetes/kubectl
Repository: You-Dont-Know-JS
Issue: "es6 & beyond": regex clarification
Labels: for second edition

From Chapter 2 on sticky regex 

> from the content of the source property, such as

Your code goes on to use toString, but not source.  You might clarify in future editions.
Repository: opencv
Issue: inpaint cannot handle borders
Labels: category: photo,RFC

I wanted to smooth some depth map images by using the `inpaint()` functionality. However, I noticed that the no depth information on the borders are not completely "washed out" from the function as I was expecting. A example can be seen in[ this question](http://answers.opencv.org/question/86569/inpainting-normal-behavior-or-a-bug/) by me in the official forum of OpenCV. My question is if this is an expected behavior or there is an actual problem in the implementation of the function.

Thanks.

Best,
Theo
Repository: vscode
Issue: Git - Automatically insert line breaks in git commit messages
Labels: help wanted,feature-request,git

I'm trying to get into the habit of writing good commit messages. Not sure if this should be the default but it would be really useful if vscode automatically wrapped commit message lines at say 80 chars and inserted line breaks.

I don't mean changing the appearance of the text in the commit message box, just before it's actually committed. The line length could be in an option too.
Repository: go
Issue: spec: formatting of tables relies on fixed-width fonts
Labels: NeedsInvestigation

On https://golang.org/ref/spec if you search for "array or slice" the table is not aligned as a table. I can't tell from this paragraph which is the 1st or the 2nd value in a range expression for different types.

(https://golang.org/doc/effective_go.html#for is clear on the range expression, though it's not the spec.)
Repository: vscode
Issue: activationEvents.workspaceContains doesn't fire for directory
Labels: feature-request,api

Is this expected?  Also, a general way to detect all workspace-open events, like 'workspaceContains:*' or an onDidChangeWorkspace event would be useful.