deps: remove deps/simdutf

We depend on V8's version of simdutf now.

PR-URL: https://github.com/nodejs/node/pull/58070
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
This commit is contained in:
Michaël Zasso 2025-01-29 08:47:42 +01:00
parent e61a0cea04
commit 187fc5cc3a
No known key found for this signature in database
GPG Key ID: 770F7A9A5AE15600
13 changed files with 3 additions and 72712 deletions

View File

@ -36,7 +36,6 @@ on:
- postject
- root-certificates
- simdjson
- simdutf
- sqlite
- undici
- uvwasi
@ -244,14 +243,6 @@ jobs:
cat temp-output
tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true
rm temp-output
- id: simdutf
subsystem: deps
label: dependencies
run: |
./tools/dep_updaters/update-simdutf.sh > temp-output
cat temp-output
tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true
rm temp-output
- id: sqlite
subsystem: deps
label: dependencies, sqlite

View File

@ -1774,7 +1774,7 @@ The externally maintained libraries used by Node.js are:
limitations under the License.
"""
- simdutf, located at deps/simdutf, is licensed as follows:
- simdutf, located at deps/v8/third_party/simdutf, is licensed as follows:
"""
Copyright 2021 The simdutf authors

14
deps/simdutf/BUILD.gn vendored
View File

@ -1,14 +0,0 @@
##############################################################################
# #
# DO NOT EDIT THIS FILE! #
# #
##############################################################################
# This file is used by GN for building, which is NOT the build system used for
# building official binaries.
# Please modify the gyp files if you are making changes to build system.
import("unofficial.gni")
simdutf_gn_build("simdutf") {
}

View File

