BlogDocs

fix(qe): fix broken shebang in query-engine-wasm/build.sh(#5050)

Merged
Comparing
fix-shebang
(
270e457
) with
main
(
5b155e0
)
0%
IMPROVEMENTS
0
REGRESSIONS
0
UNTOUCHED
11
NEW
0
DROPPED
0
IGNORED
0

Benchmarks

Passed

build (medium)
query-engine/schema/benches/schema_builder_bench.rs::benches::criterion_benchmark::schema_builder::build (medium)
+1%
2.5 ms
2.5 ms
medium_read
query-engine/request-handlers/benches/query_planning_bench.rs::benches::criterion_benchmark::medium_read
0%
317.2 µs
317 µs
validate (large)
query-engine/schema/benches/schema_builder_bench.rs::benches::criterion_benchmark::psl::validate (large)
0%
70.1 ms
70 ms
large_read
query-engine/request-handlers/benches/query_planning_bench.rs::benches::criterion_benchmark::large_read
0%
1.6 ms
1.6 ms
deep_read_query
query-engine/request-handlers/benches/query_planning_bench.rs::benches::criterion_benchmark::deep_read_query
0%
1.9 ms
1.9 ms
small_read
query-engine/request-handlers/benches/query_planning_bench.rs::benches::criterion_benchmark::small_read
0%
109.1 µs
109.1 µs
mutation
query-engine/request-handlers/benches/query_planning_bench.rs::benches::criterion_benchmark::mutation
0%
6.2 ms
6.2 ms
build (small)
query-engine/schema/benches/schema_builder_bench.rs::benches::criterion_benchmark::schema_builder::build (small)
0%
297.2 µs
297.2 µs
validate (small)
query-engine/schema/benches/schema_builder_bench.rs::benches::criterion_benchmark::psl::validate (small)
0%
2.2 ms
2.2 ms
build (large)
query-engine/schema/benches/schema_builder_bench.rs::benches::criterion_benchmark::schema_builder::build (large)
0%
5.1 ms
5.1 ms
validate (medium)
query-engine/schema/benches/schema_builder_bench.rs::benches::criterion_benchmark::psl::validate (medium)
0%
15.2 ms
15.2 ms

Commits

Click on a commit to change the comparison range
base
main
5b155e0
0%
fix(qe): fix broken shebang in query-engine-wasm/build.sh `#!/bin/bash` is non-portable and only works on some systems which has bash in that location, which is not actually standard or necessarily expected. The only two absolute paths one can rely on in portable scripts are `#!/bin/sh` (which is a POSIX standard) and `#!/usr/bin/env` (which is not technically mandated by a formal standard but is de-facto implemented on all Unix systems). None of my systems have a usable bash installation in `/bin/bash`. My Linux system only has bash in `/run/current-system/sw/bin/bash`, so the script fails with `sh: line 2: ./build.sh: cannot execute: required file not found`. My macOS system has an ancient version of bash shipped with the system installed as `/bin/bash` (which Apple last updated in 2007 and will never ever update anymore for license reasons since bash 4+ switched to GPLv3; it's likely to be removed in future macOS versions though as macOS has long replaced bash with zsh as its shell of choice), and in some ways it's worse than not having any since modern bash scripts that assume bash 4 or 5 often fail or produce incorrect results with it. This specific script accidentally happens to work anyway, but the correct bash installation to use on this system is still `/opt/homebrew/bin/bash`. Anything other than `/bin/sh` (be it `bash` or `python` or `node`) can only be dispatched via `/usr/bin/env` if a script is intended to be used on more than one machine because it's not possible to predict where the interpreter is going to be at.
270e457
2 days ago
by aqrln
ResourcesHomePricingDocsBlogGitHubChangelog
Copyright © 2024 CodSpeed Technology SAS. All rights reserved.