Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor lib/consts/consts.go #4537

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Refactor lib/consts/consts.go #4537

wants to merge 3 commits into from

Conversation

codebien
Copy link
Contributor

What?

It creates a dedicated package for version management. It moves the Semantic Versioning constant string to the new pkg, and it aliases the old.

Why?

It reduces the public surface of k6 API.

@codebien codebien self-assigned this Feb 11, 2025
@codebien codebien force-pushed the refactor-lib-consts branch from df82813 to 7e172af Compare February 11, 2025 14:38
@codebien codebien marked this pull request as ready for review February 11, 2025 15:00
@codebien codebien requested a review from a team as a code owner February 11, 2025 15:00
@codebien codebien requested review from oleiade, joanlopez, a team and inancgumus and removed request for a team and oleiade February 11, 2025 15:00
Copy link
Member

@inancgumus inancgumus left a comment

Choose a reason for hiding this comment

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

👍

@@ -0,0 +1,6 @@
// Package version handles k6 versioning
package version
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm curious if we really need the package for that? 🤔

How about moving this to the root (main package) and just access it as go.k6.io/k6.Version ?

//
// Deprecated: alias to support the legacy versioning API. Use the new version package,
// it will be removed as soon as the external services stop to depend on it.
const Version = version.SemVer
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you think that migration to the new const is hard enough? I mean, why not clean the package and just announce the breaking change?

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