Skip to content
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

#5610 fix: windows build issue #5613

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Conversation

ioanmo226
Copy link
Collaborator

This PR fixed build issue in windows system.

close #5610 // if this PR closes an issue


Tests (delete all except exactly one):

  • Does not need tests (refactor only, docs or internal changes)

To be filled by reviewers

I have reviewed that this PR... (tick whichever items you personally focused on during this review):

  • addresses the issue it closes (if any)
  • code is readable and understandable
  • is accompanied with tests, or tests are not needed
  • is free of vulnerabilities
  • is documented clearly and usefully, or doesn't need documentation

@ioanmo226 ioanmo226 requested a review from sosnovsky as a code owner February 21, 2024 11:59
@ioanmo226
Copy link
Collaborator Author

Hmm... This one seems complex than I've imagined.
when we use sh in linux, it doesn't recognize set -euxo pipefail
when we use bash in windows, it throws below error in cygwin

scripts/build.sh: line 2: $'\r': command not found
scripts/build.sh: line 7: $'\r': command not found
: invalid option namee 8: set: pipefail

@ioanmo226
Copy link
Collaborator Author

Also in git bash sh build.sh works but in cygwin sh build.sh throws error.
Maybe shell version is different?

@ioanmo226
Copy link
Collaborator Author

This cross-platform build cannot be easily developed or maintained with a bash script.
Therefore, my suggestion is to rewrite the script using Node.js. By doing so, the script will function properly across all platforms, independent of bash versions and platform differences.

@sosnovsky What do you think?
Do you think this one is worth doing it? If so when? right now or low priority?

@sosnovsky
Copy link
Collaborator

This cross-platform build cannot be easily developed or maintained with a bash script. Therefore, my suggestion is to rewrite the script using Node.js. By doing so, the script will function properly across all platforms, independent of bash versions and platform differences.

@sosnovsky What do you think? Do you think this one is worth doing it? If so when? right now or low priority?

I think it'll require too much time as our build script is quite complicated and it won't be easy to rewrite it using node.js.
Our main dev environments are macOS and linux, so it'll be ok to support only them for now.

Also in git bash sh build.sh works but in cygwin sh build.sh throws error.

Maybe it fails because of the first line in build.sh - #!/usr/bin/env bash, as it's specific for *nix systems.

If you need to build extension on Windows, it'll probably be better to create copy of build.sh and name it build-windows.sh, then update it's code to work in cygwin, and add new script to package.json - "build-windows": "sh ./scripts/build-windows.sh"

@ioanmo226
Copy link
Collaborator Author

I'm also using Mac and Linux so it's not a problem.
Do you wanna me to take a look at this one first or manifest v3 update?

@sosnovsky
Copy link
Collaborator

let's work on manifest v3 update, as currently there is no need to fix build on windows

@sosnovsky sosnovsky marked this pull request as draft February 27, 2024 12:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Build issue in windows
3 participants