Created attachment 235114 [details] git diff output for patching www/deno to make deno_std library tests to pass Hello, I'm trying to use Deno on FreeBSD recently, and tried to pass tests on the deno_std modules. It seems Deno is missing at least a small patch to make them to pass. Without this patch, tests in deno_std modules aren't passing on some `Deno.stat("/path/to/file")` function usage, which is returning some FileInfo interface with the `mode` field to null instead of being assigned to the octal value for the file mode. I'm attaching the git diff to this. Can you have a look at it please?
Just adding some deno output to show differences, and the typescript as an attachment Before patch > $ /usr/local/bin/deno run --allow-read main.ts > { > isFile: true, > isDirectory: false, > isSymlink: false, > size: 58, > mtime: 2022-07-07T21:48:44.817Z, > atime: 2022-07-07T18:53:34.401Z, > birthtime: 2022-07-07T18:53:34.401Z, > dev: null, > ino: null, > mode: null, > nlink: null, > uid: null, > gid: null, > rdev: null, > blksize: null, > blocks: null > } After patch > $ deno run --allow-read main.ts > { > isFile: true, > isDirectory: false, > isSymlink: false, > size: 58, > mtime: 2022-07-07T21:48:44.817Z, > atime: 2022-07-07T18:53:34.401Z, > birthtime: 2022-07-07T18:53:34.401Z, > dev: 1724626467, > ino: 2310897, > mode: 33188, > nlink: 1, > uid: 1001, > gid: 1001, > rdev: 4294967295, > blksize: 4096, > blocks: 1 > }
Created attachment 235115 [details] typescript file to test
deno standard library tests result with this patch: On FreeBSD: > deno_std $ deno task test > ... > ok | 2975 passed (212 steps) | 0 failed | 11 ignored (2m11s) On WSL (no patch needed): > deno_std $ deno task test > ... > ok | 2975 passed (212 steps) | 0 failed | 11 ignored (1m16s) Differences can also be seen when using https://deno.land/std@0.147.0/http/file_server.ts to show local files, for example running this on FreeBSD with current unpatched deno, and on WSL: > deno_std $ deno run --allow-read --allow-net https://deno.land/std@0.147.0/http/file_server.ts http/
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=4588423cca935e99b093ce56e24bb629c439d706 commit 4588423cca935e99b093ce56e24bb629c439d706 Author: Guillaume Bibaut <yom@iaelu.net> AuthorDate: 2022-07-08 06:38:53 +0000 Commit: Mikael Urankar <mikael@FreeBSD.org> CommitDate: 2022-07-08 14:25:43 +0000 www/deno: Fix parseFileInfo Add freebsd to the list so that parseFileInfo returns correct information. PR: 265080 www/deno/Makefile | 2 +- www/deno/files/patch-runtime_js_30__fs.js (new) | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-)
merci!