Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

Commit b714d0e

Browse files
Gio/release with static analysis (#110)
* Fix issue missing tree_sitter_python * Explicitly make FORK the multiprocessing option to choose This is because in the MacOS release build (at least) I keep seeing errors like: ``` Error: No such option: --multiprocessing-fork Usage: main [OPTIONS] COMMAND [ARGS]... Try 'main --help' for help. Error: No such option: -B Usage: main [OPTIONS] COMMAND [ARGS]... Try 'main --help' for help. ``` Which are from instantiating new processes, for sure. This SO question: https://stackoverflow.com/questions/67999589/multiprocessing-with-pool-throws-error-on-m1-macbook Indicates it might be the way it creates new processes and suggests using "fork" explicitly. We're giving that a go.
1 parent 0556cd6 commit b714d0e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

codecov_cli/services/staticanalysis/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import logging
44
import typing
55
from functools import partial
6-
from multiprocessing import Pool
6+
from multiprocessing import get_context
77
from pathlib import Path
88

99
import click
@@ -41,7 +41,7 @@ async def run_analysis_entrypoint(
4141
length=len(files),
4242
label="Analyzing files",
4343
) as bar:
44-
with Pool(processes=numberprocesses) as pool:
44+
with get_context("fork").Pool(processes=numberprocesses) as pool:
4545
file_results = pool.imap_unordered(mapped_func, files)
4646
for x in file_results:
4747
bar.update(1, x)

0 commit comments

Comments
 (0)