617: Use npm ci instead of install r=matklad a=h-michael fix #422 `npm install` is always recreate `package-lock.json`. So we might use `npm ci` with `install-code` https://docs.npmjs.com/cli/ci.html#description 618: Add install-lsp subcommand r=matklad a=h-michael related https://github.com/rust-analyzer/rust-analyzer/pull/617#issuecomment-456914650 Co-authored-by: Hirokazu Hata <h.hata.ai.t@gmail.com>
This commit is contained in:
commit
bf9cd6ee30
@ -1,8 +1,10 @@
|
|||||||
[alias]
|
[alias]
|
||||||
# Automatically generates the ast and syntax kinds files
|
# Automatically generates the ast and syntax kinds files
|
||||||
gen-syntax = "run --package tools --bin tools -- gen-syntax"
|
gen-syntax = "run --package tools --bin tools -- gen-syntax"
|
||||||
# Extracts the tests from
|
# Extracts the tests from
|
||||||
gen-tests = "run --package tools --bin tools -- gen-tests"
|
gen-tests = "run --package tools --bin tools -- gen-tests"
|
||||||
|
# Installs ra_lsp_server
|
||||||
|
install-lsp = "install --path crates/ra_lsp_server --force"
|
||||||
# Installs the visual studio code extension
|
# Installs the visual studio code extension
|
||||||
install-code = "run --package tools --bin tools -- install-code"
|
install-code = "run --package tools --bin tools -- install-code"
|
||||||
# Formats the full repository or installs the git hook to do it automatically.
|
# Formats the full repository or installs the git hook to do it automatically.
|
||||||
|
@ -29,6 +29,8 @@ $ cargo run --package ra_cli parse < crates/ra_syntax/src/lib.rs
|
|||||||
$ cargo run --package ra_cli symbols < crates/ra_syntax/src/lib.rs
|
$ cargo run --package ra_cli symbols < crates/ra_syntax/src/lib.rs
|
||||||
|
|
||||||
# install the language server
|
# install the language server
|
||||||
|
$ cargo install-lsp
|
||||||
|
or
|
||||||
$ cargo install --path crates/ra_lsp_server
|
$ cargo install --path crates/ra_lsp_server
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -150,10 +150,10 @@ fn existing_tests(dir: &Path, ok: bool) -> Result<HashMap<String, (PathBuf, Test
|
|||||||
fn install_code_extension() -> Result<()> {
|
fn install_code_extension() -> Result<()> {
|
||||||
run("cargo install --path crates/ra_lsp_server --force", ".")?;
|
run("cargo install --path crates/ra_lsp_server --force", ".")?;
|
||||||
if cfg!(windows) {
|
if cfg!(windows) {
|
||||||
run(r"cmd.exe /c npm.cmd install", "./editors/code")?;
|
run(r"cmd.exe /c npm.cmd ci", "./editors/code")?;
|
||||||
run(r"cmd.exe /c npm.cmd run package", "./editors/code")?;
|
run(r"cmd.exe /c npm.cmd run package", "./editors/code")?;
|
||||||
} else {
|
} else {
|
||||||
run(r"npm install", "./editors/code")?;
|
run(r"npm ci", "./editors/code")?;
|
||||||
run(r"npm run package", "./editors/code")?;
|
run(r"npm run package", "./editors/code")?;
|
||||||
}
|
}
|
||||||
if cfg!(windows) {
|
if cfg!(windows) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user