karma-runner / karma-runner/karma
[unhandledRejection] .#* Emacs lock files
- Dominant language
- JavaScript
- Stars
- 12k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
emacs [lockfile](https://www.gnu.org/software/emacs/manual/html_node/emacs/Interlocking.html) raise following error with auto-watch option
```
01 09 2021 10:48:54.282:ERROR [karma-server]: [Error: ENOENT: no such file or directory, stat '/mnt/dd/0-0user_local/tmp/Seed-vue-webpack-karma-chaiAsPromised/test/unit/.#index.js'] {
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: '/mnt/dd/0-0user_local/tmp/Seed-vue-webpack-karma-chaiAsPromised/test/unit/.#index.js'
}
Error: ENOENT: no such file or directory, stat '/mnt/dd/0-0user_local/tmp/Seed-vue-webpack-karma-chaiAsPromised/test/unit/.#index.js'
```
There is same issue
- https://github.com/karma-runner/karma/issues/65
It seems [exclude](https://karma-runner.github.io/6.3/config/configuration-file.html#exclude) option is working correctly with
- https://github.com/karma-runner/karma/blob/master/lib/watcher.js
function createIgnore return true for .#index.js file.
finally I couldn't find the reason.
It tested with
- https://github.com/elmoknit/Seed-vue-webpack-karma-chaiAsPromised
--> test case (ubuntu 18.04)
```
$ git clone https://github.com/elmoknit/Seed-vue-webpack-karma-chaiAsPromised
$ cd Seed-vue-webpack-karma-chaiAsPromised/
$ npm install
$ ./node_modules/karma/bin/karma start test/unit/karma.conf.js --auto-watch
```
then execute emacs
```
$ emacs -q test/unit/index.js
```
and type Enter to edit file. Karma will raise error.
```
01 09 2021 10:48:54.282:ERROR [karma-server]: [Error: ENOENT: no such file or directory, stat '/mnt/dd/0-0user_local/tmp/Seed-vue-webpack-karma-chaiAsPromised/test/unit/.#index.js'] {
errno: -2,
code: 'ENOENT',
syscall: 'stat',
path: '/mnt/dd/0-0user_local/tmp/Seed-vue-webpack-karma-chaiAsPromised/test/unit/.#index.js'
}
Error: ENOENT: no such file or directory, stat '/mnt/dd/0-0user_local/tmp/Seed-vue-webpack-karma-chaiAsPromised/test/unit/.#index.js'
```
Emacs create .#index.js to protect simultaneous editing when file is edited. .#index.js is a symbolic link. If file system does not support symbolic links, a regular file is used [[File Locks](https://www.gnu.org/software/emacs/manual/html_node/emacs/Interlocking.html)].
exclude option of karma config also not working for .#index.js file.
Contributor guide
Assessment
This issue has not been assessed yet.