-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Description
Just pushed a test to repro/index-destructive-dependencies that demonstrates a new error I started seeing:
use ../../test.nu *
let server = spawn
# Create a file artifact that will be referenced as a dependency.
let dep_id = tg put 'tg.file("dependency")'
# Create a directory containing a file with a dependency xattr pointing to
# the artifact above. This simulates the output of a build that uses tgld:
# the linked binary has user.tangram.dependencies referencing external
# artifacts like the interpreter, libraries, etc.
let dep_xattr = [$dep_id] | to json -r
let path = artifact {
myfile: (file --xattrs { 'user.tangram.dependencies': $dep_xattr } 'hello world')
}
# Destructive checkin. The index task runs in the background and its error
# is logged but not propagated to the CLI.
let id = tg checkin --destructive --ignore=false $path
# Index
tg index
# Read back the file to confirm the checkin itself succeeded.
let contents = tg read $"($id)?path=myfile"
assert equal $contents 'hello world'
The checkin succeeds, but if you run it with --print-passing-test-output, you see an error from the indexer:
✓ checkin/destructive_with_dependencies.nu 227ms 12µs 527ns
server: INFO listening on http+unix://%2Ftmp%2Ftangram%5Ftest%5F5nFhgu%2Ftmp%2Ev8TT8AHtuz%2Fsocket
server: ERROR the index task failed, error=Error { state: State(RwLock { data: Inner { id: None, object: Some(Error(Error { code: None, diagnostics: None, loc
ation: Some(Location { symbol: Some("tangram_server::checkin::index::<impl tangram_server::Server>::checkin_index::{{closure}}"), file: Internal("packages/serv
er/src/checkin/index.rs"), range: Range { start: Position { line: 27, character: 16 }, end: Position { line: 27, character: 16 } } }), message: Some("destructi
ve checkin with cache pointers is not supported for artifacts with dependencies"), source: None, stack: None, values: {} })), stored: false }, poisoned: false,
.. }), source: None }
1 passed, 0 failed, 1 total
I confirmed that this same test does not produce an error before this commit:
commit 590219ed8141ee831bd7575fc65d5c15f1b2681f
Author: David Yamnitsky <david@yamnitsky.com>
Date: Thu Feb 5 20:36:23 2026 -0500
feat(index): add tracking of cache entry dependencies (#809)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels