Commit Graph
10 Commits
Author SHA1 Message Date
Ole André Vadla Ravnås f8d25015ae Drop the comments that only restate the code
A comment is a last resort, and these were not one: section banners,
doc headers naming what the declaration below already names, and
notes saying in prose what the next line says in code.

What is left is what the code cannot show -- an ordering that matters,
a platform quirk, why the obvious way fails.
2026-08-13 13:09:18 +02:00
Ole André Vadla Ravnås 4f7f06e57d Follow frida-swift's regenerated API
Take the regenerated bindings on both frontends.
2026-08-13 12:46:09 +02:00
Ole André Vadla Ravnås 964e6e0e7b Surface compiler diagnostics on failure
Conform CompileFailure to LocalizedError so the underlying
message and collected diagnostics reach the user instead of
the opaque "LumaCore.CompileFailure error 1" default.
2026-07-06 22:34:29 +02:00
necpition205 79651b5407 Guard runtime parsing and rendering 2026-06-28 02:02:14 +02:00
Ole André Vadla Ravnås a526d6ee0b core: Reconcile package state with disk
If document state has no manifests but the workspace still
holds package.json / node_modules from a prior process that
got killed before auto-save, the document is authoritative —
wipe the orphans so disk and document agree. Runs both at
ensureReady time and at install time, since install doesn't
go through ensureReady. Without the install-side check, Frida
reads the leftover manifest, sees the dep already satisfied,
and returns an empty install result.
2026-05-22 14:18:31 +02:00
Ole André Vadla Ravnås 0a8650368c core: Add typed compiler diagnostics
Introduce CompilerDiagnostic and CompileFailure so callers
can pretty-print TypeScript errors in the frida-tools format
(path:line:character - category TS<code>: text). Tracer
hooks and custom-instrument compiles rewrite the on-disk
path to the user-facing display name.

Also fix a race in withCompilerDiagnostics: the events
subscriber was racing with esbuild's signals and could miss
.finished on fast failures, hanging the caller. Pre-create
the stream and await the events task.
2026-05-16 03:01:44 +02:00
Ole André Vadla Ravnås 5d73e36b39 luma-core: Revert Compiler cache workaround
No longer needed now that frida-core keeps the compiler backend
module resident for the process lifetime. Go back to creating a
fresh Compiler() per withCompilerDiagnostics call.
2026-04-15 00:03:15 +02:00
Ole André Vadla Ravnås 7330858d87 luma-core: Cache Compiler, fix unused try?
Fresh Compiler() per compile triggers frida_compiler_backend_init's
g_module_close, which can dlclose a module whose threads are still
executing — observed crashing on tracer instrument add / re-attach.
Cache one instance in CompilerWorkspace so the backend init runs
once and the runtime threads survive.

Also silence "result of 'try?' is unused" warnings on the
disposeInstrument calls by explicitly discarding the optional.
2026-04-14 01:53:24 +02:00
Ole André Vadla Ravnås 316c82c908 Use GRDB records idiomatically
All model structs now conform to FetchableRecord +
PersistableRecord with snake_case table/column names.
GRDB handles Codable encoding/decoding automatically.

ProjectStore rewritten to use the type-safe query builder:
model.save(db), Model.fetchAll(db), Model.filter(...),
Model.deleteOne(db, key:) — no raw SQL remaining.
2026-04-06 21:49:41 +02:00
Ole André Vadla Ravnås 9959d80719 Move package mgmt and collab into LumaCore
Move the core business logic for both subsystems:

Package management (CompilerWorkspace):
- PackageOperationQueue: serial async operation queue
- ESMBundleParser: Frida ESM bundle format parsing
- CompilerWorkspace: package install/remove/upgrade,
  bundle building via Frida Compiler, workspace lifecycle
- CompilerWorkspacePaths: URL helpers

Collaboration (CollaborationSession):
- Portal bus state machine (connect, create/join room)
- Participant tracking, chat messaging
- Notebook sync protocol (add/update/delete/reorder)
- Uses AsyncEventSource for status change notifications

Both use ProjectStore for persistence instead of SwiftData.
2026-04-06 20:18:33 +02:00