mirror of
https://github.com/status-im/status-app.git
synced 2026-08-27 15:11:20 +00:00
fixes : ``` 0m=[94mqrc:/app/AppLayouts/Profile/views/EnsView.qml:4 [0m [33mtext[0m=[94m"module \"QtQml.StateMachine\" is not installed"[0m ``` and ``` E FATAL EXCEPTION: qtMainLoopThread Process: app.status.mobile.debug, PID: 18150 java.lang.UnsatisfiedLinkError: dlopen failed: library "libStatus Debug_arm64-v8a.so" not found at java.lang.Runtime.loadLibrary0(Runtime.java:1097) at java.lang.Runtime.loadLibrary0(Runtime.java:1019) at java.lang.System.loadLibrary(System.java:1765) at org.qtproject.qt.android.QtLoader.loadLibraryHelper(QtLoader.java:486) at org.qtproject.qt.android.QtLoader.lambda$loadMainLibrary$0$org-qtproject-qt-android-QtLoader(QtLoader.java:535) at org.qtproject.qt.android.QtLoader$$ExternalSyntheticLambda1.run(D8$$SyntheticClass:0) at org.qtproject.qt.android.QtThread.lambda$run$0(QtThread.java:57) at org.qtproject.qt.android.QtThread$$ExternalSyntheticLambda0.run(D8$$SyntheticClass:0) at org.qtproject.qt.android.QtThread$1.run(QtThread.java:25) at java.lang.Thread.run(Thread.java:1563) ``` - re applies this commit : https://github.com/status-im/status-app/commit/9381d0d06c2bee8e902be3bcf49e9680fe055b0d - I also adjust the qml lint job to catch this kind of import failure in CI : ``` [2026-02-03T07:06:17.215Z] Running: QML Lint (Mobile) [2026-02-03T07:06:17.215Z] qmllint: /opt/qt/6.9.2/gcc_64/bin/qmllint [2026-02-03T07:06:17.215Z] Qt modules: /opt/qt/6.9.2/android_arm64_v8a/qml [2026-02-03T07:06:17.215Z] [2026-02-03T07:06:17.215Z] Checking 1200 files... [2026-02-03T07:06:33.882Z] [2026-02-03T07:06:33.882Z] ERRORS: [2026-02-03T07:06:33.882Z] /home/jenkins/workspace/status-app-android/13/ui/app/AppLayouts/Profile/views/EnsView.qml:4:1: Failed to import QtQml.StateMachine. Are your import paths set up properly? ```
72 lines
1.8 KiB
Bash
Executable File
72 lines
1.8 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
set -eo pipefail
|
|
|
|
SCRIPT_DIR=$(dirname "$(realpath "$0")")
|
|
ROOT_DIR=$(realpath "$SCRIPT_DIR/..")
|
|
|
|
QT_QML_PATH="${QT_QML_PATH:-${QTDIR}/qml}"
|
|
|
|
QMLLINT="${QTDIR}/bin/qmllint"
|
|
[[ ! -x "$QMLLINT" ]] && QMLLINT="${QTDIR}/libexec/qmllint"
|
|
|
|
if [[ ! -x "$QMLLINT" ]]; then
|
|
echo "Error: qmllint not found. Set QTDIR to your Qt installation path."
|
|
exit 1
|
|
fi
|
|
|
|
# Check for jq
|
|
if ! command -v jq &> /dev/null; then
|
|
echo "Error: jq is required but not installed."
|
|
exit 1
|
|
fi
|
|
|
|
echo "qmllint: $QMLLINT"
|
|
echo "Qt modules: $QT_QML_PATH"
|
|
echo ""
|
|
|
|
# Collect all QML files
|
|
mapfile -d '' QML_FILES < <(find "$ROOT_DIR/ui" -name "*.qml" -print0)
|
|
echo "Checking ${#QML_FILES[@]} files..."
|
|
|
|
# Run qmllint with JSON output for precise filtering
|
|
JSON_OUTPUT=$("$QMLLINT" \
|
|
--json - \
|
|
-I "$ROOT_DIR/ui" \
|
|
-I "$ROOT_DIR/ui/imports" \
|
|
-I "$ROOT_DIR/ui/app" \
|
|
-I "$ROOT_DIR/ui/StatusQ/src" \
|
|
-I "$QT_QML_PATH" \
|
|
"${QML_FILES[@]}" 2>/dev/null) || true
|
|
|
|
# Filter JSON for real errors only:
|
|
# 1. "Failed to import Qt*" - Missing Qt modules (runtime crash)
|
|
# 2. "duplicated-name" warnings - Duplicate symbols (runtime crash)
|
|
#
|
|
# Excluded (not errors):
|
|
# - QtWebEngine/QtWebChannel - disabled on mobile intentionally
|
|
# - QtModelsToolkit - third-party C++ plugin
|
|
# - qmldir missing files, cascading errors, etc.
|
|
ERRORS=$(echo "$JSON_OUTPUT" | jq -r '
|
|
.files[]
|
|
| .filename as $file
|
|
| .warnings[]
|
|
| select(
|
|
(.id == "duplicated-name") or
|
|
((.id == "import") and (.message | test("Failed to import Qt(?!(ModelsToolkit|WebEngine|WebChannel))")))
|
|
)
|
|
| "\($file):\(.line):\(.column): \(.message)"
|
|
' 2>/dev/null || true)
|
|
|
|
if [[ -n "$ERRORS" ]]; then
|
|
echo ""
|
|
echo "ERRORS:"
|
|
echo "$ERRORS"
|
|
echo ""
|
|
ERROR_COUNT=$(echo "$ERRORS" | wc -l | tr -d ' ')
|
|
echo "Total: $ERROR_COUNT"
|
|
exit 1
|
|
fi
|
|
|
|
echo "OK"
|
|
exit 0
|