-
-
Notifications
You must be signed in to change notification settings - Fork 91
Add sandbox setup cmd for VSCodium #2989
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
Merged
+88
−27
Merged
Changes from 4 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
db3ab51
feat: codium sandbox setup cmd (wip)
rinOfTheStars 9edd9ad
hacky workaround to OpenVSX Marketplace stuff
rinOfTheStars 963c0e4
Update CONTRIBUTING docs and change format to mdx
rinOfTheStars 5d67e7f
Merge branch 'main' into main
rinOfTheStars c7b00dd
Setup script consolidation, update CONTRIBUTING.mdx
rinOfTheStars 18b145a
Fix lack of tabs on a code/codium command mention
rinOfTheStars 498aca0
Merge branch 'main' into main
rinOfTheStars 3caf6ef
Merge branch 'main' into main
rinOfTheStars 1593ee4
Update .gitignore
rinOfTheStars 7c80580
Update CONTRIBUTING.mdx
rinOfTheStars 148ff04
Update CONTRIBUTING.mdx
rinOfTheStars 3b58880
Pass cli tool name as param, update CONTRIBUTING.mdx
rinOfTheStars 687bd4c
Merge branch 'main' of https://github.com/rinOfTheStars/cursorless
rinOfTheStars 85a3c3f
Merge branch 'cursorless-dev:main' into main
rinOfTheStars 75605c0
Merge branch 'main' into main
rinOfTheStars 4692560
Update packages/cursorless-org-docs/src/docs/contributing/CONTRIBUTIN…
rinOfTheStars 811221e
Update initLaunchSandbox.ts
rinOfTheStars 7d74c0c
ran prettier
AndreasArvidsson 36ff867
Clean up sandbox script
AndreasArvidsson b4803f4
Merge branch 'main' into main
AndreasArvidsson f679748
Fix build problem with quotes
AndreasArvidsson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2023 - present Microsoft Corporation | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Used in the rare case an extension required for the development environment is not present on the OpenVSX Marketplace (or the VSCode Marketplace, though that is far less likely). | ||
|
||
As such, `.vsix` files in this directory are included in the git repository. **Make sure the extension license permits redistribution before adding it to this directory, and include a copy of the license!** | ||
|
Binary file not shown.
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
55 changes: 55 additions & 0 deletions
55
packages/cursorless-vscode/src/scripts/initLaunchSandboxCodium.ts
This file contains hidden or 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
/** | ||
rinOfTheStars marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
* A clone of initLaunchSandbox.ts for VSCodium setup (as the command codium is used instead of code) | ||
*/ | ||
import { extensionDependencies } from "@cursorless/common"; | ||
import * as cp from "child_process"; | ||
import * as path from "node:path" | ||
|
||
const extraExtensions = ["pokey.command-server"]; | ||
|
||
async function main() { | ||
try { | ||
|
||
const args = [ | ||
"--profile=cursorlessDevelopment", | ||
...[...extensionDependencies, ...extraExtensions].flatMap( | ||
(dependency) => ["--install-extension", dependency], | ||
), | ||
]; | ||
|
||
// remove attempt to get vscode-tree-sitter-query from OpenVSX marketplace | ||
var index: number = args.findIndex((value) => value.includes("vscode-tree-sitter-query")) | ||
args.splice(index, 1) | ||
|
||
// add vscode-tree-sitter-query via .vsix file | ||
const location : string = path.join("..", "..", "data", "vsix", "jrieken.vscode-tree-sitter-query-0.0.6.vsix") | ||
args.push("--profile=cursorlessDevelopment --install-extension ".concat(location)) | ||
|
||
if (process.argv.includes("--force")) { | ||
args.push("--force"); | ||
} | ||
|
||
// Install extension dependencies | ||
const subprocess = cp.spawn("codium", args, { | ||
stdio: "inherit", | ||
shell: true, | ||
}); | ||
|
||
await new Promise<void>((resolve, reject) => { | ||
subprocess.on("error", reject); | ||
subprocess.on("exit", (codium) => { | ||
if (codium === 0) { | ||
resolve(); | ||
} else { | ||
reject(new Error(`Process returned code ${codium}`)); | ||
} | ||
}); | ||
}); | ||
} catch (err) { | ||
console.error("Failed to init launch sandbox"); | ||
console.error(err); | ||
process.exit(1); | ||
} | ||
} | ||
|
||
void main(); |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.