Do not collect ConfigFile instances #52

Manually merged
BaumiCoder merged 1 commit from bugfix/Too-many-open-files-via-ConfigFile into main 2026-06-04 18:53:13 +02:00
Owner

Bug fix for #38 and #8

User perspective

Fixes a problem with too many open files when process all relevant .editorconfig files for the status command or for the handling of spelling_language in the check command.

Developer perspective

Collecting the ConfigFile instances from ConfigFiles::open in a vector means that all these instances of file handles are open at the same time! This can lead to too many open file handles for the process / system.
A "Too many open files" already occurs on my local machine (not in the CI) when running the tests

files::tests::get_target_files::test_get_target_files_bool_options
files::tests::get_editorconfig_files::test_get_editorconfig_files_bool_options

(However, only if I run all tests and not if I run them separately.)

This problem was introduced with commit 5263ffc.

Bug fix for #38 and #8 ### User perspective Fixes a problem with too many open files when process all relevant `.editorconfig` files for the `status` command or for the handling of `spelling_language` in the `check` command. ### Developer perspective Collecting the ConfigFile instances from ConfigFiles::open in a vector means that all these instances of file handles are open at the same time! This can lead to too many open file handles for the process / system. A "Too many open files" already occurs on my local machine (not in the CI) when running the tests ``` files::tests::get_target_files::test_get_target_files_bool_options files::tests::get_editorconfig_files::test_get_editorconfig_files_bool_options ``` (However, only if I run all tests and not if I run them separately.) This problem was introduced with commit 5263ffc.
Do not collect ConfigFile instances
All checks were successful
/ changes (pull_request) Successful in 52s
/ lint_reuse (pull_request) Successful in 1m13s
/ lint_codespell (pull_request) Successful in 1m7s
/ lint_ecformat (pull_request) Successful in 9m15s
/ test (pull_request) Successful in 5m22s
/ lint_cargo_deny (advisories) (pull_request) Has been skipped
/ lint_cargo_deny (bans licenses sources) (pull_request) Has been skipped
/ lint_clippy (pull_request) Successful in 3m34s
/ lint_rustfmt (pull_request) Successful in 1m58s
/ lint_taplo (pull_request) Has been skipped
/ lint_yamllint (pull_request) Has been skipped
/ lint_cargo_udeps (pull_request) Successful in 22m57s
/ lint_docs_rs (pull_request) Successful in 4m25s
6f84debe23
Collecting the ConfigFile instances from ConfigFiles::open in a vector
means that all this instances of file handles are open at the same time!
This can lead to too many open file handles for the process / system.
A "Too many open files" already occurs on my local machine
(not in the CI) when running the tests
files::tests::get_target_files::test_get_target_files_bool_options
files::tests::get_editorconfig_files::test_get_editorconfig_files_bool_options
(However, only if I run all tests and not if I run them separately.)
BaumiCoder manually merged commit 3058d3f1a2 into main 2026-06-04 18:53:13 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
BaumiCoder/ecformat!52
No description provided.