New package manager available in beta

Date

We are thrilled to announce the beta of a new package manager for Taxi, the powerful language designed for specifying APIs and domain models with precision and clarity.

The new package manager is a rebuild of Taxi’s existing package tooling, bringing support for things like Transitive dependencies, better local repository management, and git-backed dependency publishing.

Sync from Git

The new package manager supports consuming dependencies directly from a git repository, meaning you can deploy without additional infrastructure, such as Nexus:

taxi.conf
name: org.taxilang/test-project-b
version: 0.1.0
sourceRoot: src/
dependencies: {
     "org.taxilang/test-project-a" : "https://gitlab.com/taxi-lang/test-project-a.git"  
}

Of course, pinning to a specific branch or tag is supported too:

taxi.conf
name: org.taxilang/test-project-b
version: 0.1.0
sourceRoot: src/
dependencies: {
     # Pinned to the tag v2.0.0
     "org.taxilang/test-project-a" : "https://gitlab.com/taxi-lang/test-project-a.git#v2.0.0"  
}

Improved Nexus support

Although git-backed repos are new and shiny, our Nexus support isn’t going anywhere. We’ve rebuilt the engine that consumes from Nexus, to ensure those who prefer to deploy packages to a dedicated artifact manager are covered.

The deployment experience feels largely the same, but it’s better now. Promise.

Better local caching

We’ve rebuilt our local cache, to support both our git and nexus infrastructure.

Caches now live at ~/.taxi/repository by default.

VSCode tooling

The new package manager is integrated tightly into VSCode.

Adding a dependency in your taxi.conf file and saving automatically downloads the required dependencies to your local cache, and triggers recompilation:

Dependencies are automatically fetched on save
Dependencies are automatically fetched on save

Ctrl+Click to navigate to definition is supported for files loaded from packages too, as you’d expect.

New command: taxi install

When you’re working with local projects that aren’t yet published, you need a way to deploy them locally, so that other teams can consume them. That’s where taxi install comes in - just like mvn install or npm install.

taxi install will fetch any dependencies (including transitive dependencies) to your local repo, as well as publishing your dev project into your local repo, so that other projects can depend on it.

> taxi install

Taxi 1.49.0-SNAPSHOT @8f6d8a9 
Building org.taxilang/test-project-b/0.1.0 
Fetching dependencies for org.taxilang/test-project-b/0.1.0 
Compilation succeeded 
No sources were generated. Consider adding a source generator in the taxi.conf  
Installing org.taxilang/test-project-b/0.1.0 
Installing org.taxilang/test-project-b/0.1.0 to /home/martypitt/dev/vyne-sandbox/taxi-test-projects/test-project-b 
Installed  org.taxilang/test-project-b/0.1.0 at /home/martypitt/.taxi/repository/org/taxilang/test-project-b/0.1.0 

Getting it

The new package manager is available in the beta releases of Taxi 1.49.0.

Grab the new CLI

As always, pre-release versions of the Taxi CLI are available via our install script

wget https://raw.githubusercontent.com/taxilang/taxilang/develop/get-taxi-preview.sh
chmod +x get-taxi-preview.sh
./get-taxi-preview 1.49.0     

Grab the VSCode plugin

Grab the latest build of our VSCode plugin from here, then:

  • Click Download artifacts archive
  • Unzip the archive. Inside the zip there should be a file at /language-server/vscode-extension/taxi-language-server-1.49.0-SNAPSHOT.vsix
  • Open VSCode
  • Open the command bar, by pressing Ctrl+Shift P
  • Type VSIX, then choose “Extensions: Install from VSIX…”
  • Select the VSIX file from the unzipped directory

Feedback, please!

This is a beta release of the plugin, and we expect teething issues.

Please join our slack channel and share any feedback or issues you have!