@ -1,18 +0,0 @@
Copyright 2021 The simdutf authors
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@ -1,13 +0,0 @@
# simdutf
This project boosts unicode validation and transcoding performance by
utilizing SIMD operations where possible.
The source is pulled from: https://github.com/simdutf/simdutf
Active development occurs in the default branch (currently named `master`).
## Updating
See [tools/dep_updaters/README.md#simdutf](../../tools/dep_updaters/README.md#simdutf)
for instructions.

66420
deps/simdutf/simdutf.cpp vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,21 +0,0 @@
{
'variables': {
'simdutf_sources': [
'simdutf.cpp',
]
},
'targets': [
{
'target_name': 'simdutf',
'toolsets': ['host', 'target'],
'type': 'static_library',
'include_dirs': ['.'],
'direct_dependent_settings': {
'include_dirs': ['.'],
},
'sources': [
'<@(simdutf_sources)',
],
},
]
}

6085
deps/simdutf/simdutf.h vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,32 +0,0 @@
# This file is used by GN for building, which is NOT the build system used for
# building official binaries.
# Please edit the gyp files if you are making changes to build system.
# The actual configurations are put inside a template in unofficial.gni to
# prevent accidental edits from contributors.
template("simdutf_gn_build") {
config("simdutf_config") {
include_dirs = [ "." ]
}
gypi_values = exec_script("../../tools/gypi_to_gn.py",
[ rebase_path("simdutf.gyp") ],
"scope",
[ "simdutf.gyp" ])
source_set(target_name) {
forward_variables_from(invoker, "*")
public_configs = [ ":simdutf_config" ]
sources = gypi_values.simdutf_sources
if (is_clang || !is_win) {
cflags_cc = [
"-Wno-#pragma-messages",
"-Wno-ambiguous-reversed-operator",
"-Wno-unreachable-code-break",
"-Wno-unused-const-variable",
"-Wno-unused-function",
"-Wno-c++98-compat-extra-semi",
]
}
}
}

View File

@ -30,7 +30,6 @@ This a list of all the dependencies:
* [openssl][]
* [postject][]
* [simdjson][]
* [simdutf][]
* [sqlite][]
* [undici][]
* [uvwasi][]
@ -364,11 +363,6 @@ The [postject](https://github.com/nodejs/postject) dependency is used for the
The [simdjson](https://github.com/simdjson/simdjson) dependency is
a C++ library for fast JSON parsing.
### simdutf
The [simdutf](https://github.com/simdutf/simdutf) dependency is
a C++ library for fast UTF-8 decoding and encoding.
### sqlite
The [sqlite](https://github.com/sqlite/sqlite) dependency is
@ -435,7 +429,6 @@ according to [RFC 8878](https://datatracker.ietf.org/doc/html/rfc8878).
[openssl]: #openssl
[postject]: #postject
[simdjson]: #simdjson
[simdutf]: #simdutf
[sqlite]: #sqlite
[undici]: #undici
[update-openssl-action]: ../../../.github/workflows/update-openssl.yml

View File

@ -36,31 +36,6 @@ been created with the changes), do the following:
[`c61870c`]: https://github.com/nodejs/node/commit/c61870c376e2f5b0dbaa939972c46745e21cdbdd
## simdutf
The `update-simdutf.sh` script takes the target version to update as its only
argument, downloads it from the [GitHub repo](https://github.com/simdutf/simdutf)
and uses it to replace the contents of `deps/simdutf/`. The contents are replaced
entirely except for the `*.gyp` and `*.gypi` build files, which are part of the
Node.js build definitions and are not present in the upstream repo.
For example, in order to update to version `2.0.7`, the following command can
be run:
```bash
./tools/dep_updaters/update-simdutf.sh 2.0.7
```
Once the script has run (either manually, or by CI in which case a PR will have
been created with the changes), do the following:
1. Check the [changelog](https://github.com/simdutf/simdutf/releases/tag/v2.0.7) for
things that might require changes in Node.js.
2. If necessary, update `simdutf.gyp` with build-related changes.
3. Check that Node.js compiles without errors and the tests pass.
4. Create a commit for the update and in the commit message include the
important/relevant items from the changelog.
## OpenSSL
The `update-openssl.sh` script automates the steps described in

View File

@ -1,65 +0,0 @@
#!/bin/sh
set -e
# Shell script to update simdutf in the source tree to a specific version
BASE_DIR=$(cd "$(dirname "$0")/../.." && pwd)
DEPS_DIR="$BASE_DIR/deps"
[ -z "$NODE" ] && NODE="$BASE_DIR/out/Release/node"
[ -x "$NODE" ] || NODE=$(command -v node)
# shellcheck disable=SC1091
. "$BASE_DIR/tools/dep_updaters/utils.sh"
NEW_VERSION="$("$NODE" --input-type=module <<'EOF'
const res = await fetch('https://api.github.com/repos/simdutf/simdutf/releases/latest',
process.env.GITHUB_TOKEN && {
headers: {
"Authorization": `Bearer ${process.env.GITHUB_TOKEN}`
},
});
if (!res.ok) throw new Error(`FetchError: ${res.status} ${res.statusText}`, { cause: res });
const { tag_name } = await res.json();
console.log(tag_name.replace('v', ''));
EOF
)"
CURRENT_VERSION=$(grep "#define SIMDUTF_VERSION" "$DEPS_DIR/simdutf/simdutf.h" | sed -n "s/^.*VERSION \"\(.*\)\"/\1/p")
# This function exit with 0 if new version and current version are the same
compare_dependency_version "simdutf" "$NEW_VERSION" "$CURRENT_VERSION"
echo "Making temporary workspace..."
WORKSPACE=$(mktemp -d 2> /dev/null || mktemp -d -t 'tmp')
cleanup () {
EXIT_CODE=$?
[ -d "$WORKSPACE" ] && rm -rf "$WORKSPACE"
exit $EXIT_CODE
}
trap cleanup INT TERM EXIT
SIMDUTF_REF="v$NEW_VERSION"
SIMDUTF_ZIP="simdutf-$SIMDUTF_REF.zip"
SIMDUTF_LICENSE="LICENSE-MIT"
cd "$WORKSPACE"
echo "Fetching simdutf source archive..."
curl -sL -o "$SIMDUTF_ZIP" "https://github.com/simdutf/simdutf/releases/download/$SIMDUTF_REF/singleheader.zip"
log_and_verify_sha256sum "simdutf" "$SIMDUTF_ZIP"
unzip "$SIMDUTF_ZIP"
rm "$SIMDUTF_ZIP"
rm ./*_demo.cpp
curl -sL -o "$SIMDUTF_LICENSE" "https://raw.githubusercontent.com/simdutf/simdutf/HEAD/LICENSE-MIT"
echo "Replacing existing simdutf (except GYP and GN build files)"
mv "$DEPS_DIR/simdutf/"*.gyp "$DEPS_DIR/simdutf/"*.gn "$DEPS_DIR/simdutf/"*.gni "$DEPS_DIR/simdutf/README.md" "$WORKSPACE/"
rm -rf "$DEPS_DIR/simdutf"
mv "$WORKSPACE" "$DEPS_DIR/simdutf"
# Update the version number on maintaining-dependencies.md
# and print the new version as the last line of the script as we need
# to add it to $GITHUB_ENV variable
finalize_version_update "simdutf" "$NEW_VERSION"

View File

@ -85,8 +85,8 @@ licenseText="$(sed -e '/The data format used by the zlib library/,$d' -e 's/^\/\
addlicense "zlib" "deps/zlib" "$licenseText"
licenseText="$(cat "${rootdir}/deps/simdjson/LICENSE")"
addlicense "simdjson" "deps/simdjson" "$licenseText"
licenseText="$(cat "${rootdir}/deps/simdutf/LICENSE-MIT")"
addlicense "simdutf" "deps/simdutf" "$licenseText"
licenseText="$(cat "${rootdir}/deps/v8/third_party/simdutf/LICENSE")"
addlicense "simdutf" "deps/v8/third_party/simdutf" "$licenseText"
licenseText="$(curl -sL https://raw.githubusercontent.com/ada-url/ada/HEAD/LICENSE-MIT)"
addlicense "ada" "deps/ada" "$licenseText"
licenseText="$(cat "${rootdir}/deps/minimatch/LICENSE")"