From 94c3d38dc90681149e496e3c7106f352b3bd2bcb Mon Sep 17 00:00:00 2001 From: Dylan-86 <58813956+Dylan-86@users.noreply.github.com> Date: Tue, 22 Apr 2025 13:05:13 +0200 Subject: [PATCH 1/3] Update HOW_TO_CONTRIBUTE.md --- HOW_TO_CONTRIBUTE.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/HOW_TO_CONTRIBUTE.md b/HOW_TO_CONTRIBUTE.md index 15323527..c010f385 100644 --- a/HOW_TO_CONTRIBUTE.md +++ b/HOW_TO_CONTRIBUTE.md @@ -42,7 +42,7 @@ Go to the "Individual Components" tab and select: Finally, click Install. -### c. Build Prerequisites - Linux +### c. Linux - Build Prerequisites First, run `npm install -g node-gyp`. Then: @@ -50,12 +50,12 @@ First, run `npm install -g node-gyp`. Then: - Red Hat (Fedora, etc): `sudo dnf install @development-tools gcc gcc-c++ make libsecret-devel krb5-devel libX11-devel libxkbfile-devel`. - Others: see [How to Contribute](https://github.com/microsoft/vscode/wiki/How-to-Contribute). -### d. Building Void +### d. Building Void from Visual Studio Code To build Void, open `void/` inside VSCode. Then open your terminal and run: 1. `npm install` to install all dependencies. -2. `npm run watchreact` to build Void's browser dependencies like React. (If this doesn't work, try `npm run buildreact`). +2. `npm run watchreact` to build Void's browser dependencies like React. (If this doesn't work, try `npm run buildreact`). If you get an error, try running it with `NODE_OPTIONS="--max-old-space-size=8192`, for example `NODE_OPTIONS="--max-old-space-size=8192" npm run buildreact`. 3. Build Void. - Press Cmd+Shift+B (Mac). - Press Ctrl+Shift+B (Windows/Linux). @@ -70,7 +70,11 @@ To build Void, open `void/` inside VSCode. Then open your terminal and run: #### Building Void from Terminal -Alternatively, if you want to build Void from the terminal, instead of pressing Cmd+Shift+B you can run `npm run watch`. The build is done when you see something like this: +Alternatively, if you want to build Void from the terminal, you can follow these steps. +1. Clone this repo with `git clone https://github.com/voideditor/void/`. +2. Go inside the "void" folder with `cd void` and then run `npm install`. This will install all dependencies. It can take a few minutes. +3. Now run `npm run buildreact`). If you get an error, try running it with `NODE_OPTIONS="--max-old-space-size=8192`, for example `NODE_OPTIONS="--max-old-space-size=8192" npm run buildreact`. +The build is done when you see something like this: ``` [watch-extensions] [00:37:39] Finished compilation extensions with 0 errors after 19303 ms @@ -79,6 +83,10 @@ Alternatively, if you want to build Void from the terminal, instead of pressing [watch-client ] [00:38:07] Finished compilation with 0 errors after 5 ms ``` +5. Now you can run void by simply typing the following commands (the first time you run, it can take several minutes to load): + - Mac/Linux: Run `./scripts/code.sh` . + - Windows: Run `./scripts/code.bat`. + #### Common Fixes From d1db3946931baa76cea20681f410083b2bc7a55c Mon Sep 17 00:00:00 2001 From: Dylan-86 <58813956+Dylan-86@users.noreply.github.com> Date: Tue, 22 Apr 2025 13:24:25 +0200 Subject: [PATCH 2/3] Updated instructions based on my quite extensive experience with Void on Linux/Ubuntu --- HOW_TO_CONTRIBUTE.md | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/HOW_TO_CONTRIBUTE.md b/HOW_TO_CONTRIBUTE.md index c010f385..21516eb0 100644 --- a/HOW_TO_CONTRIBUTE.md +++ b/HOW_TO_CONTRIBUTE.md @@ -63,6 +63,17 @@ To build Void, open `void/` inside VSCode. Then open your terminal and run: 4. Run Void. - Run `./scripts/code.sh` (Mac/Linux). - Run `./scripts/code.bat` (Windows). +5. On Linux, If you get this error with code.sh : + +``` +[366157:0422/132119.648030:FATAL:setuid_sandbox_host.cc(163)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /home/user/Applications/void/void/.build/electron/chrome-sandbox is owned by root and has mode 4755. +Trace/breakpoint trap (core dumped) +``` + +Simply run +`sudo chown root:root .build/electron/chrome-sandbox && sudo chmod 4755 .build/electron/chrome-sandbox` +and then run again `./scripts/code.sh` - it should fix the problem and launch Void in a few seconds. + 6. Nice-to-knows. - You can always press Ctrl+R (Cmd+R) inside the new window to reload and see your new changes. It's faster than Ctrl+Shift+P and `Reload Window`. - You might want to add the flags `--user-data-dir ./.tmp/user-data --extensions-dir ./.tmp/extensions` to the above run command, which lets you delete the `.tmp` folder to reset any IDE changes you made when testing. @@ -86,7 +97,14 @@ The build is done when you see something like this: 5. Now you can run void by simply typing the following commands (the first time you run, it can take several minutes to load): - Mac/Linux: Run `./scripts/code.sh` . - Windows: Run `./scripts/code.bat`. - +6. If you get this error when running code.sh on Linux: +``` +[366157:0422/132119.648030:FATAL:setuid_sandbox_host.cc(163)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /home/user/Applications/void/void/.build/electron/chrome-sandbox is owned by root and has mode 4755. +Trace/breakpoint trap (core dumped) +``` +Simply run +`sudo chown root:root .build/electron/chrome-sandbox && sudo chmod 4755 .build/electron/chrome-sandbox` +and then run again `./scripts/code.sh` - it should fix the problem and launch Void in a few seconds. #### Common Fixes From 5173ef70c870a64434a7480171427c9c957091e6 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Sun, 27 Apr 2025 20:20:59 -0700 Subject: [PATCH 3/3] update how to contribute --- HOW_TO_CONTRIBUTE.md | 53 +++++++++++++------------------------------- 1 file changed, 15 insertions(+), 38 deletions(-) diff --git a/HOW_TO_CONTRIBUTE.md b/HOW_TO_CONTRIBUTE.md index 21516eb0..693ddd5c 100644 --- a/HOW_TO_CONTRIBUTE.md +++ b/HOW_TO_CONTRIBUTE.md @@ -23,11 +23,11 @@ Most of Void's code lives in the folder `src/vs/workbench/contrib/void/`. ## Building Void -### a. Build Prerequisites - Mac +### a. Mac - Build Prerequisites If you're using a Mac, you need Python and XCode. You probably have these by default. -### b. Build Prerequisites - Windows +### b. Windows - Build Prerequisites If you're using a Windows computer, first get [Visual Studio 2022](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community) (recommended) or [VS Build Tools](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools) (not recommended). If you already have both, you might need to run the next few steps on both of them. @@ -50,42 +50,28 @@ First, run `npm install -g node-gyp`. Then: - Red Hat (Fedora, etc): `sudo dnf install @development-tools gcc gcc-c++ make libsecret-devel krb5-devel libX11-devel libxkbfile-devel`. - Others: see [How to Contribute](https://github.com/microsoft/vscode/wiki/How-to-Contribute). -### d. Building Void from Visual Studio Code +### d. Building Void from inside VSCode To build Void, open `void/` inside VSCode. Then open your terminal and run: 1. `npm install` to install all dependencies. -2. `npm run watchreact` to build Void's browser dependencies like React. (If this doesn't work, try `npm run buildreact`). If you get an error, try running it with `NODE_OPTIONS="--max-old-space-size=8192`, for example `NODE_OPTIONS="--max-old-space-size=8192" npm run buildreact`. -3. Build Void. +2. Build Void. - Press Cmd+Shift+B (Mac). - Press Ctrl+Shift+B (Windows/Linux). - This step can take ~5 min. The build is done when you see two check marks (one of the items will continue spinning indefinitely - it compiles our React code). -4. Run Void. +3. Run Void. - Run `./scripts/code.sh` (Mac/Linux). - Run `./scripts/code.bat` (Windows). -5. On Linux, If you get this error with code.sh : - -``` -[366157:0422/132119.648030:FATAL:setuid_sandbox_host.cc(163)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /home/user/Applications/void/void/.build/electron/chrome-sandbox is owned by root and has mode 4755. -Trace/breakpoint trap (core dumped) -``` - -Simply run -`sudo chown root:root .build/electron/chrome-sandbox && sudo chmod 4755 .build/electron/chrome-sandbox` -and then run again `./scripts/code.sh` - it should fix the problem and launch Void in a few seconds. - -6. Nice-to-knows. +4. Nice-to-knows. - You can always press Ctrl+R (Cmd+R) inside the new window to reload and see your new changes. It's faster than Ctrl+Shift+P and `Reload Window`. - You might want to add the flags `--user-data-dir ./.tmp/user-data --extensions-dir ./.tmp/extensions` to the above run command, which lets you delete the `.tmp` folder to reset any IDE changes you made when testing. - You can kill any of the build scripts by pressing `Ctrl+D` in VSCode terminal. If you press `Ctrl+C` the script will close but will keep running in the background (to open all background scripts, just re-build). +If you get any errors, scroll down for common fixes. + #### Building Void from Terminal -Alternatively, if you want to build Void from the terminal, you can follow these steps. -1. Clone this repo with `git clone https://github.com/voideditor/void/`. -2. Go inside the "void" folder with `cd void` and then run `npm install`. This will install all dependencies. It can take a few minutes. -3. Now run `npm run buildreact`). If you get an error, try running it with `NODE_OPTIONS="--max-old-space-size=8192`, for example `NODE_OPTIONS="--max-old-space-size=8192" npm run buildreact`. -The build is done when you see something like this: +To build Void from the terminal instead of from inside VSCode, follow the steps above, but instead of pressing Cmd+Shift+B, run `npm run watch`. The build is done when you see something like this: ``` [watch-extensions] [00:37:39] Finished compilation extensions with 0 errors after 19303 ms @@ -94,27 +80,18 @@ The build is done when you see something like this: [watch-client ] [00:38:07] Finished compilation with 0 errors after 5 ms ``` -5. Now you can run void by simply typing the following commands (the first time you run, it can take several minutes to load): - - Mac/Linux: Run `./scripts/code.sh` . - - Windows: Run `./scripts/code.bat`. -6. If you get this error when running code.sh on Linux: -``` -[366157:0422/132119.648030:FATAL:setuid_sandbox_host.cc(163)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /home/user/Applications/void/void/.build/electron/chrome-sandbox is owned by root and has mode 4755. -Trace/breakpoint trap (core dumped) -``` -Simply run -`sudo chown root:root .build/electron/chrome-sandbox && sudo chmod 4755 .build/electron/chrome-sandbox` -and then run again `./scripts/code.sh` - it should fix the problem and launch Void in a few seconds. - #### Common Fixes -- Make sure you followed the prerequisite steps. +- Make sure you followed the prerequisite steps above. - Make sure you have Node version `20.18.2` (the version in `.nvmrc`)! - If you get `"TypeError: Failed to fetch dynamically imported module"`, make sure all imports end with `.js`. +- If you get an error with React, try running `NODE_OPTIONS="--max-old-space-size=8192" npm run buildreact`. - If you see missing styles, wait a few seconds and then reload. -- If you have any questions, feel free to [submit an issue](https://github.com/voideditor/void/issues/new). You can also refer to VSCode's complete [How to Contribute](https://github.com/microsoft/vscode/wiki/How-to-Contribute) page. -- If you get errors like `npm error libtool: error: unrecognised option: '-static'`, make sure you have GNU libtool instead of BSD libtool (BSD is the default in macos) +- If you get errors like `npm error libtool: error: unrecognised option: '-static'`, when running ./scripts/code.sh, make sure you have GNU libtool instead of BSD libtool (BSD is the default in macos) +- If you get erorrs like `The SUID sandbox helper binary was found, but is not configured correctly` when running ./scripts/code.sh, run +`sudo chown root:root .build/electron/chrome-sandbox && sudo chmod 4755 .build/electron/chrome-sandbox` and then run `./scripts/code.sh` again. +- If you have any other questions, feel free to [submit an issue](https://github.com/voideditor/void/issues/new). You can also refer to VSCode's complete [How to Contribute](https://github.com/microsoft/vscode/wiki/How-to-Contribute) page. ## Packaging