tinygo
tinygo copied to clipboard
Add os/file.Truncate
Add file.Truncate() to file.go
any update on next steps ?
CI error does not seem to be related to the Truncate code, maybe another compiler issue? @deadprogram @aykevl, is this related to https://github.com/tinygo-org/tinygo/issues/3871?
no Go files in D:\a\tinygo\tinygo\tests\testing
ld.lld: error: undefined symbol: notARealFunction
>>> referenced by main
>>> C:\Users\RUNNER~1\AppData\Local\Temp\tinygo1547056251\main.o
failed to run tool: ld.lld
--- FAIL: TestBuild (0.00s)
--- FAIL: TestBuild/Host (0.00s)
--- FAIL: TestBuild/Host/rand.go (36.58s)
main_test.go:395: output did not match (expected 35 bytes, got 0 bytes):
FAIL
FAIL github.com/tinygo-org/tinygo 110.872s
@leongross that seems fixed in 0.29.0
@leongross can you please rebase this PR against the latest dev? Thanks!
@deadprogram rebase done
Looking for review / approval ! TY
@deadprogram @aykevl
Conflicts after the wasip2 merge. This probably needs a wasip2 implementation but I'm fine to merge this with a ErrNotImplemented error for now.
You should be able to stub this for wasip2 with this addition to libc_waisp2.go:
// int truncate(const char *path, off_t length);
//
//export truncate
func truncate(path *byte, length int64) int {
libcErrno = ENOSYS
return -1
}
@leongross please see error here https://github.com/tinygo-org/tinygo/actions/runs/10009754889/job/27670027039?pr=4209#step:7:37
Probably something needs an additional build tag for Windows?
Looks like we encountered a similar error as a few weeks ago @deadprogram
The following packages have unmet dependencies:
libllvm18 : Breaks: llvm-18-dev (< 1:18.1.8~++20240730104741) but 1:18.1.8~++20240730092223+3b5b5c1ec4a3-1~exp1~20240730092238.143 is to be installed
E: Unable to correct problems, you have held broken packages.
https://github.com/llvm/llvm-project/issues/101201
EDIT: apart from the llvm packaging failure the ci passes, would appreciate a review @ayang64 @dgryski @rminnich @deadprogram
llvm issues seem to be resolved by now, re-running the CI
CI is green, ready to merge? @aykevl @deadprogram @dgryski @rminnich
Thanks for taking care of that @aykevl!