-
Notifications
You must be signed in to change notification settings - Fork 219
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
ci: fix wasm build script #4519
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The build script had an invalid `sed` command with an extra `''` argument that caused it to fail with ``` sed: can't read s/name = "query_engine_wasm"/name = "query_engine"/g: No such file or directory ``` Example: https://github.com/prisma/prisma-engines/actions/runs/7090582268/job/19297872413 This is reproducible both on CI and locally for me. Perhaps it was written for BSD sed and doesn't work with GNU sed (so it always fails on Linux and also fails on macOS inside prisma-engines Nix flake but maybe it works on macOS without Nix)? Because of this, a broken package was published from CI. The commit fixes the `sed` command and adds `set -e` so that errors like this would fail CI instead of silently continuing and doing wrong things.
CodSpeed Performance ReportMerging #4519 will improve performances by 5.73%Comparing Summary
Benchmarks breakdown
|
Jolg42
approved these changes
Dec 4, 2023
Turns out it is indeed GNU sed vs BSD sed difference! Seems like the only way to make it work in both (other than not using in-place editing) is something like sed -i .bak 's/name = "query_engine_wasm"/name = "query_engine"/g' Cargo.toml
rm Cargo.toml.bak |
Gonna merge this as is and open a follow-up PR to make it cross-platform to avoid merge conflicts in another PR. |
aqrln
added a commit
that referenced
this pull request
Dec 5, 2023
#4519 fixed the `build.sh` script being broken with GNU sed (e.g. on Linux, including on CI) but broke it with BSD sed (e.g. on vanilla macOS with out-of-the box BSD sed, without GNU sed installed via Homebrew or Nix). This commit makes the script cross-platform.
aqrln
added a commit
that referenced
this pull request
Dec 5, 2023
#4519 fixed the `build.sh` script being broken with GNU sed (e.g. on Linux, including on CI) but broke it with BSD sed (e.g. on vanilla macOS with out-of-the box BSD sed, without GNU sed installed via Homebrew or Nix). This commit makes the script cross-platform. Co-authored-by: Alberto Schiabel <jkomyno@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The build script had an invalid
sed
command with an extra''
argument that caused it to fail with
Example: https://github.com/prisma/prisma-engines/actions/runs/7090582268/job/19297872413
This is reproducible both on CI and locally for me. Perhaps it was
written for BSD sed and doesn't work with GNU sed (so it always fails on
Linux and also fails on macOS inside prisma-engines Nix flake but maybe
it works on macOS without Nix)?
Because of this, a broken package was published from CI.
The commit fixes the
sed
command and addsset -e
so that errors likethis would fail CI instead of silently continuing and doing wrong
things.