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

consider having a single source of truth for chalk version #138

Closed
ee7 opened this issue Jan 19, 2024 · 0 comments · Fixed by #140
Closed

consider having a single source of truth for chalk version #138

ee7 opened this issue Jan 19, 2024 · 0 comments · Fixed by #140
Assignees

Comments

@ee7
Copy link
Contributor

ee7 commented Jan 19, 2024

Description

Currently, we have to update the chalk version in two places for every release:

chalk_version := "0.3.0"

version = "0.3.0"

Historically, that's caused the versions to go out-of-sync: #28.

Happily, chalk has since received a test to ensure that doesn't happen again (#41), but it's still probably marginally worthwhile to define the version in one place.

We can do that by making the nimble file read base_keyspecs.c4m.

This isn't a high-priority user-facing thing, but it'd also help with making a development version of chalk write a distinguishable CHALK_VERSION from a release version of chalk, if that's something we deemed worthwhile.

Result

A single source of truth for the chalk version, at the cost of a few extra lines and a staticRead in the nimble file.

Dependencies

None.

Subtickets

None.

@ee7 ee7 self-assigned this Jan 19, 2024
ee7 added a commit that referenced this issue Jan 19, 2024
ee7 added a commit that referenced this issue Jan 19, 2024
ee7 added a commit that referenced this issue Jan 22, 2024
Before this commit, we had to update the chalk version in two places.
One was in src/configs/base_keyspecs.c4m:

    chalk_version :=   "0.3.1"

And the other in chalk.nimble:

    version       = "0.3.1"

Historically, this duplication has caused the versions to go out of
sync such that a chalk mark contained an incorrect CHALK_VERSION [1].
The tests in chalk now guard against that [2], but it's still better to
define the version in one place.

Make the keyspecs version the single source of truth, setting the
version in the nimble file from there.

This will also help with making a development version of chalk have a
distinguishable version string from a release version of chalk, if
that's something we deem worthwhile.

Also, refactor to remove the macro that was previously used in setting
the version.

Closes: #138

[1] #28
[2] 2f1b55c, 2023-10-06, "test(lint): adding pre-commit hook for checking chalk version across files"
ee7 added a commit that referenced this issue Jan 22, 2024
Before this commit, we had to update the chalk version in two places.
One was in src/configs/base_keyspecs.c4m:

    chalk_version :=   "0.3.1"

And the other in chalk.nimble:

    version       = "0.3.1"

Historically, this duplication has caused the versions to go out of
sync such that a chalk mark contained an incorrect CHALK_VERSION [1].
The tests in chalk now guard against that [2], but it's still better to
define the version in one place.

Make the keyspecs version the single source of truth, setting the
version in the nimble file from there.

This will also help with making a development version of chalk have a
distinguishable version string from a release version of chalk, if
that's something we deem worthwhile.

Also, refactor to remove the macro that was previously used in setting
the version.

Closes: #138

[1] #28
[2] 2f1b55c, 2023-10-06, "test(lint): adding pre-commit hook for checking chalk version across files"
ee7 added a commit that referenced this issue Jan 22, 2024
Before this commit, we had to update the chalk version in two places.
One was in src/configs/base_keyspecs.c4m:

    chalk_version :=   "0.3.1"

And the other in chalk.nimble:

    version       = "0.3.1"

Historically, this duplication has caused the versions to go out of
sync such that a chalk mark contained an incorrect CHALK_VERSION [1].
The tests in chalk now guard against that [2], but it's still better to
define the version in one place.

Make the keyspecs version the single source of truth, setting the
version in the nimble file from there.

This will also help with making a development version of chalk have a
distinguishable version string from a release version of chalk, if
that's something we deem worthwhile.

Also, refactor to remove the macro that was previously used in setting
the version.

Closes: #138

[1] #28
[2] 2f1b55c, 2023-10-06, "test(lint): adding pre-commit hook for checking chalk version across files"
ee7 added a commit that referenced this issue Jan 26, 2024
Before this commit, we had to update the chalk version in two places.
One was in src/configs/base_keyspecs.c4m:

    chalk_version :=   "0.3.1"

And the other in chalk.nimble:

    version       = "0.3.1"

Historically, this duplication has caused the versions to go out of
sync such that a chalk mark contained an incorrect CHALK_VERSION [1].
The tests in chalk later guarded against that [2], but it's still better
to define the version in one place.

Make the keyspecs version the single source of truth, setting the
version in the nimble file from there.

This will also help with making a development version of chalk have a
distinguishable version string from a release version of chalk, if
that's something we deem worthwhile.

Also, refactor to remove the macro that was previously used in setting
the version.

Closes: #138

[1] #28
[2] 2f1b55c, 2023-10-06, "test(lint): adding pre-commit hook for checking chalk version across files"
@ee7 ee7 closed this as completed in #140 Jan 26, 2024
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 a pull request may close this issue.

1 participant