Slightly misleading error message when adding a repository with wrong url
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 64/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- ocaml
- Domain
- cli
Research direction
Start at the opam repository command entry points for adding a repository and changing its URL, and locate the existing “Repository repo is already set up” error text. Update the message to explain that the mapping is global and distinguish adding it to the current switch from changing its address; done when the resulting error clearly covers both cases.
Written by the indexing model from the issue text.
Description
When a repository name has already been assigned (globally, but the user isn't aware) and added to one switch, then tried to be added with another url in another switch, the error message can be a bit confusing:
[ERROR] Repository repo is already set up and points to https://example.org/repo. To change that, use 'opam repository set-url repo https://example.org/repo2'.
I think the information that the mapping is global and that the set up may have happened in another switch should be made more explicit.
Maybe something like this?
[ERROR] Repository repo has already been globally set up and points to https://example.org/repo.
To add the repository to the current switch with this address, use 'opam repository add repo';
to change the address, use 'opam repository set-url repo https://example.org/repo2'.
- Dominant language
- OCaml
- Stars
- 1.4k
- Forks
- 410
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 15
Contributor guide
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 ocaml/opam
-
AREA: DOCUMENTATION
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
AREA: TEST
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
AREA: SANDBOX AREA: UI
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
AREA: UI
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
AREA: API AREA: DOCUMENTATION
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
from:qa priority:P2 reliability tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
spec-kitty/spec-kitty#4874 ·
-
0. Needs triage bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nextcloud/fulltextsearch#1011 ·
-
automation code-quality cookie deep-report documentation improvement quick-win task-mining
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100