Skip to content

Conversation

@akinross
Copy link
Collaborator

No description provided.

@akinross akinross added the jira-sync Sync this issue to Jira label Jan 20, 2026
@github-actions github-actions bot changed the title [ignore] add support for version setting to class from meta and override [ignore] add support for version setting to class from meta and override (DCNE-636) Jan 20, 2026
Copy link
Collaborator

@shrsr shrsr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Collaborator

@gmicol gmicol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

// A dash at the end of a range (ex. 4.2(7f)-) indicates that the class is supported from the first version to the latest version.
Versions []VersionRange
// Parsed from the "versions" field in the meta file (e.g., "1.0(1e)-", "4.2(7f)-4.2(7w),5.2(1g)-").
// TODO: Add DeprecatedVersions field when meta file exposes deprecation information.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not already support DeprecatedVersions from override files so we can already get started using it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially removed because it is not supported from meta, and not sure how we would implement it. Kind of following YAGNI principle, which is not always the correct approach if you foresee it will be implemented. But think especially considering it being a completely isolated part it could have easily been added later.

After our discussion put it back where it only allows it being set from definition. We should have a follow up discussion on development documentation that documents these things properly. Issue is already created for tracking this.

return versionRanges, nil
}

func parseVersionRange(metaVersionRange string) (*VersionRange, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be NewVersionRange from the above NewVersions?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it from consistency point of view.

Not sure it was really needed and if the current split is actually then the "right" approach. We could explore changing all these structs to leverage builder pattern or exposing the attributes as input but in the scope of the generator I find this overkill. I think for our generator usecase the current split provides enough flexibility without adding to much complexity.

@akinross akinross requested review from gmicol, lhercot and shrsr January 23, 2026 10:22
Copy link
Collaborator

@shrsr shrsr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

jira-sync Sync this issue to Jira

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants