hundreds-father-404
04/29/2020, 6:52 PMDirectoryToMaterialize
to MaterializeDigest
. Or, actually, maybe MaterializeToBuildRoot
WriteToBuildRoot
? It’s long enough that we discourage using it. And it resolves one of the biggest confusions: you can only write to the build root, not any arbitrary placealoof-angle-91616
04/29/2020, 6:57 PMwrite()
is a single syscall. materializing is also a syscall of sorts if pants is the OS but it's many different blocking operations in sequence. "write" doesn't feel like it describes what's happeninghundreds-father-404
04/29/2020, 6:58 PMSaveToBuildRoot
is the same issue, right? Probably even worse, because it’s more vague.witty-crayon-22786
04/29/2020, 7:01 PMwitty-crayon-22786
04/29/2020, 7:02 PMhundreds-father-404
04/29/2020, 8:03 PMremoveprefix
to the stdlib, rather than stripprefix
, via PEP 616: https://www.python.org/dev/peps/pep-0616/#alternative-method-names
Any opposition to RemovePrefix
instead of StripPrefix
? I think I prefer “strip” to “remove”, but I prefer parity with the stdlib even more.aloof-angle-91616
04/29/2020, 8:03 PMwitty-crayon-22786
04/29/2020, 8:07 PMwitty-crayon-22786
04/29/2020, 8:08 PMwitty-crayon-22786
04/29/2020, 8:09 PMwitty-crayon-22786
04/29/2020, 8:12 PMSnapshotOf(
input=input_snapshot,
changes=[
Rename('x', 'y'),
MkDir('z'),
],
)
hundreds-father-404
04/29/2020, 8:18 PMwitty-crayon-22786
04/29/2020, 9:37 PMwitty-crayon-22786
04/29/2020, 9:38 PMhundreds-father-404
04/30/2020, 1:49 AMSnapshotSubset
-> DigestSubset
? The name is a misnomer atm because it takes a digest, not a Snapshot. DigestSubset
would also go nicely with MergeDigests
aloof-angle-91616
04/30/2020, 1:56 AM= note: ld: warning: ignoring file /Users/dmcclanahan/tools/p1/src/rust/engine/target/debug/build/engine_cffi-0cfc0b2057922e53/out/libnative_engine_ffi.a, building for macOS-x86_64 but attempting to link with file built for unknown-unsupported file format ( 0x21 0x3C 0x61 0x72 0x63 0x68 0x3E 0x0A 0x2F 0x20 0x20 0x20 0x20 0x20 0x20 0x20 )
Undefined symbols for architecture x86_64:
"_wrapped_PyInit_native_engine", referenced from:
_PyInit_native_engine in engine_cffi.2e9skz2skowhnlv2.rcgu.o
"_wrapped_initnative_engine", referenced from:
_initnative_engine in engine_cffi.2e9skz2skowhnlv2.rcgu.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
does anyone know when this might happen? for what it's worth, libnative_engine_ffi.a
is a normal ar
archive, and it contains native_engine.so
, which is definitely a mach-o x86_64 file:
X> file /Users/dmcclanahan/tools/p1/src/rust/engine/target/debug/build/engine_cffi-0cfc0b2057922e53/out/src/cffi/native_engine.o
/Users/dmcclanahan/tools/p1/src/rust/engine/target/debug/build/engine_cffi-0cfc0b2057922e53/out/src/cffi/native_engine.o: Mach-O 64-bit object x86_64
not sure if this is possibly due to missing macosx-version-min
value? investigatingaloof-angle-91616
04/30/2020, 1:59 AMException message: dlopen(/Users/dmcclanahan/tools/p1/native_engine.so, 2): Symbol not found: _wrapped_PyInit_native_engine
Referenced from: /Users/dmcclanahan/tools/p1/native_engine.so
Expected in: flat namespace
in /Users/dmcclanahan/tools/p1/native_engine.so
i removed -undefined dynamic_lookup
from engine_cffi/build.rs
to try to get it to fail at build time instead of runtime, and produced the above message, which was progressaloof-angle-91616
04/30/2020, 6:20 AM./v2 goals
running by manually adding the native_engine.o
file to the rustc-cdylib-link-arg
setaloof-angle-91616
04/30/2020, 6:21 AMnative_engine.o
file in the target directory, and manually add it to the list of files to link, because cc
crate is producing an incorrect command linear
is producing an incorrect libnative_engine_ffi.a
somehowaloof-angle-91616
04/30/2020, 6:22 AM-Wl,--exported_symbols_list,/var/...
to -Wl,-export_dynamic
also made the link workaloof-angle-91616
04/30/2020, 6:22 AMcc
crate, unless there's an easy way to do this without forking it (which i don't think will be the case)aloof-angle-91616
04/30/2020, 6:24 AMcc
crate's creation of libnative_engine_ffi.a
, ratheraloof-angle-91616
04/30/2020, 6:29 AMar
is earlier on my path than the one in /usr/bin
and that seems extremely suspiciousaloof-angle-91616
04/30/2020, 6:37 AMaloof-angle-91616
04/30/2020, 6:39 AMar
, which comes from coreutils
i'm pretty surealoof-angle-91616
04/30/2020, 6:39 AM/usr/bin/ar
is used on OSX at all times, i think (going to verify that it was indeed just ar
causing this). that can be set with the AR
env var so the diff should be smallaloof-angle-91616
04/30/2020, 6:57 AMaloof-angle-91616
04/30/2020, 7:46 AMhundreds-breakfast-49010
04/30/2020, 7:47 AMhundreds-breakfast-49010
04/30/2020, 7:47 AM