Writing Scala?

Scala compile errors or sbt builds that will not finish? We sort it out.

Scala rewards teams that treat the type system as a design tool and punishes teams that treat it as decoration. The projects that land on our desk usually sit somewhere between, with a few given instances the compiler cannot find, a Cats effect chain nobody wants to trace, and an sbt build that takes twenty minutes to tell you nothing changed. We get it compiling, tested, and deployable without rewriting the whole domain.

  • Since 2015Fixing technology
  • FreeEstimates
  • US teamReal engineers

sbt-compile.log

still failing

What it is

Scala at a glance

Scala is a statically typed language that runs on the JVM and compiles to JavaScript and native binaries. Martin Odersky began the project at EPFL in 2003, and the language has shaped a decade of functional programming influence on Java, Kotlin and C#. Scala 3, the Dotty line, modernised the syntax, replaced implicits with givens, and reworked a large part of the metaprogramming story.

The language is widely used in data engineering through Apache Spark, in high throughput backends at firms like Twitter and LinkedIn, and in library ecosystems around Typelevel, ZIO and Akka. It is also known for its learning curve and for build tooling, mainly sbt, that engineers either like or endure. Both experiences are valid.

Type
Statically typed, object functional language
First released
2004 first public release, Scala 3 in 2021
License
Apache 2.0, open source
Maintained by
EPFL, the Scala Center, and Lightbend
Typically used for
Data engineering, high throughput backends, DSLs, financial systems

The honest version

Scala pros and cons

No technology is all upside. This is where Scala earns its place and where it tends to cause trouble.

Where Scala is strong

  • Strong, expressive type systemCase classes, sealed traits, pattern matching and parametric polymorphism cover domain modelling cleanly. The compiler catches a large class of bugs before any test runs.
  • First class functional programmingHigher kinded types, for comprehensions and givens make the Typelevel and ZIO ecosystems possible. Effectful code stays referentially transparent when the team wants it to.
  • Interop with the JVM ecosystemEvery Java library is one import away. Kafka clients, database drivers and legacy internal jars behave exactly as they would in Java.
  • Scala 3 removes a lot of historical frictionIndentation based syntax, givens instead of implicits, enum, and inline macros shrink the surprise surface for newcomers considerably.
  • Still the dominant Spark languageThe Spark API is written in Scala first. Teams that live in Spark get the most expressive interface and the fastest access to new features.

Where Scala bites

  • The learning curve is genuinely steepVariance, higher kinds, context bounds and macro based libraries can leave mid level engineers unable to read their own codebase after six months away.
  • sbt is a project in its own rightSlow incremental compiles, plugin resolution failures and settings files that are themselves Scala programs make the build tool a meaningful operational cost.
  • Compile times can be painfulHeavy implicit search, macro expansion and large sealed hierarchies push cold compiles into the minutes. CI bills reflect it.
  • Hiring is harder than for Kotlin or JavaThe pool is smaller and more opinionated. Engineers who write Cats and Shapeless style code are not a drop in replacement for engineers who write Akka style code.
  • The ecosystem splinters around effect systemsCats Effect, ZIO and plain Future have different conventions. Codebases that mix them, and many do, are harder to reason about and harder to onboard to.
  • Migration from Scala 2 to Scala 3 is real workMacros, implicits and some library APIs needed rewrites. Many large codebases are still on 2.13 because the cost has not cleared yet.

Sound familiar?

Common Scala problems we fix

The Scala problems that bring people to us, and what you have once each one is fixed.

no given instance of type Encoder[Order]

The compiler cannot find a given, implicit or encoder

Derivation macros are not being triggered, a package import is missing, or two instances are in scope and neither wins. Error messages point at the use site, not the missing definition.

Instances in scope, derivation working

sbt: unresolved dependency

sbt cannot resolve a library

An internal Artifactory mirror that has drifted, a cross version suffix that no longer publishes, or a Maven coordinate that moved between major versions. Builds fail before a single line compiles.

Dependencies resolving cleanly

diverging implicit expansion

Implicit search is diverging or explodes compile time

A derivation that recursively looks for instances it cannot terminate on, usually hitting a sealed hierarchy with cycles or an overly generic given. The compiler eventually gives up.

