Repository navigation
[improvement](lance) Update lance-c to merged upstream main #68689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
5f8c8cb
c285848
717a851
3dcc697
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -480,6 +480,7 @@ if [[ "${CLEAN}" -eq 1 && "${BUILD_BE}" -eq 0 && "${BUILD_FE}" -eq 0 && ${BUILD_ | |
| fi | ||
|
|
||
| # build thirdparty libraries if necessary. check last thirdparty lib installation | ||
| source "${DORIS_HOME}/thirdparty/lance-install.sh" | ||
| if [[ "${TARGET_SYSTEM}" == 'Darwin' ]]; then | ||
| LAST_THIRDPARTY_LIB='libbrotlienc.a' | ||
| else | ||
|
|
@@ -495,10 +496,21 @@ if [[ ! -f "${DORIS_THIRDPARTY}/installed/lib/${LAST_THIRDPARTY_LIB}" || | |
| ! -f "${DORIS_THIRDPARTY}/installed/include/paimon_rust/paimon.h" || | ||
| ! -s "${DORIS_THIRDPARTY}/installed/lib64/libpaimon_c.a" || | ||
| ! -s "${DORIS_THIRDPARTY}/installed/include/paimon_rust/paimon.h" || | ||
| -e "${DORIS_THIRDPARTY}/installed/lib64/.paimon-installing" ]]; then | ||
| # Compilation images may contain only installed artifacts; never erase them without a rebuild source. | ||
| if [[ ! -f "${DORIS_THIRDPARTY}/build-thirdparty.sh" ]]; then | ||
| echo "Third-party dependencies require a rebuild, but build-thirdparty.sh is missing." >&2 | ||
| -e "${DORIS_THIRDPARTY}/installed/lib64/.paimon-installing" ]] || | ||
| ! lance_c_install_is_current "${DORIS_HOME}/thirdparty" "${DORIS_THIRDPARTY}/installed"; then | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [P2] Validate external rebuild inputs before deleting |
||
| # External trees can be partially updated or pinned to another revision. Preserve | ||
| # the existing prefix unless their build inputs can produce the requested Lance version. | ||
| for input in build-thirdparty.sh download-thirdparty.sh vars.sh lance-install.sh patches/lance-c-foyer.patch; do | ||
| if [[ ! -f "${DORIS_THIRDPARTY}/${input}" || ! -r "${DORIS_THIRDPARTY}/${input}" ]]; then | ||
| echo "Third-party dependencies require a rebuild, but ${input} is missing or unreadable." >&2 | ||
| echo "Refresh the compilation image or set DORIS_THIRDPARTY to a complete third-party source tree." >&2 | ||
| exit 1 | ||
| fi | ||
| done | ||
| if ! expected_lance_fingerprint="$(lance_c_install_fingerprint "${DORIS_HOME}/thirdparty")" || | ||
| ! rebuild_lance_fingerprint="$(lance_c_install_fingerprint "${DORIS_THIRDPARTY}")" || | ||
| [[ "${rebuild_lance_fingerprint}" != "${expected_lance_fingerprint}" ]]; then | ||
| echo "Lance rebuild sources do not match this checkout; installed dependencies have been preserved." >&2 | ||
| echo "Refresh the compilation image or set DORIS_THIRDPARTY to a complete third-party source tree." >&2 | ||
| exit 1 | ||
| fi | ||
|
|
@@ -511,6 +523,11 @@ if [[ ! -f "${DORIS_THIRDPARTY}/installed/lib/${LAST_THIRDPARTY_LIB}" || | |
| else | ||
| bash "${DORIS_THIRDPARTY}/build-thirdparty.sh" -j "${PARALLEL}" --clean | ||
| fi | ||
| # An external build script can itself be stale. Never link its old output silently. | ||
| if ! lance_c_install_is_current "${DORIS_HOME}/thirdparty" "${DORIS_THIRDPARTY}/installed"; then | ||
| echo "Lance dependency revision does not match this checkout. Refresh the third-party build tree." >&2 | ||
| exit 1 | ||
| fi | ||
| fi | ||
|
|
||
| update_submodule() { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| #!/usr/bin/env bash | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| # Keep the check independent of the installed prefix: an external compilation image | ||
| # can carry old vars.sh alongside an ABI-compatible but behaviorally stale archive. | ||
| lance_c_install_fingerprint() ( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 一个thridparty 为啥要有install 脚本? |
||
| local definitions="$1" | ||
| local TP_DIR="${definitions}" | ||
| source "${definitions}/vars.sh" || return 1 | ||
| local patch_checksum | ||
| patch_checksum="$(cksum < "${definitions}/patches/lance-c-foyer.patch")" || return 1 | ||
| printf '%s\n' "${LANCE_C_SOURCE}" "${LANCE_C_MD5SUM}" "${patch_checksum}" | ||
|
Gabriel39 marked this conversation as resolved.
|
||
| ) | ||
|
|
||
| lance_c_install_is_current() { | ||
| local definitions="$1" installed="$2" expected | ||
| [[ -s "${installed}/lib64/liblance_c.a" && | ||
| -s "${installed}/include/lance/lance.h" && | ||
| -s "${installed}/include/lance/lance.hpp" && | ||
| -s "${installed}/lib64/.lance-c-fingerprint" ]] || return 1 | ||
| expected="$(lance_c_install_fingerprint "${definitions}")" || return 1 | ||
| [[ "$(cat "${installed}/lib64/.lance-c-fingerprint")" == "${expected}" ]] | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.