Commit 180a08b
fix: resolve lint errors + real bugs across all 5 SDKs and example apps
Phase 1 of the symmetric-lint plan. Every SDK and example app now
compiles and passes its respective linter's error threshold. Warnings
grandfathered — separate cleanup PR per SDK later.
Swift (2 errors → 0):
- sdk/runanywhere-swift/Sources/RunAnywhere/Public/Extensions/LLM/
RunAnywhere+TextGeneration.swift — replaced force-unwrap of
`opts.systemPrompt!` with `Optional.map` (fixes 2 force_unwrapping
errors + associated line-length errors).
- examples/ios/RunAnywhereAI — fixed 25 errors (3 shorthand_operator,
3 todo_with_issue, 6 identifier_name, 1 cyclomatic_complexity,
12 line_length). No warnings fixed yet.
Kotlin (18 + 52 → 0):
- sdk/runanywhere-kotlin: fixed 6 detekt issues (converted
FunctionOnlyReturningConstant to const val, removed UnusedImports,
pruned UnusedParameter / UnusedPrivateMember). Ran ktlintFormat on
2 module build.gradle.kts files to fix 12 multiline-expression-wrapping.
- examples/android/RunAnywhereAI: fixed 52 detekt + 7 manual ktlint
violations (MayBeConst, 32 UnusedImports across 13 files, 5
UnusedParameter, 8 UnusedPrivateMember).
Web (silently broken → real linting works, 1 real bug found):
- Created sdk/runanywhere-web/eslint.config.mjs (ESLint 9 flat config,
typescript-eslint recommended + 3 type-aware rules:
no-floating-promises, no-misused-promises, consistent-type-imports).
- sdk/runanywhere-web/packages/{llamacpp,onnx}/package.json — replaced
fake `tsc --noEmit` lint alias with real `eslint src`.
- packages/core/src/Infrastructure/ArchiveUtility.ts — REAL BUG:
DecompressionStream.writer.write()/close() return Promises that were
being ignored; added `await`, fixes a write/reader race.
- Fixed 12 additional no-floating-promises / no-misused-promises /
consistent-type-imports violations across ModelManager, ModelRegistry,
LocalFileStorage, OPFSStorage, VLMWorkerBridge.
React Native (16 + 2 + 6 → 0):
- sdk/runanywhere-react-native/packages/core/src/native/
NativeRunAnywhereCore.ts + NitroModulesGlobalInit.ts — replaced
16 `console.warn/debug/error` with SDKLogger.core.{warning/debug/error}.
- packages/llamacpp/src/native/NativeRunAnywhereLlama.ts +
packages/onnx/src/native/NativeRunAnywhereONNX.ts — fixed 2 TS2347
errors by removing generic type args from untyped
NitroProxy.createHybridObject calls and casting the result.
- examples/react-native/RunAnywhereAI: installed eslint-plugin-jest
(broken @react-native/eslint-config jest/globals env); ran lint:fix
(prettier auto-fixed 1901); hand-fixed 3 remaining; fixed 3 typecheck
errors (Typography.title1 → title, useRef<Camera> null type, etc).
Flutter (17 compile errors → 0):
- Root cause of 14/17: child packages (runanywhere_genie,
runanywhere_llamacpp, runanywhere_onnx) were resolving `runanywhere`
from pub.dev v0.16.0 instead of the local monorepo copy, so they
missed the `genie` enum value, VLM FFI typedefs, and
findModelPathAfterExtraction method added after v0.16.0.
Fix: added pubspec_overrides.yaml in each child pkg pointing to
local ../runanywhere. Added to .gitignore so pub.dev publishing
still resolves to the tarball.
- lib/infrastructure/download/download_service.dart — removed 2 stale
unused imports left over from a refactor.
- lib/public/runanywhere.dart — wired the _authenticateWithBackend
call into init flow (was declared but never invoked — matches Swift
SDK pattern). Used unawaited() for fire-and-forget subscription/
controller close in VLM streaming cancel.
Total: 110 compile errors + 133 lint errors → 0 across all 10
projects (5 SDKs + 5 example apps).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 8026496 commit 180a08b
122 files changed
Lines changed: 7042 additions & 5754 deletions
File tree
- examples
- android/RunAnywhereAI/app/src/main/java/com/runanywhere/runanywhereai
- data
- domain
- models
- services
- presentation
- benchmarks
- models
- services
- utilities
- viewmodel
- views
- chat
- components
- common
- components
- lora
- models
- rag
- settings
- stt
- tts
- vision
- voice
- ui/theme
- ios/RunAnywhereAI/RunAnywhereAI
- App
- Core/Services
- Features
- Benchmarks
- Services
- Utilities
- Views
- Chat
- Models
- ViewModels
- Views
- Settings
- Voice
- Helpers
- react-native/RunAnywhereAI
- src
- components/chat
- hooks
- screens
- services
- sdk
- runanywhere-flutter
- packages/runanywhere/lib
- infrastructure/download
- public
- runanywhere-kotlin
- modules
- runanywhere-core-llamacpp
- runanywhere-core-onnx
- src
- androidMain/kotlin/com/runanywhere/sdk/features/tts
- commonMain/kotlin/com/runanywhere/sdk
- core/types
- data/network/models
- public
- events
- extensions
- RAG
- VLM
- jvmAndroidMain/kotlin/com/runanywhere/sdk
- foundation/bridge/extensions
- public/extensions
- runanywhere-react-native
- packages
- core
- src/native
- llamacpp/src/native
- onnx/src/native
- runanywhere-swift/Sources/RunAnywhere/Public/Extensions/LLM
- runanywhere-web/packages
- core/src
- Infrastructure
- Public
- llamacpp
- src
- Extensions
- Infrastructure
- onnx
- src/Foundation
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | 7 | | |
12 | 8 | | |
13 | 9 | | |
14 | 10 | | |
15 | 11 | | |
16 | | - | |
17 | 12 | | |
18 | 13 | | |
19 | 14 | | |
20 | 15 | | |
21 | 16 | | |
22 | 17 | | |
| 18 | + | |
23 | 19 | | |
24 | 20 | | |
25 | 21 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
118 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
119 | 121 | | |
120 | 122 | | |
121 | 123 | | |
| |||
Lines changed: 9 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
Lines changed: 280 additions & 163 deletions
Large diffs are not rendered by default.
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | 9 | | |
11 | 10 | | |
12 | 11 | | |
| |||
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
Lines changed: 59 additions & 39 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
79 | | - | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
92 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
93 | 96 | | |
94 | 97 | | |
95 | 98 | | |
| |||
105 | 108 | | |
106 | 109 | | |
107 | 110 | | |
108 | | - | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
109 | 115 | | |
110 | 116 | | |
111 | 117 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
128 | 136 | | |
129 | 137 | | |
130 | 138 | | |
131 | 139 | | |
132 | 140 | | |
133 | 141 | | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
139 | 148 | | |
140 | 149 | | |
141 | 150 | | |
| |||
146 | 155 | | |
147 | 156 | | |
148 | 157 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
159 | 172 | | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
165 | 179 | | |
166 | 180 | | |
167 | 181 | | |
| |||
172 | 186 | | |
173 | 187 | | |
174 | 188 | | |
175 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
176 | 193 | | |
177 | 194 | | |
178 | 195 | | |
| |||
195 | 212 | | |
196 | 213 | | |
197 | 214 | | |
198 | | - | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
199 | 219 | | |
200 | 220 | | |
201 | 221 | | |
| |||
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
0 commit comments