Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/endpoints4s/migrations

Automatic rewrite rules for upgrading to new releases of endpoints4s
https://github.com/endpoints4s/migrations

Last synced: about 1 month ago
JSON representation

Automatic rewrite rules for upgrading to new releases of endpoints4s

Awesome Lists containing this project

README

        

# Automatic rewrite rules for upgrading to new releases of endpoints4s

## Migrating from 0.15.0 to 1.0.0

Add the scalafix plugin to your build definition. For sbt:

~~~ scala
// project/plugins.sbt
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.17")
~~~

Start the sbt shell and run the following commands:

~~~
// sbt shell
scalafixEnable
scalafix dependency:[email protected]:to-1-0-0:1.0.0 --files .
~~~

The rule applies the following changes:

- rename references to package `endpoints` to `endpoints4s`,
- update imports of `endpoints.algebra.Codec` to `endpoints4s.Codec`,
- rewrite constructor calls of `EndpointDocs` and `CallbackDocs` to
avoid deprecations,
- bump version number in build dependencies from `0.15.0` to `1.0.0`,
- update modules organization from `org.julienrf` to `org.endpoints4s`,
- update artifact names to remove the `endpoints-` prefix.

Note that the rules sometimes overlap or might be incomplete. You will
probably have to do some manual edits.

## Contributing

To develop rule:

```
sbt ~to-1_0_0-tests/test
# edit to-1.0.0/rules/src/main/scala/fix/To_1_0_0.scala
```