Skip to content
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-types output is racy #749

Closed
scop opened this issue Jun 20, 2023 · 0 comments · Fixed by #750
Closed

--file-types output is racy #749

scop opened this issue Jun 20, 2023 · 0 comments · Fixed by #750

Comments

@scop
Copy link
Contributor

scop commented Jun 20, 2023

When running --file-types over a directory containing many files, using several threads, some lines are garbled in the output, apparently because multiple threads output simultaneously. Running with --threads=1 avoids the issue.

An example from running in the checked out https://github.com/scop/bash-completion/tree/master/completions dir, on a box with 2 cores (4 "CPUs"). Output varies between runs, but every one exhibits the same issue.

$ typos --file-types | grep -v ':-$'
./Makefile.am:make
./update-rc.d:d
-
-
./invoke-rc.d:d
./checksec:-./chgrp:
-
./btdownloadheadless.py:py
./apt-get:-./apt-cache:
-
./_umount:./_udevadm-
./vipw:./usermod:--

./tracepath:./tree:--

./rpm2tgz:-./secret-tool:
-
-

The following lines are expected, there should be no other output from the above command.

./Makefile.am:make
./update-rc.d:d
./invoke-rc.d:d
./btdownloadheadless.py:py
@scop scop changed the title file-types --file-types is racy Jun 20, 2023
@scop scop changed the title --file-types is racy --file-types output is racy Jun 20, 2023
epage added a commit to epage/typos that referenced this issue Jun 20, 2023
In 3a29410, we switched to anstream
which doesn't seem to be locking properly (rust-lang/cargo#12289).  For
now, we are working around it.

Fixes crate-ci#749
phip1611 pushed a commit to phip1611/typos that referenced this issue Dec 5, 2023
In 3a29410, we switched to anstream
which doesn't seem to be locking properly (rust-lang/cargo#12289).  For
now, we are working around it.

Fixes crate-ci#749
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant