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

[move-ide] Move analyzer versioning #17929

Merged
merged 3 commits into from
May 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ jobs:
shell: bash
run: |
[ -f ~/.cargo/env ] && source ~/.cargo/env ; cargo build --release && cargo build --profile=dev --bin sui
cd external-crates/move && cargo build -p move-analyzer --release

- name: Rename binaries for ${{ matrix.os }}
if: ${{ env.s3_archive_exist == '' }}
Expand All @@ -156,7 +155,6 @@ jobs:
done

mv ./target/debug/sui${{ env.extention }} ${{ env.TMP_BUILD_DIR }}/sui-debug${{ env.extention }}
mv ./external-crates/move/target/release/move-analyzer${{ env.extention }} ${{ env.TMP_BUILD_DIR }}/move-analyzer${{ env.extention }}
tar -cvzf ./tmp/sui-${{ env.sui_tag }}-${{ env.os_type }}.tgz -C ${{ env.TMP_BUILD_DIR }} .
[[ ${{ env.sui_tag }} == *"testnet"* ]] && aws s3 cp ./tmp/sui-${{ env.sui_tag }}-${{ env.os_type }}.tgz s3://sui-releases/releases/sui-${{ env.sui_tag }}-${{ env.os_type }}.tgz || true

Expand Down
131 changes: 98 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ members = [
"crates/sui-metric-checker",
"crates/sui-move",
"crates/sui-move-build",
"crates/sui-move-lsp",
"crates/sui-network",
"crates/sui-node",
"crates/sui-open-rpc",
Expand Down Expand Up @@ -563,6 +564,7 @@ move-stackless-bytecode = { path = "external-crates/move/crates/move-stackless-b
move-symbol-pool = { path = "external-crates/move/crates/move-symbol-pool" }
move-abstract-interpreter = { path = "external-crates/move/crates/move-abstract-interpreter" }
move-abstract-stack = { path = "external-crates/move/crates/move-abstract-stack" }
move-analyzer = { path = "external-crates/move/crates/move-analyzer" }

fastcrypto = { git = "https://github.com/MystenLabs/fastcrypto", rev = "4988a4744fcaf8bc7f60bf660d9a223ed0f54cc6" }
fastcrypto-tbls = { git = "https://github.com/MystenLabs/fastcrypto", rev = "4988a4744fcaf8bc7f60bf660d9a223ed0f54cc6" }
Expand Down Expand Up @@ -621,6 +623,7 @@ sui-macros = { path = "crates/sui-macros" }
sui-metric-checker = { path = "crates/sui-metric-checker" }
sui-move = { path = "crates/sui-move" }
sui-move-build = { path = "crates/sui-move-build" }
sui-move-lsp = { path = "crates/sui-move-lsp" }
sui-network = { path = "crates/sui-network" }
sui-node = { path = "crates/sui-node" }
sui-open-rpc = { path = "crates/sui-open-rpc" }
Expand Down
3 changes: 2 additions & 1 deletion binary-build-list.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"sui-data-ingestion",
"sui-bridge",
"sui-bridge-cli",
"sui-graphql-rpc"
"sui-graphql-rpc",
"move-analyzer"
],
"internal_binaries": [
"stress",
Expand Down
15 changes: 15 additions & 0 deletions crates/sui-move-lsp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[package]
name = "sui-move-lsp"
version.workspace = true
authors = ["Mysten Labs <[email protected]>"]
license = "Apache-2.0"
publish = false
edition = "2021"

[dependencies]
clap = { version = "4.1.4", features = ["derive"] }
tokio = { workspace = true, features = ["full"] }

bin-version.workspace = true
move-analyzer.workspace = true

22 changes: 22 additions & 0 deletions crates/sui-move-lsp/src/bin/move-analyzer.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright (c) Mysten Labs, Inc.
// SPDX-License-Identifier: Apache-2.0

use clap::*;
use move_analyzer::analyzer;

// Define the `GIT_REVISION` and `VERSION` consts
bin_version::bin_version!();

#[derive(Parser)]
#[clap(
name = env!("CARGO_BIN_NAME"),
rename_all = "kebab-case",
author,
version = VERSION,
)]
struct App {}

fn main() {
App::parse();
analyzer::run();
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ This can be done in two steps:
as prerequisites for Sui installation - for Linux, macOS and Windows these prerequisites and
their installation instructions can be found
[here](https://docs.sui.io/guides/developer/getting-started/sui-install#additional-prerequisites-by-operating-system)
2. Invoke `cargo install --git https://github.com/MystenLabs/sui move-analyzer` to install the
2. Invoke `cargo install --git https://github.com/MystenLabs/sui sui-move-lsp` to install the
`move-analyzer` language server in your Cargo binary directory, which is typically located
in the `~/.cargo/bin` (macOS/Linux) or `C:\Users\USER\.cargo\bin` (Windows) directory.
3. Copy the move-analyzer binary to `~/.sui/bin` (macOS/Linux) or `C:\Users\USER\.sui\bin`
Expand Down
Loading
Loading