tamasfe / taplo

A TOML toolkit written in Rust
https://taplo.tamasfe.dev
MIT License
1.44k stars 114 forks source link

Underscores in urls for pyproject.toml not supported for [tool.poetry.dependencies] #572

Closed bavalpey closed 8 months ago

bavalpey commented 8 months ago

Sorry in advance if this isn't the right repository to file this issue under - I could not determine the source of the schema for this section of pyproject.toml.

I'm getting spurious validation errors for the urls in my [tool.poetry.dependencies] section. It works for many of the entries, but any urls that have an underscore (or a few other characters like %20) in them are flagged as not matching the schema: As an example pyproject.toml

[build-system]
requires = ["poetry-core"]

[tool.poetry]
name = "foo"
version = "0.1.0"
description = "my foo project"
authors = ["Name"]

[tool.poetry.dependencies]
my_repo = { git = "git@github.com:user/my_repo.git"}

This will report an error: {"git":"git@github.com:user-roc/my_repo.git"} is not valid under any of the given schemas

ia0 commented 8 months ago

Indeed this is not the right repository :-) The right repository is SchemaStore and they already have an issue for this AFAICT: https://github.com/SchemaStore/schemastore/issues/3575. So you can follow that one and I'll be closing this one. As soon as it's fixed on the SchemaStore side, it will work in Taplo.

gdlx commented 2 months ago

@ia0 I have the exact same issue with taplo bundled in Even Better TOML in VSCode. Is it because no version has been released for a year ?

ia0 commented 2 months ago

I'm not working on Taplo anymore. But if this is a schema problem like indicated by the issue, then it's not a Taplo issue and doesn't depend on Taplo version. The schemas are downloaded. So you might have a different problem and will need to open a new issue with reproduction steps if you believe this is Taplo.

gdlx commented 2 months ago

OK, thanks !