Coder Social home page Coder Social logo

scalafmt-native-image's Introduction

GraalVM native-image launchers for scalafmt.

Note that Scala Native support in scalafmt is in the works. As soon as it is stable and provides launchers for Linux / macOS / Windows, the repository here should be sunset.

These launchers are generated on the scalafmt-native-image CI, and released here.

These launchers aim at being consumed by Scala CLI, but can also be useful on their own. Note that if the launcher scalafmt version and the scalafmt version in .scalafmt.conf don't match, the launcher will not proceed and fail loudly. Those versions have to match.

Getting the launchers

Linux

$ curl -fL https://github.com/alexarchambault/scalafmt-native-image/releases/download/launchers/scalafmt-3.0.0-x86_64-pc-linux.gz | gzip -d > scalafmt
$ chmod +x scalafmt
$ ./scalafmt --help

macOS

$ curl -fL https://github.com/alexarchambault/scalafmt-native-image/releases/download/launchers/scalafmt-3.0.0-x86_64-apple-darwin.gz | gzip -d > scalafmt
$ chmod +x scalafmt
$ ./scalafmt --help

Windows

(untested)

> curl -fLo scalafmt.zip https://github.com/alexarchambault/scalafmt-native-image/releases/download/launchers/scalafmt-3.0.0-x86_64-pc-win32.zip
> tar -xf scalafmt.zip
> mv scalafmt-3.0.0.exe scalafmt.exe
> scalafmt --help

Building the launcher locally

scalafmt-native-image is built with Mill. Generate a binary with

$ ./mill show native.nativeImage

Releases

Release numbers follow scalafmt versions, and need to be cut after each scalafmt release.

Typical release workflow, after a scalafmt release:

  • Scala Steward opens a PR bumping scalafmt. Just merge that PR if the CI is green (if it's red, investigate why).
  • create a scalafmt-native-image release from the GitHub UI (pushing a tag is not enough), with the same version number as scalafmt, prefixed with v.
  • stop any running master job (these might download the new tag, and try to push binaries on their own)
  • check from GitHub actions that the release job runs fine

The release job should push binaries as assets of the newly cut release.

If several scalafmt versions were cut since the last bump

In that case, bump the version in scalafmt-native-image step-by-step, and cut intermediate releases at each step, so that we get binaries for all intermediary scalafmt versions.

scalafmt-native-image's People

Contributors

alexarchambault avatar gedochao avatar lwronski avatar maciejg604 avatar scala-steward avatar tgodzik avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.