Skip to content

fix(smollm2): drop unused linuxX64/linuxArm64 targets - #313

Merged
michalharakal merged 1 commit into
developfrom
fix/smollm2-drop-unused-native-targets
Aug 13, 2026
Merged

michalharakal merged 1 commit into
developfrom
fix/smollm2-drop-unused-native-targets

Conversation

@michalharakal

Copy link
Copy Markdown
Contributor

Summary

Root cause of the failed 0.40.1 Maven Central publish
(workflow run):
:llm-inference:smollm2 declares linuxX64()/linuxArm64() Kotlin/Native targets, but
the module has zero source outside jvmMain (SmolLm2ExportCli.kt,
SmolLm2ExportHarness.kt — no commonMain at all). compileKotlinLinuxArm64 reports
NO-SOURCE and produces no .klib, but vanniktech.mavenPublish still registers a
publication for that target, and generateMetadataFileForLinuxArm64Publication
unconditionally tries to hash the (nonexistent) klib file — FileNotFoundException,
build aborts.

This killed the tag-triggered ./gradlew publish release workflow partway through —
several other modules (llm-api, llm-agent, llm-core, transformer-core,
llm-inference:{apertus,bert,functiongemma,gemma,llama,moonshine,qwen}, llm-bom,
llm-performance, llm-providers, and smollm2's own JVM publication) had already
published successfully by the time it hit this task; several others
(llm-inference:{t5,vec2text,voxtral,whisper}, all of llm-runtime:*) never got
attempted. 0.40.1 is being superseded by 0.40.2 to recover.

Fix

Drop the two unused target declarations — matches what the module actually has source
for. Audited every other multiplatform module in the repo for the same
declared-target-vs-actual-source mismatch (grepped declared targets against src/
subdirectories, spot-checked file counts in commonMain for each); smollm2 was unique,
everything else that declares native targets has real commonMain/nativeMain source
backing them.

Verification

  • ./gradlew :llm-inference:smollm2:assemble :llm-inference:smollm2:compileTestKotlinJvm — passes
  • ./gradlew :llm-inference:smollm2:generateMetadataFileForKotlinMultiplatformPublication :llm-inference:smollm2:generateMetadataFileForJvmPublication — passes (no linuxArm64/linuxX64 metadata tasks exist anymore)
  • Checked for other modules depending on smollm2's Linux artifacts specifically — none (llm-runtime:iree-android only references it in a doc comment)

🤖 Generated with Claude Code

:llm-inference:smollm2 declared linuxX64()/linuxArm64() Kotlin/Native
targets with zero commonMain/native source (jvmMain-only export
tooling). compileKotlinLinuxArm64 reports NO-SOURCE and produces no
klib, but the maven-publish plugin still registers a publication for
the target and unconditionally tries to hash the (nonexistent) klib —
generateMetadataFileForLinuxArm64Publication throws
FileNotFoundException. This broke the tag-triggered `./gradlew publish`
release workflow for 0.40.1 partway through, after several other
modules had already published successfully.

JVM-only for now, matching what actually has source; add native
targets back if/when this module gains real shared or native-specific
code.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@michalharakal
michalharakal merged commit 5050b66 into develop Aug 13, 2026
2 checks passed
@michalharakal
michalharakal deleted the fix/smollm2-drop-unused-native-targets branch August 13, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant