Skip to content

fix: implement custom serialization for Extension.minimum_coco_version#1010

Merged
SteveLauC merged 1 commit intomainfrom
fix/serialize_semver
Dec 16, 2025
Merged

fix: implement custom serialization for Extension.minimum_coco_version#1010
SteveLauC merged 1 commit intomainfrom
fix/serialize_semver

Conversation

@SteveLauC
Copy link
Copy Markdown
Member

Coco's version string does not adhere to semver's spec, so we had to write a custom deserialization impl to do the conversion:

0.9.1-SNPASHOT-2560 => 0.9.1-SNAPSHOT.2560

But we forget to serialize versions to Coco's format when writing extensions to disk. When Coco reads extension from disk, it sees valid semantic versions, which are not expected:

[WAR] [third_party:167] invalid extension: [base64-converter]:
  field [minimum_coco_version] has invalid version:
    failed to parse build number 'SNAPSHOT.2560'', caused by: ['invalid digit found in string']

This commit provides a custom serialization impl to fix the issue.

What does this PR do

Rationale for this change

Standards checklist

  • The PR title is descriptive
  • The commit messages are semantic
  • Necessary tests are added
  • Updated the release notes
  • Necessary documents have been added if this is a new feature
  • Performance tests checked, no obvious performance degradation

Coco's version string does not adhere to semver's spec, so we had to
write a custom deserialization impl to do the conversion:

```
0.9.1-SNPASHOT-2560 => 0.9.1-SNAPSHOT.2560
```

But we forget to serialize versions to Coco's format when writing
extensions to disk. When Coco reads extension from disk, it sees
valid semantic versions, which are not expected:

```
[WAR] [third_party:167] invalid extension: [base64-converter]:
  field [minimum_coco_version] has invalid version:
    failed to parse build number 'SNAPSHOT.2560'', caused by: ['invalid digit found in string']
```

This commit provides a custom serialization impl to fix the issue.
@SteveLauC SteveLauC merged commit 65a48ef into main Dec 16, 2025
4 checks passed
@SteveLauC SteveLauC deleted the fix/serialize_semver branch December 16, 2025 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants