Skip to content

Added alias jython-cli-next - #35

Merged
jeff5 merged 1 commit into
jython:mainfrom
wfouche:dev/jython-next
Aug 30, 2026
Merged

jeff5 merged 1 commit into
jython:mainfrom
wfouche:dev/jython-next

Conversation

@wfouche

@wfouche wfouche commented Aug 28, 2026 •

Copy link
Copy Markdown
Member

@jeff5 , @Stewori - I've made a small change to the jbang-catalog.json configuration file to allow multiple versions of Jython to be used.

$ jbang run jython-cli@jython -V
2.7.4

$ jbang run jython-cli-next@jython -V
2.7.5b1

JBang is being extended to allow the version string to be specified as part of the alias on the command-line:

  • jbang run jython-cli:2.7.5b1@jython -V

but this functionality is not yet available.

Defining a unique alias (jython-cli-next) to launch the 2.7.5b1 version is the best we can do at the moment.

@jeff5

jeff5 commented Aug 29, 2026

Copy link
Copy Markdown
Member

This seems like a good idea (until the newer feature). I'll pull the PR branch and try it.

@jeff5

jeff5 commented Aug 29, 2026

Copy link
Copy Markdown
Member

LGTM. Any objections to merging? (Probably rebase merge as only one commit.)

@wfouche

wfouche commented Aug 30, 2026

Copy link
Copy Markdown
Member Author

Please merge. :-)

@jeff5
jeff5 merged commit 1170ce6 into jython:main Aug 30, 2026
1 check passed
@jeff5

jeff5 commented Aug 30, 2026

Copy link
Copy Markdown
Member

Testing a minute or two after the merge produces somewhat inconsistent results. It's not our fault I think, so I just exhibit it as a curiousity.

PS vsj> jbang jython-cli-next@jython -V
[jbang] [ERROR] No alias found with name 'jython-cli-next'
[jbang] Run with --verbose or -x for more details. The --verbose or -x must be placed before the jbang command. I.e. jbang --verbose run [...]
PS vsj> jbang jython-cli@jython -V
Jython 2.7.4
PS vsj> jbang jython-cli-next@jython -V
Jython 2.7.4

Yes, really. And it did it a second time.

PS vsj> jbang jython-cli-next@jython -V
Jython 2.7.4
PS vsj> jbang run --fresh jython-cli-next@jython -V
[jbang] Resolving dependencies...
[jbang]    org.tomlj:tomlj:1.1.1
[jbang] Dependencies resolved
[jbang] Building jar for JythonCli.java...
Jython 2.7.5b1
PS vsj> jbang jython-cli-next@jython -V
Jython 2.7.5b1

@wfouche

wfouche commented Aug 30, 2026

Copy link
Copy Markdown
Member Author

JBang caches the jbang-catalog.json file + other files, and periodically invalidates cache entries to force fresh copies of files to be fetched. It looks like improvements can be made in this area of JBang.

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