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

absent directory in find-links causes TOML parse errors: "relative URL without a base" #7113

Closed
garthk opened this issue Sep 6, 2024 · 0 comments · Fixed by #7598
Closed
Labels
error messages Messaging when something goes wrong

Comments

@garthk
Copy link
Contributor

garthk commented Sep 6, 2024

G'day, again!

UV warns it failed to parse its configuration if find-links = ["dist"] but dist doesn't exist:

$ uv sync
warning: Failed to parse `pyproject.toml` during settings discovery:
  TOML parse error at line 266, column 1
      |
  266 | [tool.uv]
      | ^^^^^^^^^
  relative URL without a base

Resolved 2 packages in 2ms
Audited 1 package in 0.06ms

UV applies the rest of its configuration and continues:

$ uv pip list        
warning: Failed to parse `pyproject.toml` during settings discovery:
  TOML parse error at line 8, column 1
    |
  8 | [tool.uv]
    | ^^^^^^^^^
  relative URL without a base

Package Version
------- -------
cowsay  6.1

Opinions:

  • The warning should be shorter than seven lines, and more helpful. Which setting couldn't be parsed? Which line?
  • Failure to parse settings should be an error if the setting might have been relevant to the command.
Reproduction script:
cd "$(mktemp -d)"
uv init                                      
printf  >> pyproject.toml  '%s\n' '[tool.uv]' 'find-links = ["dist"]' 'dev-dependencies= ["cowsay"]'
uv sync
uv pip list
uv sync --verbose
Verbose output:
$ uv sync --verbose
warning: Failed to parse `pyproject.toml` during settings discovery:
  TOML parse error at line 8, column 1
    |
  8 | [tool.uv]
    | ^^^^^^^^^
  relative URL without a base

DEBUG uv 0.4.5 (Homebrew 2024-09-04)
DEBUG Found project root: `/tmp/demo`
DEBUG No workspace root found, using project root
DEBUG Reading requests from `/tmp/demo/.python-version`
DEBUG The virtual environment's Python version satisfies `Python 3.12`
DEBUG Using request timeout of 30s
DEBUG Acquired lock for `~/.cache/uv/built-wheels-v3/path/3188e031165e9209`
DEBUG Found static `pyproject.toml` for: tmp-tjwfaj0qd5 @ file:///tmp/demo
DEBUG No workspace root found, using project root
DEBUG Released lock at `~/.cache/uv/built-wheels-v3/path/3188e031165e9209/.lock`
DEBUG Existing `uv.lock` satisfies workspace requirements
Resolved 2 packages in 2ms
DEBUG Using request timeout of 30s
DEBUG Requirement already installed: cowsay==6.1
Audited 1 package in 0.06ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error messages Messaging when something goes wrong
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants