Android Community Meeting Notes (Mar 26, 2025)

Swift Android Community Workgroup

Hello everyone. We've just had our second meeting with the Android Community Workgroup. While it's currently unofficial still, we're applying to become official under the Swift project.

We had this meeting with Gemini on, and I found the meeting notes to be spot-on. Hence I've attached them below:

Summary

This meeting, attended by Joannis Orlandos, Saleem Abdulrasool, Marc Prud'hommeaux (Skip), and Finagolfin, focused on runtime size reduction, Android module improvements, and toolchain development. Key discussions included optimizing the size of "hello world" applications (potentially by externalizing ICU data), addressing inconsistencies in Android SDKs and CI testing, and improving build times via independent SDK builds. Finagolfin will draft a vision document for future work, and Saleem will investigate solutions for improving Swift Java interoperability.

Details

  • Meeting Attendance and Recent Activities: Several developers discussed their recent work. Joannis Orlandos reported progress on debugging in Linux with DS2, and collaboration with Saleem Abdulrasool on a VS Code extension for third-party platforms. Saleem noted that Andrew and J were absent from the previous meeting.
  • Runtime Sizes and Future Roadmap: Joannis Orlandos raised the issue of runtime sizes, prompting Marc Prud'hommeaux (skip.tools) to offer to revisit the topic. They also discussed the bridging scenario, toolchain support, and formalizing the workgroup. Saleem Abdulrasool suggested creating a vision document for the future, ideally collaborating with the platform steering group. Finagolfin agreed to start drafting this document.
  • Android Module Changes: Saleem Abdulrasool initiated a discussion about platform-agnostic files located in architecture-specific directories within the Android module. Finagolfin and Saleem discussed the possibility of moving these files, starting with Android and then migrating to Linux. They agreed that addressing this issue incrementally would be more manageable than attempting a simultaneous change across all platforms.
  • Windows Android Changes and CI: Saleem Abdulrasool described significant changes in Windows regarding Android, including altered Android SDK packaging and the introduction of pre-commit chain testing for a subset of Android tests. Finagolfin noted approximately 100 failing non-executable tests in the community Android CI, planning to address them in the coming weeks.
  • Windows Non-Executable Test Failures: Saleem attributed the increased number of failing non-executable tests on Windows (approximately 50 more than on Linux) to bugs in the tests themselves, rather than instability. They emphasized the need to improve test coverage to prevent future regressions.
  • Experimental SDKs and Build Improvements: Saleem Abdulrasool explained work on building SDKs independently of the toolchain, aiming to streamline the build process and improve build times for GitHub actions to approximately 40 minutes, potentially reducing it further to 10 minutes with caching. Skip confirmed the benefits of faster iteration with these improvements.
  • Runtime Size Reduction (Initial Discussion): Skip (Marc Prud'hommeaux) highlighted the excessively large size (200MB) of a simple "hello world" application built with the skip toolchain and native Android. A significant portion of the size stemmed from ICU data embedded in the foundation ICU.
  • Runtime Size Reduction (Proposed Solutions): Skip proposed externalizing the ICU data, either by extracting it on launch or memory mapping it directly from the APK. They acknowledged the trade-off between compression and memory mapping. The possibility of sharing ICU data across multiple apps was also discussed, but no straightforward solution was identified.
  • Runtime Size Reduction (SPM Considerations): Saleem Abdulrasool raised concerns about the required changes in Swift Package Manager (SPM) to support dynamic linking of the ICU data, suggesting significant rewriting might be necessary. Skip countered that the proposed changes wouldn't fundamentally alter the linking process, only the data access method.
  • Runtime Size Reduction (Clarification and Background): Finagolfin provided background on the current implementation of Foundation ICU, explaining it loads ICU as a data file. They suggested removing the lib foundation ICU shared library and loading data from a file instead. Saleem Abdulrasool reiterated concerns about the impact on SPM and cross-compilation.
  • Runtime Size Reduction (Platform-Specific Approach and Tooling): Skip proposed an Android-specific solution, using conditional compilation to only apply the externalized ICU data approach to the Android platform. Joannis Orlandos raised concerns about the limited scope of this Android-only solution. They also discussed the feasibility of providing a separate tool for users to remove unnecessary ICU data as a build phase, with Andrii Druk suggesting leveraging Android's system ICU file. Saleem Abdulrasool pointed out inconsistencies and modifications in system ICU data, making a direct approach problematic. They suggested using a tool within the build process.
  • Android SDK API Level Targeting: Saleem Abdulrasool stated they were targeting API level 28 for the Android SDKs they are building, with a desire to eventually lower this if feasible. They acknowledged that supporting the lowest API level presents challenges. Finagolfin suggested aligning with Google's Long Term Support (LTS) releases for NDK, acknowledging the limitations of their yearly LTS strategy.
  • Distribution of Android SDKs: The developers discussed distributing the built Android SDKs, with Saleem proposing bundling them within the toolchain for Windows developers, while Finagolfin suggested a separate distribution for the static SDKs. They also discussed the lack of the swift sdk concept on Windows. The potential issues with the Neo dependency was also noted.
  • Debugging Setup and LDB: Finagolfin inquired about the status of Jason's debugging setup using LDB. Joannis Orlandos reported success using it on ARM 64 Linux and Saleem Abdulrasool described the Android debugging setup using DS2 and ADB for remote debugging. Joannis is working on VS Code integration for this. They discussed the upcoming preview of LDB and its potential shift to the default debug adapter protocol (DAP).
  • Swift Java Interoperability: Skip raised concerns about the limitations of the new Swift Java interoperability features for Android, suggesting that standard JNI is currently the only practical approach. They noted various custom solutions like RLE’s and Skip’s “skip fuse”, and Saleem expressed interest in formalizing and sharing their handled approach.
  • Testing Macros Issue on macOS: Finagolfin brought up an issue with SDK bundles on macOS where testing macros are not correctly found. Skip acknowledged the problem, and while expressing a willingness to fix it, was unsure where to start. They also discussed their contribution to a Swift Android action for GitHub workflows, highlighting its recent improvement to support Swift testing.
  • Swift Android Action Pull Request: Finagolfin inquired about the status of Skip's pull request to add an Android workflow to the official Swift GitHub workflows. Skip speculated that the delay might be due to concerns about using an external tool for the workflows. They expressed willingness to adapt the workflow to use an official SDK if one becomes available.
  • TC Run Command and SDK Distribution: Saleem Abdulrasool introduced the tc run command (currently Windows-specific) as a potential standard way to manage SDKs and toolchains. Skip expressed interest in this approach.

Action Items

  • Finagolfin will move the platform-agnostic Android module supplementary files from the architecture-specific directory, prioritizing Android and Linux initially.
  • Finagolfin will spend time fixing failing non-executable tests in the coming weeks.
  • Skip will create a draft PR for Foundation ICU to enable loading ICU data from an external file, initially checking an environment variable for the path.
  • Skip will investigate the Mac OS testing macros issue to determine a fix.
  • The group will determine the API level to target for building Android SDKs, considering LTS releases and compatibility.
  • Joannis Orlandos will implement VS Code integration to automate port forwarding and DS2 pushing for debugging.
  • Skip will post on the forums about the shortcomings of the current Swift Java interoperability and propose a unified common base JNI baseline.
5 Likes

Um, I specifically said "we" can get those changes for supplementary module files in, as in I would be happy to review any changes Saleem proposes, and start drafting a roadmap, not that "I" would do those. I don't like how Gemini singled me out when I clearly said "we," I've got enough on my plate as it is. :wink:

Also, for those confused, it should say "distribution like the static SDK", LDB should be lldb, and this is the Testing macro issue mentioned.

4 Likes