Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dub fetch for non-existent package name should have better error message #2679

Closed
ntrel opened this issue Aug 2, 2023 · 1 comment
Closed
Assignees
Labels

Comments

@ntrel
Copy link

ntrel commented Aug 2, 2023

System information

  • dub version: 1.33.0
  • OS Platform and distribution: Linux Mint 21
  • compiler version dmd v2.104.0

Bug Description

How to reproduce?

nick@nmt-pc:~/git/english$ dub fetch libssl-dev 
             Getting a release version failed: (1): Error: Got JSON of type null_, expected object.
             Retry with ~master...
Error (1): Error: Got JSON of type null_, expected object.

Expected Behavior

The code should show an error like:

Error: No package `libssl-dev` found

Logs

@WebFreak001 WebFreak001 added the bug label Aug 5, 2023
@Geod24 Geod24 self-assigned this Dec 28, 2023
Geod24 added a commit to Geod24/dub that referenced this issue Dec 28, 2023
The retry does not make sense, as one cannot add a package
to the registry without a release version.
It is also not in line with Dub strategy, as we are trying
to reduce the usage of branch dependencies.

This also fixes issue dlang#2679 which pointed out the error message
was sub-par. The API of the registry seems to have changed and
we now get `null` instead of `undefined`, leading to an error
inside the JSON module instead of the enforce being triggered.
@Geod24
Copy link
Member

Geod24 commented Dec 28, 2023

Fix: #2763

@Geod24 Geod24 closed this as completed in 56077da Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants