Skip to content

Discussion: What are allowed version strings when self-hosting the runtime? #27579

@mdmower

Description

@mdmower

I'd like to clear-up the requirements on allowed version strings passed to

gulp dist --version_override=<version>

As part of #25873, publishers can opt to build and host the AMP runtime themselves. A guide is in preparation to support this feature (#27100). Some publishers might appreciate the ability to use their own versioning system.

The only technical requirement I'm aware of is the expectation that version must contain only characters allowed by a URL path segment (https://tools.ietf.org/html/rfc3986#section-3.3). One example where this restriction is assumed is in method calculateExtensionScriptUrl(), where rtv is not encoded before inserted in the URL. A simple way to enforce this requirement could be to stipulate version === encodeURIComponent(version), but this is admittedly more stringent than RFC3986.

Here are some simple examples that show version v1.2a doesn't blow up the world:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions