Skip to content
Lucent
SEARCH LUCENT

Search guides, APIs, and examples.

GitHub

Very early and experimental. The language, the generated native code and every package API change without notice. Do not use Lucent in production.

Upgrade Xcode, the Android SDK or Lucent

A new SDK is read again on the next build; lucent sdk diff lists what it changes for your code. A new Lucent needs lucent doctor, a build, and an app rebuild.

Nothing to do. SDK types are cached per SDK version, so a new Xcode or android.jar is read again on the next build. Your code is then checked against the new SDK, and errors name what changed.

terminal
npx lucent sdk prefetch

This reads the new SDK's modules ahead of time, instead of during the first build. lucent clean --cache empties the cache, if it takes too much space.

terminal
npm i -D @lucent-lang/lucent@latest
npx lucent doctor
npx lucent build
  • lucent doctor checks that every Lucent package in the app supports the new version.
  • Rebuild the app, after pod install on iOS: the C++ runtime is part of the native package.
  • Lucent is experimental, and APIs change without a migration path. Read the release notes first.
terminal
npx lucent sdk lock
npx lucent build --frozen
npx lucent sdk diff
  • lucent sdk lock records the SDKs and the SDK members your code uses in lucent-sdk.lock.json. Commit it. It needs the SDK of every platform your project has code for; --platforms ios locks iOS alone.
  • --frozen fails when an SDK or dependency differs from the lock. It also fails when a platform the lock lists has no SDK installed, or would be left to the Gradle build. Use it in CI and for releases, with --platforms android on a machine that only builds Android.
  • lucent sdk diff lists what the installed SDKs remove or change among the members your code uses, before you rebuild the app. --all adds the other members of those modules.

After changing Android dependencies, run lucent build first: it resolves the new classpath that sdk diff compares.