Skip to content

Dependency version field limited to 100 chars even when specifying a package URL #5459

Closed

Description

@mirinae3145

What kind of issue is this?

  • PlatformIO Core

Configuration

PlatformIO Version: 6.1.19

Description of problem

When a dependency entry in library.json specifies an URL instead of a SemVer, the version value is validated with the max=100 length constraint used for normal SemVer strings:

# platformio/package/manifest/schema.py
class DependencySchema(StrictSchema):
    owner = fields.Str(validate=validate.Length(min=1, max=100))
    name = fields.Str(required=True, validate=validate.Length(min=1, max=100))
    version = fields.Str(validate=validate.Length(min=1, max=100))

This is fine for actual version strings, but an URL can sometimes exceed 100 characters.

Steps to Reproduce

  1. Create a library.json with a dependency that has no owner, and a version that is a long URL (>100 chars):
{
  "name": "ExampleLib",
  "version": "1.0.0",
  "dependencies": [
    {
      "name": "external-dep",
      "version": "https://github.com/some-org/some-repository/releases/download/some-long-prelease-version/some-long-binary-name.zip"
    }
  ]
}
  1. Run pio pkg pack.

Actual Results

ManifestValidationError: Invalid manifest fields: {'dependencies': {0: {'version': ['Length must be between 1 and 100.']}}}. 
Please check specification -> https://docs.platformio.org/page/librarymanager/config.html

So does with an actual URL.

Expected Results

This should be valid because version field maybe adheres to Remote TAR or ZIP archive spec when it is indicating a package specification, and other URL-compatible fields are mostly validated with max=255 such as:

# Class ManifestSchema
    downloadUrl = fields.Url(validate=validate.Length(min=1, max=255))

Activity

  1. added this to the 6.2.0 milestone on Jun 23, 2026
  2. ivankravets commented on Jun 23, 2026

    @ivankravets
    Member

    Thanks for the report! Please re-test with pio upgrade --dev.

  3. added a commit that references this issue on Jun 23, 2026
    0b82f71
  4. added a commit that references this issue on Sep 15, 2026
    c80dad5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions