Removes the `FileFetcher`'s internal cache because I don't believe it's
necessary (we already cache this kind of stuff in places like deno_graph
or config files in different places). Removing it fixes this bug because
this functionality was already implemented in deno_graph and lowers
memory usage of the CLI a little bit.
This PR separates integration tests from CLI tests into a new project
named `cli_tests`. This is a prerequisite for an integration test runner
that can work with either the CLI binary in the current project, or one
that is built ahead of time.
## Background
Rust does not have the concept of artifact dependencies yet
(https://github.com/rust-lang/cargo/issues/9096). Because of this, the
only way we can ensure a binary is built before running associated tests
is by hanging tests off the crate with the binary itself.
Unfortunately this means that to run those tests, you _must_ build the
binary and in the case of the deno executable that might be a 10 minute
wait in release mode.
## Implementation
To allow for tests to run with and without the requirement that the
binary is up-to-date, we split the integration tests into a project of
their own. As these tests would not require the binary to build itself
before being run as-is, we add a stub integration `[[test]]` target in
the `cli` project that invokes these tests using `cargo test`.
The stub test runner we add has `harness = false` so that we can get
access to a `main` function. This `main` function's sole job is to
`execvp` the command `cargo test -p deno_cli`, effectively "calling"
another cargo target.
This ensures that the deno executable is always correctly rebuilt before
running the stub test runner from `cli`, and gets us closer to be able
to run the entire integration test suite on arbitrary deno executables
(and therefore split the build into multiple phases).
The new `cli_tests` project lives within `cli` to avoid a large PR. In
later PRs, the test data will be split from the `cli` project. As there
are a few thousand files, it'll be better to do this as a completely
separate PR to avoid noise.
- Move a workers test to js_unit_tests and make it work
- (slightly) repair the websocketstream_test and make it a JS unit test.
This test was being ignored and rotted quite a bit, but there's some
value in running as much of it as we can.
- Merge the two websocket test files
We don't need to wget `libdl` because we can just copy the one from
within the sysroot, saving two network accesses.
This allows amd64 to use the same build strategy as arm64.
Follow-up from #22298: Use a sysroot to build ARM64 so we work all the
way back to Xenial.
We generate a sysroot ahead-of-time in the
https://github.com/denoland/deno_sysroot_build project and use that to
bootstrap a sysroot here.
This removes the majority of `../../../../../../test_util` relative
imports from the codebase, allowing us to move this code more easily in
the future.
This implements officially blessed and tested deno binaries for ARM64.
Thanks to @LukeChannings for his tireless work in maintaining the
deno-arm64 [1] repo, without which this project would have been far more
complicated. For those of you requiring support for older GLIBC
versions, that repo may still be required for the near future.
Limitations:
- This initial build is built on Ubuntu 22 using the stock GLIBC, which
will limit the utility of these binaries in certain use-cases (eg: early
versions of Ubuntu). We will attempt to support earlier versions of
ARM64 GLIBC in a later revision.
- Like the stock Linux x64 build, this is not a static build and
requires GLIBC. Running on Alpine will require installation of GLIBC.
Fixes #1846, #4862
[1] https://github.com/LukeChannings/deno-arm64
This commit removes some not really necessary FFI tests and in effect
removes them from being accessible from the user code.
This lowers the number of ops accessible to user code to 16.
Hacky quick fix. The real fix is a lot more work to do (move the
`SourceTextInfo` into all the diagnostics in order to make this less
error pone). I've already started on it, but it will require a lot of
downstream create changes.
Closes #22288
Auth tokens may be specified for one of the following:
- `abc123@deno.land`: `deno.land`, `www.deno.land`, etc
- `abc123@deno.land:8080`: `deno.land:8080`, `www.deno.land:8080`, etc
- `abc123@1.1.1.1`: IP `1.1.1.1` only
- `abc123@1.1.1.1:8080`: IP `1.1.1.1`, port 8080 only
- `abc123@[ipv6]`: IPv6 `[ipv6]` only
- `abc123@[ipv6]:8080`: IPv6 `[ipv6]`, port 8080 only
Leading dots are ignored, so `.deno.dev` is equivalent to `deno.dev`.