Conversation
06kellyjac
left a comment
There was a problem hiding this comment.
It'd be nice to have tests back, good stuff.
They used to be a bit flakey so something to keep an eye on.
Added a few comments/questions
Also, by how much do you think this affects build times? Since the deno build is already very long due to the time spent linking.
There was a problem hiding this comment.
Is it worth skipping these tests completely?
I cant remember the status of darwin sandboxing but it might just be worth keeping the platforms standard and skipping these
There was a problem hiding this comment.
I'm also not fully familiar with the Darwin sandbox, but these tests do pass on Darwin for some reason. We could also completely drop them, I don't have a strong opinion.
There was a problem hiding this comment.
Are they are passing with the sandbox on on darwin? nix recently got improved support for larger (in terms of amount of store paths involved) sandboxed builds on darwin.
There was a problem hiding this comment.
Yes, these tests did pass on Darwin with sandbox = relaxed.
There was a problem hiding this comment.
Is this patch unused or did I just miss something?
There was a problem hiding this comment.
It's used, but you made me realize this is not strictly related to tests, I just think it would be a good idea. Just like how we unvendored libffi after it caused a build failure a few months ago: #368102
Should I drop this change?
There was a problem hiding this comment.
We could easily replace this patch with substituteInPlace
b667203 to
6e96270
Compare
|
Build times on my MacBook M3 Pro:
We could also add |
pkgs/by-name/de/deno/package.nix
Outdated
There was a problem hiding this comment.
| ./patches/unvendor-sqlite.patch | |
| ./patches/tests-no-chown.patch | |
| ./patches/tests-replace-hardcoded-paths.patch | |
| ./patches/tests-darwin-differences.patch | |
| ./unvendor-sqlite.patch | |
| ./tests-no-chown.patch | |
| ./tests-replace-hardcoded-paths.patch | |
| ./tests-darwin-differences.patch |
There was a problem hiding this comment.
I'm not sure I follow, do you suggest moving the patch files out of the subdirectory?
pkgs/by-name/de/deno/package.nix
Outdated
There was a problem hiding this comment.
We can probably combine those into one to not traverse everything 3 times.
pkgs/by-name/de/deno/package.nix
Outdated
There was a problem hiding this comment.
| hash = "sha256-Ir/jBmXsiM9T3dY6kd8wsC+qB1alHm5JNAx+aq9hXHo="; | |
| fetchSubmodules = true; # required for tests | |
| fetchSubmodules = true; # required for tests | |
| hash = "sha256-Ir/jBmXsiM9T3dY6kd8wsC+qB1alHm5JNAx+aq9hXHo="; |
6e96270 to
bb6ccdf
Compare
bb6ccdf to
01d7ae0
Compare
01d7ae0 to
2fd7874
Compare
|
I fixed the review comments and rebased my commits to the latest Deno version, I think this PR is ready |
|
|
I have no idea why aarch64-linux failing |
|
I have no idea either, the log is not helpful. But it builds for me on aarch64-linux, at this point I think it's a GHA-specific issue |
2fd7874 to
e5a28c4
Compare
|
Rebased commits on top of #387198 |
06kellyjac
left a comment
There was a problem hiding this comment.
Thanks for rebasing. 1 holdup, 2 comments.
pkgs/by-name/de/deno/package.nix
Outdated
There was a problem hiding this comment.
This needs to live outside of canExecute please or cross-platform builds will end up with additional binaries.
Also this method is opt-out of extra bits, but do we want to be opt-in instead? It'd just mean we wouldn't accidentally package more testing utils etc without noticing. This part isn't a big blocker.
There was a problem hiding this comment.
Good idea, thank you. Addressed these in my latest change
pkgs/by-name/de/deno/package.nix
Outdated
There was a problem hiding this comment.
Might want to cleanup $HOME and unset the var in postCheck. Not a major blocker
There was a problem hiding this comment.
On the same note it maybe preferable to add writableTmpDirAsHomeHook as a nativeBuildInput instead
There was a problem hiding this comment.
Nice, I didn't know about writableTmpDirAsHomeHook. I just replaced the custom script with that, thank you
|
@06kellyjac @SuperSandro2000 I re-purposed this PR and added the latest version bump on top. Tests still pass on |
28db71c to
52dbcf8
Compare
|
I had to disable two more tests (I'm not sure why they passed on Darwin, they both access the network), but |
You might have the sandbox off on darwin? I think that's still the default and would allow full networking during builds. |
|
@ofalvai Do we know what's up with the x86_64-darwin failure? Is that due to a test? Did you check? Your aarch64-darwin machine should be able to build that, right? Does it do with the sandbox? I'll try to test tomorrow and would be happy to merge once we have an explanation for that failing check. |
|
Ofborg says it's a simple timeout, which is understandable, this project already takes a long time to build, and now I enabled tests as well. |
|
merge conflict! |
52dbcf8 to
34bcc6f
Compare
|
@wolfgangwalther it's fixed now. Tested on |
|
So I can build both linux fine, but darwin fails with this: (repeatedly) Edit: That's with sandbox, though, on the community-builder. Is this expected? |
|
Interesting, this is the test case that timed out for me on Linux, and so I added to the skip list. But it has never hanged for me on macOS. And I'm also building with |
The project has an extensive tests suite in both Rust and Typescript, and while I couldn't enable all of them, this is one attempt to run at least a subset in the Nix build.
34bcc6f to
1161ba5
Compare
|
@wolfgangwalther that test is now excluded for all platforms. I looked at the test source and have no idea why it hangs while other REPL tests do not. |
|
Pin Deno to version 2.2.12 as this is the last version that successfully built via Hydra. All newer versions revert to source-building which takes way too long for every developer. References: NixOS/nixpkgs#417331 References: NixOS/nixpkgs#384838 Signed-off-by: Fletcher Nichol <fletcher@systeminit.com>
Pin Deno to version 2.2.12 as this is the last version that successfully built via Hydra. All newer versions revert to source-building which takes way too long for every developer. References: NixOS/nixpkgs#417331 References: NixOS/nixpkgs#384838 Signed-off-by: Fletcher Nichol <fletcher@systeminit.com>
The project has an extensive tests suite in both Rust and Typescript, and while I couldn't enable all of them, this is one attempt to run at least a subset in the Nix build.
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.