-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File Watcher glob exclude patterns still don't work #173621
Comments
Glob patterns should work in any setup, opening for help wanted if someone wants to see if this reproduces in a similar setup and then whether there are any ideas what could cause this. When you enable trace logs, you can also see further information on how the file watcher is setup. Look for |
I enabled trace output and reloaded the window with the following exclude patterns:
The following messages were printed to the
If I use the absolute path
|
I am not able to reproduce this in a similar setup: Windows connected to WSL Ubuntu. Here you go:
So I believe this is not actually an issue with VS Code or the file watcher we use but something else. |
We use Perforce (unfortunately) on CentOS 7.5. Perforce marks all tracked files and directories as read-only until they are checked out; could file permissions cause an issue with the file watcher? Also, what further logs could I provide? |
Maybe, but we are also just relying on a 3rd party file watcher. If possible, can you try to reproduce this by just using https://github.com/parcel-bundler/watcher directly with the exclude options within the Linux host? |
This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines. Happy Coding! |
Can we reopen this? I was able to get to this today and I believe I have reproduced the issue using https://github.com/parcel-bundler/watcher. I used the code below to reproduce the issue. None of the glob patterns listed in the
Apologies if the code isn't great...I've never used javascript before: const watcher = require('@parcel/watcher');
const path = require('path');
async function main () {
const dir = '/home/scratch.tcitta_gpu_1/tcitta_pdx_sw/sw/nvriscv';
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
const ignoreGlob = [
'**/nvriscv',
'**/nvriscv/**',
'**/nvriscv/*/**',
// the directory is only ignored if this line is uncommented
//'/home/scratch.tcitta_gpu_1/tcitta_pdx_sw/sw/nvriscv'
];
const backend = "inotify";
// Subscribe to events
let subscription = await watcher.subscribe(
dir,
(err, events) => {
console.log(events);
},
{ ignore: ignoreGlob, backend: backend }
);
const minutes = 5;
sleep(minutes * 60 * 1000);
// later on...
subscription.unsubscribe();
}
main().then(() => process.exit(0), e => { console.error(e); process.exit(1) }) |
I've rarely ever seen them re-open an issue. It's tossed in the bin. Create a new issue with this new information and reference this closed issue so people can see the history. Let them decide if they want to work from the new issue, or close it and re-open the old issue. |
Type: Bug
Glob patterns for file watcher excludes are still not working for me with the latest VSCode released last week.
Local OS: Windows 11
Remote SSH host OS: centOS 7.5
I'm using a multi-root workspace through the Remote SSH extension. My multi-root workspace contains:
Where the file tree on disk is:
This is a client view into a large perforce depot, so opening
.../repo
as a workspace is not an option as I am not allowed to store a .vscode directory at the upper levels of the depot.I cannot exclude
secondDir
using any documented glob pattern. I must specify the absolute path to the directory, else I receive theunable to watch for file changes in this large workspace
popup.I have tried all of the following
files.watcherExclude
patterns in my.code-workspace
file with no success:Am I missing something? All the docs and comments on this thread as well as #137872 state that at least one of the above patterns should work.
--
VS Code version: Code 1.75.0 (e2816fe, 2023-02-01T15:23:45.584Z)
OS version: Windows_NT x64 10.0.22621
Modes:
Sandboxed: No
Remote OS version: Linux x64 5.4.152-2.x86_64
Remote OS version: Linux x64 5.4.152-2.x86_64
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: disabled_off
Extensions (27)
(1 theme extensions excluded)
The text was updated successfully, but these errors were encountered: