Tolerate errors in loading unused plugins
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start by tracing plugin registration and CLI option parsing, especially how plugin-specific options such as --logger-mylogger-option are registered and processed. Define how failed unused plugins are recorded and warned about, then verify that selecting a failed plugin produces an informative error while unrelated execution continues.
Written by the indexing model from the issue text.
Description
In general I don't think that errors in loading plugins should prevent Snakemake from executing if that plugin is not used.
I think a good alternative would be to catch general exceptions in plugin code during registration (such as when importing the plugin module), log a warning instead, and store the information that loading the plugin failed. Then if the plugin is actually used Snakemake could fail with an informative error message (possibly printing the original stack trace).
Note that this would probably require special error handling around CLI option parsing - if plugin-specific options are specified, e.g. snakemake --logger mylogger --logger-mylogger-option foo, and an error occurred in loading the mylogger plugin, its settings won't be registered and the --logger-mylogger-option option won't be recognized. This will raise an exception before --logger mylogger is even processed. It should be easy to catch the error, figure out the registry and plugin name, and display the plugin load error if it exists.
I'd be happy to contribute a PR for this.
- Dominant language
- Python
- Stars
- 0
- Forks
- 7
- Avg merge
- 13m
- Merged PRs (30d)
- 2
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from snakemake/snakemake-interface-common
-
plugin settings with list values cannot be parsedPossibly taken @tedil claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
`io.py` needs python 3.11 for `StrEnum`, which breaks older envsPossibly taken @tedil claimed this 4 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
Difficulty 5/5 Over a week Newbie friendliness 42/100
snakemake/snakemake-interface-common#95 · 8 comments · 3 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
snakemake/snakemake-interface-common#80 · 3 comments ·
All issues in snakemake/snakemake-interface-common
Similar issues
-
filesystem: `file://C:/...` bucket_url is read as a UNC share named `C:` and silently lists no filesOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
comp/desktop desktop/shell os/windows P3 tool/file type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
NousResearch/hermes-agent#145928 ·
Maintainers usually reply within 1 day
-
integration:coding-agents
Difficulty 1/5 Under an hour Newbie friendliness 83/100
vectorize-io/hindsight#6151 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
FormalLanguageConstrainedPathQuerying/FLPQ_Data#174 ·
Maintainers usually reply within 1 day
-
[VLM] granite_vision preset produces empty output and runs ~3× slower with Granite Vision 3.3-2B than with Granite Vision 4.1-4BPossibly taken @prassu017 claimed this today. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
docling-project/docling#5068 · 4 comments ·
Maintainers usually reply within 1 day