Skip to content

Allow scaffold to add a new version for an existing library#1666

Merged
vjovanov merged 1 commit into
masterfrom
jormundur00/gh-1665
Apr 9, 2026
Merged

Allow scaffold to add a new version for an existing library#1666
vjovanov merged 1 commit into
masterfrom
jormundur00/gh-1665

Conversation

@jormundur00

Copy link
Copy Markdown
Member

Summary

  • allow scaffold to generate a new metadata/test scaffold for a fresh version of an already supported groupId:artifactId
  • keep duplicate exact-version scaffolds blocked unless --force is used
  • preserve the correct latest entry when appending versions, including older versions
  • format updated index.json files with the repositorys multi-line pretty-print style

Details

  • replace the old artifact-root existence check with version-aware checks against the metadata version directory, test directory, and existing index.json entry
  • append a new metadata entry to an existing artifact index.json instead of failing just because the artifact root already exists
  • recompute latest from the highest metadata version after updates instead of relying on insertion order
  • align ScaffoldTask JSON output with the formatting used by the other index update tasks

Testing

  • ../../gradlew test --tests org.graalvm.internal.tck.ScaffoldTaskTests --stacktrace

Fixes: #1665

@jormundur00 jormundur00 requested review from kimeta and vjovanov and removed request for kimeta April 9, 2026 16:39
@jormundur00 jormundur00 self-assigned this Apr 9, 2026
@jormundur00 jormundur00 added the enhancement New feature or request label Apr 9, 2026
@vjovanov vjovanov merged commit 0ec004a into master Apr 9, 2026
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Scaffold shouldn't fail when attempting to scaffold a different version of an existing library

2 participants