jmcnamara / libxlsxwriter

A C library for creating Excel XLSX files.
https://libxlsxwriter.github.io
Other
1.51k stars 333 forks source link

zig-build: lazyPath fixes #455

Open kassane opened 1 month ago

kassane commented 1 month ago

Minor fix: lazyPath

b.path("path") - get src/subpath contents - not allow abspath old .{ .path = "path" } was renamed to .{ .cwd_relative = "abspath" } - for external path.

Works on zig version: v0.12.0 (optional change), v0.12.1, v0.13.0 & v0.14.0-dev (currently master);

Note: old zig version generate zig-cache, but v013.0 and master rename to .zig-cache!

Extra update: replacing zlib-master to release-version

$ zig fetch --save=zlib git+https://github.com/madler/zlib#v1.3.1
info: resolved ref 'v1.3.1' to commit 51b7f2abdade71cd9bb0e7a373ef2610ec6f9daf
warning: overwriting existing dependency named 'zlib'

cc: @jmcnamara

kassane commented 1 month ago

Why switch zig-ci host?

The default GH-actions is arm64-macos runner. However the error that occurred may have been confused with x86_64.

CI - macos: https://github.com/kassane/libxlsxwriter/actions/runs/10831257972/job/30052830154

attempting restore of zig-zig-macos-x86_64-0.13.0 to /Users/runner/hostedtoolcache/zig/0.13.0/arm64
no cached version found. downloading zig zig-macos-x86_64-0.13.0
/usr/bin/tar x -C /Users/runner/work/_temp/3faab687-fe01-4494-9830-60182d24d8ac -f /Users/runner/work/_temp/3d77e914-a2e5-4d9b-82bb-2a95f073baa1
adding zig 0.13.0 at /Users/runner/hostedtoolcache/zig/0.13.0/arm64 to local cache zig-zig-macos-x86_64-0.13.0
/opt/homebrew/bin/gtar --posix -cf cache.tzst --exclude cache.tzst -P -C /Users/runner/work/libxlsxwriter/libxlsxwriter --files-from manifest.txt --delay-directory-restore --use-compress-program zstdmt
Cache Size: ~70 MB (73774402 B)
Cache saved successfully
zig installed at /Users/runner/hostedtoolcache/zig/0.13.0/arm64
+- install test_table04
   +- zig build-exe test_table04 Debug native failure
error: assertion failed [arm_interval().contains(address)]: code fragment does not contain the given arm address
(CodeFragmentMetadata.cpp:48 instruction_extents_for_arm_address)