Skip to content

docs(adr): application versioning#3

Open
wfouche wants to merge 11 commits intojbangdev:mainfrom
wfouche:dev/adr-application-versioning
Open

docs(adr): application versioning#3
wfouche wants to merge 11 commits intojbangdev:mainfrom
wfouche:dev/adr-application-versioning

Conversation

@wfouche
Copy link
Contributor

@wfouche wfouche commented Feb 20, 2026

$ jbang run app:1.0.0@jbangdev --version
1.0.0

@wfouche wfouche changed the title doc: ADR-0002 / Application Versioning docs: application versioning Feb 20, 2026
@wfouche wfouche marked this pull request as draft February 20, 2026 16:41
@wfouche wfouche marked this pull request as ready for review February 20, 2026 19:05
@wfouche wfouche changed the title docs: application versioning docs(adr): application versioning Feb 21, 2026
@wfouche
Copy link
Contributor Author

wfouche commented Feb 24, 2026

@maxandersen , ready to be reviewed and merged.

|*deciders*
a|
// list everyone involved in the decision
* Max Anderson
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Max Anderson
* @maxandersen

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed with Asciidoc update:


A JBang alias can point to:

Scripts:: Local files or remote URLs.
Copy link
Contributor

Choose a reason for hiding this comment

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

is this not repeating exactly same as whats on line 50 and down ?


Nested Aliases:: Other aliases already defined within JBang catalogs.

A JBang Alias can also be called a JBang Application. And just like with any normal software application, users want to be able to use different versions of the same JBang Application. JBang however currently lacks a versioning mechanism for aliases.
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see it as JBang Alias can be called a JBang Application - its more that anything jbang can run can be called an application; not just scripts nor just aliases.


Nested Aliases:: Other aliases already defined within JBang catalogs.

A JBang Alias can also be called a JBang Application. And just like with any normal software application, users want to be able to use different versions of the same JBang Application. JBang however currently lacks a versioning mechanism for aliases.
Copy link
Contributor

Choose a reason for hiding this comment

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

In this ADR we should call anything jbang can run/build/export an application (not just aliases) - in the code its called scriptref but its actually an appref so I'll use that below.


In order for a user to select a specific version of a JBang Application the following commands must support application versioning.

* The `jbang app install <alias@catalog>` command should support application versioning. The version information should be optional, and if not provided, the latest version of the application should be installed. Otherwise, the requested version of the application should be installed.
Copy link
Contributor

Choose a reason for hiding this comment

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

just so its clear, alias (without @catalog) is also an alias.


* The `jbang app install <alias@catalog>` command should support application versioning. The version information should be optional, and if not provided, the latest version of the application should be installed. Otherwise, the requested version of the application should be installed.

* The `jbang run <alias@catalog>` command should support application versioning. The version information should be optional, and if not provided, the latest version of the application should be executed. Otherwise, the requested version of the application should be executed.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* The `jbang run <alias@catalog>` command should support application versioning. The version information should be optional, and if not provided, the latest version of the application should be executed. Otherwise, the requested version of the application should be executed.
* The `jbang run <alias@catalog>` command should support application versioning. The version information should be optional, and if not provided, the version of the application the alias point to should be executed. Otherwise, the requested version of the application should be executed.

i.e. if alias points to g:a:1.2 it should run that version, not g:a:LATEST

This section outlines the ripple effects—both the wins and the new responsibilities—resulting from this change.

Positive: Reproducible Workflows::
Users can now pin aliases to specific versions (e.g., jbang mytool:1.2.3@catalog), ensuring CI/CD pipelines and scripts don't break when a remote alias is updated.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is promising a bit too much :) the remote alias being updated can still break ci/cd pipelines.

What this does is that the catalog does not need to have multiple versions listed
and users can override version even if catalog provider haven't add versions.

Positive: Slight Decrease in Disk Usage::
Since JBang will no longer fetch the latest version of an application, this would lead to fewer cached JARs and scripts.

Negative:: None that comes to mind.
Copy link
Contributor

Choose a reason for hiding this comment

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

more syntax to learn; but its all optional so wont disturb general usage.

Performance Benchmark::

Measure the delta in resolution time between a standard alias and a versioned alias to ensure no significant regressions in startup speed.

Copy link
Contributor

Choose a reason for hiding this comment

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

this ADR is missing how the version on the alias actually gets applied for the various types of application refs:

g:a:V (replace V)
alias:V@catalog
local files / http urls / GAV's (for it to work here we'll need some property replacement as version info is available in the urls)

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