Skip to content

@lucent-lang/lucent@0.1.3

Choose a tag to compare

@github-actions github-actions released this 04 Oct 23:55
· 434 commits to main since this release
6dcccc3

Patch Changes

  • #80 86500a7 Thanks @brunokiafuka! - Add errorOf(throwable) to lucent:android: the Error Lucent makes of a thrown Java exception (its code the class name, java.lang.IllegalStateException), for adapters whose callback API reports failure with a Throwable. reject(errorOf(e)) now rejects as the call would have thrown.

  • #64 fe9758d Thanks @Fausto95! - Start every lucent command about 0.1 s sooner: Node keeps the compiled code of the CLI and TypeScript on disk between runs.

  • #68 fbb8e10 Thanks @Fausto95! - Bind the version of a native library installed now in lucent dev and the editor: after a pod install or a rebuilt Swift module, the next rebuild uses its new API instead of the one the process first read.

  • #65 23cc5a1 Thanks @Fausto95! - Let lucent build --platforms ios (or host) succeed before the app's Android dependencies are resolved: imports of them in Android code are left untyped with a warning pointing to the Android build, instead of failing with LUCENT3004.

  • #78 88cef84 Thanks @Fausto95! - Bind Kotlin function types on Android: a (Double) -> Unit parameter, property or result is a TypeScript function instead of the Function1 class, so a Lucent function can be passed or assigned to it and a Kotlin function Lucent gets can be called. A property of a fun interface's type (any Java interface with one abstract method) now takes a function too, in module code, in a view's setup and as a JSX attribute.

  • #79 04409e3 Thanks @Fausto95! - Call more Kotlin shapes on Android: generic members whose type parameters have bounds (fun <T : Comparable<T>> top(items: List<T>)), with their defaults left out; assigning a value class property; and Lucent classes implementing a Kotlin interface's suspend members (the async method's promise resumes Kotlin) and members taking or giving value classes. Declarations of a class with a value class property are valid again: its accessors are named getBest, not getBest-JdFk__0.

  • #68 fbb8e10 Thanks @Fausto95! - Say what to do when a native library's type has no member the code uses: the error names the module and the installed version (pod:Name@version) that declare the type, after a library update removed or renamed it. On iOS, for a type only named in another module's signatures, it says to import its module.

  • #75 23704bd Thanks @Fausto95! - Add --views to lucent sdk coverage: with the internal views switch on (LUCENT_VIEWS=fabric), it lists each view class of a module as a JSX tag, how a tag makes it, the props and events its declarations give, whether it takes children, and what is left out and why.

  • #64 fe9758d Thanks @Fausto95! - Make each lucent build and lucent check start faster: the declarations of the SDK frameworks a project imports are kept in the SDK cache instead of written again by every run (a check importing UIKit: 1.9 s to 1 s).

  • #64 fe9758d Thanks @Fausto95! - Make rebuilds in lucent dev, checks in the editor and repeated builds faster: the declarations of the SDK frameworks a module imports are written once per process instead of for every compile.

  • #81 d163b8f Thanks @Fausto95! - Call each Swift initializer that differs from another only by its argument labels: init(service: String) and init(accessGroup: String) become Keychain.withService(…) and Keychain.withAccessGroup(…) instead of two constructor(string) overloads, where new Keychain("x") silently called the first one declared; new with such arguments is now an error naming the factories. An unlabeled initializer among them stays the constructor, as Swift calls it. CryptoKit's P256 keys and signatures are made with withRawRepresentation(…), withX963Representation(…) and the like.

  • #82 dd2a572 Thanks @Fausto95! - Bind the Swift packages an app adds to its Xcode project: Lucent reads the project and Package.resolved, builds each package's library products at its pinned version for the simulator, binds their modules by rule, and links the ones the code imports into LucentNative (add the package to the project without adding its product to the app target, which would link it twice). iOS declarations are now read for the app's deployment target (IPHONEOS_DEPLOYMENT_TARGET), so an API the app's target already has no longer needs an available("ios", …) check, and one newer than it does.

  • #83 10cfcfc Thanks @Fausto95! - Bind more of what Swift declares on iOS: tuples (as TypeScript tuples, labels as element names), closures passed to or returned by Swift (as Lucent functions, through Objective-C blocks), Objective-C factory initializers Swift imports as init (+widgetWithLabel: as new Widget(label)), and C functions Swift imports as members of CoreFoundation-style handles (cgImage.width, cgImage.cropping(rect)). new of a class whose initializers come from a module no file imports now says to import that module.

  • #68 fbb8e10 Thanks @Fausto95! - Explain a native member Lucent does not bind: calling one the extractor skipped (a Swift tuple, say) now says it exists in the library, why it is not bound, and to wrap it in Swift or Kotlin of your own, rather than that the installed version lacks it. A member refused for a type that cannot cross yet (LUCENT2002) gets the same fix.