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

cmd: Rename jx to jnx and split out flag version #36

Merged
merged 1 commit into from
Feb 4, 2025
Merged

Conversation

camh-
Copy link
Member

@camh- camh- commented Dec 28, 2024

Rename jx to jnx as the jx binary name is already taken by jenkinsx.
But jnx is also a better name since it sounds like jinx, and that's what
you say when someone duplicates a word at the same time as you. jsonnet
is about de-duplicating through templating, so jnx works. It can also be
pronounced as a single syllable, which is also nice.

Split the Go flag version of jnx into a completely separate program
rather than having a parseCLI() function selected by build tags.

The only reason for the flag version is to use the flag code path of
jsonnext to demonstrate its use and to verify it works. jnx itself is
going to evolve in future to contain subcommands which I do not intend
to support in the flag version of jnx. So split it out so jnx can evolve
on its own.

Keep jx.jsonnet for now for backwards compatibility. It will be
removed when I know I've removed all existing uses under that name.

@camh- camh- requested a review from juliaogris December 28, 2024 05:29
@camh- camh- changed the base branch from master to hermitise December 28, 2024 07:11
@camh- camh- force-pushed the hermitise branch 2 times, most recently from 0d977f4 to 165c09a Compare December 28, 2024 07:15
juliaogris
juliaogris previously approved these changes Jan 6, 2025
Copy link
Member

@juliaogris juliaogris left a comment

Choose a reason for hiding this comment

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

Looks good to me, but I haven't checked out and grepped this time.
I like jinx as the name is this tool and its evolution.

I wonder if the repo could/should be renamed to jnx as well and if it works be worth it removing the stdlib flag implementation altogether?

@camh- camh- deleted the branch master January 30, 2025 01:32
@camh- camh- closed this Jan 30, 2025
@camh- camh- reopened this Jan 30, 2025
Rename `jx` to `jnx` as the jx binary name is already taken by jenkinsx.
But jnx is also a better name since it sounds like jinx, and that's what
you say when someone duplicates a word at the same time as you. jsonnet
is about de-duplicating through templating, so jnx works. It can also be
pronounced as a single syllable, which is also nice.

Split the Go flag version of jnx into a completely separate program
rather than having a `parseCLI()` function selected by build tags.

The only reason for the flag version is to use the flag code path of
jsonnext to demonstrate its use and to verify it works. jnx itself is
going to evolve in future to contain subcommands which I do not intend
to support in the flag version of jnx. So split it out so jnx can evolve
on its own.

Keep `jx.jsonnet` for now for backwards compatibility. It will be
removed when I know I've removed all existing uses under that name.
@camh- camh- changed the base branch from hermitise to master January 30, 2025 01:34
@camh- camh- dismissed juliaogris’s stale review January 30, 2025 01:34

The base branch was changed.

@camh-
Copy link
Member Author

camh- commented Jan 30, 2025

I wonder if the repo could/should be renamed to jnx as well and if it works be worth it removing the stdlib flag implementation altogether?

I don't think so. The idea behind this repository was to provide an easy way to put jsonnet into your own app with some extensions that make it more useful. To that end, the stdlib flag package is still useful. And jnx is just an example of use of the libraries, not the purpose of the repo, so I do not want to rename the repo for that.

@juliaogris
Copy link
Member

Lgtm still

Copy link
Member

@juliaogris juliaogris left a comment

Choose a reason for hiding this comment

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

💚 looks still good to me. this time i even grepped myself.

@camh- camh- merged commit cdbabb2 into master Feb 4, 2025
2 checks passed
@camh- camh- deleted the rename-to-jnx branch February 4, 2025 05:30
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.

2 participants