Derivation bounded

OutOfMemoryError: Metaspace during macro expansion

Macros are blowing up the compiler

A heavy Circe, Shapeless or derivation macro is eating metaspace. Raising memory limits is a bandage; moving derivation to an explicit configuration file is usually the real fix.

Compiler back under limits

bad symbolic reference

Classpath has a version that disagrees with itself

Two libraries pull in different versions of a shared transitive. The compiler sees one signature and the runtime sees another. Spark and Akka assemblies are frequent sites.

Classpath coherent

assertion failed while compiling

scalac itself has crashed on the code

A pattern match the compiler cannot handle, a macro that produces invalid trees, or a plugin fighting with the main compiler. Rarer on Scala 3 than Scala 2, but still real.

Minimal reproducer isolated and reported

type mismatch; found: Future[Int], required: IO[Int]

Effect systems are being mixed

A codebase that started on Future, picked up Cats Effect and is trying to convert at the boundary. Half the methods are IO, half are Future, and conversion is inconsistent.

Single effect, clean boundaries

What we do

Scala help, from one failing build to long term care

Send us one broken sbt file, or keep us on the whole JVM stack.

Rescue
A build that will not pass, a Spark job that will not schedule, or an inherited Scala service with no tests and no owner. We stabilise and document.
Scala 2 to 3 migration
Dependency audit, implicit to given rewrite, macro replacement, and a staged compile path that keeps the rest of the team shipping while the migration runs.
sbt and build health
Plugin updates, resolver cleanup, cached compile tuning, and CI pipeline changes that shrink the wall clock time on every change.
Effect system cleanup
Codebases that mixed Future with Cats Effect or ZIO brought back to a single effect, with wrappers only at the edges where the JVM demands them.
Spark and data pipeline tuning
Shuffle sizing, broadcast joins and skew handling on real cluster traces, not textbook examples.
Managed Tech
A retainer that covers library upgrades, compile time budgets, runtime observability and a Scala engineer on call when something at 3am fails to type check.

How it works

From first message to fixed

  1. Look Free estimate

    Tell us what's going wrong. We look at it, then tell you plainly what's wrong and what it will cost.

  2. Fix

    We fix the cause, not the symptom. If something is down, getting it back up comes first.

  3. Harden

    Backups, monitoring, updates and access, so the same problem can't quietly come back.

  4. Hand back or stay on

    You get a plain-language write-up. Or we stay on for hosting, upkeep and new work.

Often found together

Running Scala alongside something else?

We work on the whole stack, so the problem can be wherever it actually is.

Questions

Scala questions

Something else? Call+1 737 727 7327

Should we migrate from Scala 2 to Scala 3?

If your code sits on actively maintained libraries, yes, and the sooner the better. Scala 3 compiles faster, has clearer error messages and the implicit to given rewrite catches design debt that was previously hidden. If your stack depends on unmaintained Scala 2 only libraries, that is a separate conversation about replacement cost.

Why is our sbt build so slow?

Usually a combination of too many subprojects with tight coupling, heavy derivation macros that recompile on every change, and a lack of incremental compile caching in CI. We measure each of those in turn and recommend what to touch first.

Can you help with a Scala codebase that mixes Akka, Cats Effect and plain Future?

Yes, that is a common inheritance. The practical answer is almost never to rewrite everything at once. We draw the boundaries between effect systems, replace the hottest paths first, and leave safe adapters at the seams while the rest is converted.

Are you Spark and Databricks capable?

Yes. Many Scala engagements are really Spark engagements. We work on job tuning, shuffle and skew issues, Delta Lake migrations, and the surrounding build tooling that keeps those pipelines reliable.

Can you take over maintenance of a Scala service?

Yes. We inventory the dependencies, bring the build back to a current stable toolchain, add tests where they are missing and document what the code actually does. Only then do we touch behaviour.

How much does Scala help cost?

Estimates do not cost anything. Share the sbt log, the stack trace or the repository, and we send you a number before we start.

Free estimate

Scala giving you trouble?

Tell us what you're running and what's going wrong. A person reads it and comes back with an estimate.

  • No charge to find out what it will take
  • If it's urgent, say so

Replies come from a person. By sending, you authorize us to email you back. No marketing.