Skip to content

CodeAssist 3.46.0

Choose a tag to compare

@tyron12233 tyron12233 released this 16 Nov 09:39
· 373 commits to main since this release

🚀 CodeAssist 3.46.0

MODERN JAVA IN THE RUN CONSOLE

  • Java 17 to 21 programs run on your phone: records, sealed types, pattern switch (type patterns, case null, guards, enums) and the newer library methods such as List.of, getFirst(), stream.toList(), String.formatted and Math.clamp, even on an Android version that does not have them
  • Virtual threads, ScopedValue and StructuredTaskScope compile and run (emulated on real threads, up to 2,000 at once), in both their Java 21 and Java 25 shapes
  • Records work as map keys and in sets, and print boolean and char components correctly
  • Console programs run two to three times faster
  • Arrays handed to library code (list.add, ByteBuffer.wrap, Arrays.asList) are now shared with it instead of copied
  • Fixed: 0.0 == -0.0, array instanceof and casts, ArrayStoreException, catching a stack overflow or a negative array size, and string constant identity
  • Fixed: compareBy({ it.a }, { it.b }) ended a run with "Array has incompatible type"

RELEASE BUILDS (R8)

  • A release build with shrinking on no longer fails on Android 12 and older (NoSuchMethodError: readAllBytes, and two more of the same kind)
  • A release build survives R8 running out of memory: it shrinks your own code and packages the libraries unshrunk, instead of failing with no APK. The console says when this happened
  • Raising the R8 heap makes the next build try the full shrink again
  • Library keep rules shipped inside an AAR now reach R8, so a minified app no longer loses what a library reaches by reflection
  • The out-of-memory error names the heap R8 really had and whether the setting can go higher on your device

EDITOR

  • Import static: an unresolved assertEquals(...) in Java now offers Import static org.junit.Assert.assertEquals, from library classes and from your own project's Java classes
  • The Kotlin Import fix offers a Java class's static method too
  • A Java text block (""") is highlighted as one string across its lines
  • The rename prompt has Rename and Cancel buttons, the on-screen keyboard's action key confirms rename and go-to-line, and Back closes them
  • Fixed: use { } on a class declared : AutoCloseable was an unresolved reference, and so was import kotlin.use
  • Fixed: a function ending in mutex.withLock { return x } was reported as missing a return, and code after a return@run was marked unreachable
  • Fixed: accepting an override from the completion list left the dot that opened it
  • Go to declaration and the color swatch of a library resource open the right file

LANGUAGES

  • Choose the interface language in Settings > Appearance, without changing the phone's language
  • Every screen is translated in Arabic, Spanish, Indonesian, Brazilian Portuguese, Russian and Chinese, including the layout designer and the Git panel
  • Under a right-to-left language, a view dragged in the layout designer follows your finger

AI ASSISTANT

  • A custom gateway can fetch its model list: pick a model instead of typing its name
  • Enter breaks the line in the chat field on an on-screen keyboard; it sends only with a physical keyboard
  • Fixed: every request failing with "The compiled grammar is too large" once the tool set grew
  • Fixed: with the MCP server turned on, the app failed to start below Android 14, and a connecting client closed it

RUN AND BUILD

  • Fixed: Run failing with "Too many active sessions" after several install prompts were dismissed
  • The build log says how long each slow task took, and the build time no longer includes waiting on the install screen
  • A unit test can read files in src/test/resources

FIXES

  • Fixed a freeze on first launch on devices with slow storage
  • Fixed a crash in the Projects Store feed when two sections shared an id
  • A project whose source folder is the project folder itself (no src) no longer indexes, searches or compiles its own build output, and its file tree lists the folder once

PLUGINS

  • A plugin's New-file entry can offer a choice of kinds (class, interface, enum) in one dialog (plugin API 3.6.0)

Full changelog: https://github.com/tyron12233/CodeAssist/releases/tag/v3.46.0