Prevent crash if `.julia/registries` does not exist

Open Beginner friendly
#95 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
julia, python
Domain
tooling

Research direction

Reproduce the crash by running juliapkg.add() in a fresh Julia environment where .julia/registries is absent, then trace the registry handling from that entry point. Done means juliapkg.add() completes without requiring the caller to create the directory, including in a fresh CI-style environment.

Written by the indexing model from the issue text.

Description

In the current implementation, upon doing juliapkg.add() in an environment where .julia/registries does not yet exist, juliapkg crashes.
This may seem like an edge case, but is a common occurrence for CI and testing where Julia environments are commonly freshly instantiated and have not yet been used before using juliapkg, e.g. with julia-actions/setup-julia@v3.
My current workaround is to create the folder from the test script if it doesn't exist, but it would be better if juliapkg handles this without crashing. Hope that can be arranged!

Dominant language
Python
Stars
67
Forks
24
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JuliaPy/pyjuliapkg

All issues in JuliaPy/pyjuliapkg

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.