Merge pull request #91359 from oxalica/rust-analyzer
rust-analyzer: 2020-06-08 -> 2020-07-13, and fix version display
This commit is contained in:
commit
b0a107335a
1800
pkgs/development/node-packages/node-packages.nix
generated
1800
pkgs/development/node-packages/node-packages.nix
generated
File diff suppressed because it is too large
Load Diff
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
rust-analyzer-unwrapped = callPackage ./generic.nix rec {
|
rust-analyzer-unwrapped = callPackage ./generic.nix rec {
|
||||||
rev = "2020-06-08";
|
rev = "2020-07-13";
|
||||||
version = "unstable-${rev}";
|
version = "unstable-${rev}";
|
||||||
sha256 = "0ywwsb717d1rwcy2yij58sj123pan0fb80sbsiqqprcln0aaspip";
|
sha256 = "1mfhqq3wr2pxyr571xsyhlw4ikiqc0m7w6i31qmj4xq59klc003h";
|
||||||
cargoSha256 = "1c6rmrhx7q4qcanr26yzlwc2rp1hh55m80jn56hy6hfcvwcdaij4";
|
cargoSha256 = "09abiyc4cr47qxmvmc2az0addwxny0wpg9gilg8s8awgx1irxcqc";
|
||||||
};
|
};
|
||||||
|
|
||||||
rust-analyzer = callPackage ./wrapper.nix {} {
|
rust-analyzer = callPackage ./wrapper.nix {} {
|
||||||
|
@ -24,6 +24,8 @@ rustPlatform.buildRustPackage {
|
|||||||
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin
|
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin
|
||||||
[ darwin.apple_sdk.frameworks.CoreServices ];
|
[ darwin.apple_sdk.frameworks.CoreServices ];
|
||||||
|
|
||||||
|
RUST_ANALYZER_REV = rev;
|
||||||
|
|
||||||
inherit doCheck;
|
inherit doCheck;
|
||||||
# Skip tests running `rustup` for `cargo fmt`.
|
# Skip tests running `rustup` for `cargo fmt`.
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
@ -33,6 +35,16 @@ rustPlatform.buildRustPackage {
|
|||||||
export RUST_SRC_PATH=${rustPlatform.rustcSrc}
|
export RUST_SRC_PATH=${rustPlatform.rustcSrc}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# Temporary disabled until #93119 is fixed.
|
||||||
|
doInstallCheck = false;
|
||||||
|
installCheckPhase = ''
|
||||||
|
runHook preInstallCheck
|
||||||
|
versionOutput="$($out/bin/rust-analyzer --version)"
|
||||||
|
echo "'rust-analyzer --version' returns: $versionOutput"
|
||||||
|
[[ "$versionOutput" == "rust-analyzer ${rev}" ]]
|
||||||
|
runHook postInstallCheck
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "An experimental modular compiler frontend for the Rust language";
|
description = "An experimental modular compiler frontend for the Rust language";
|
||||||
homepage = "https://github.com/rust-analyzer/rust-analyzer";
|
homepage = "https://github.com/rust-analyzer/rust-analyzer";
|
||||||
|
@ -49,13 +49,16 @@ sed "s/cargoSha256 = \".*\"/cargoSha256 = \"$cargo_sha256\"/" \
|
|||||||
build_deps="../../../../misc/vscode-extensions/rust-analyzer/build-deps"
|
build_deps="../../../../misc/vscode-extensions/rust-analyzer/build-deps"
|
||||||
# We need devDependencies to build vsix.
|
# We need devDependencies to build vsix.
|
||||||
jq '{ name, version, dependencies: (.dependencies + .devDependencies) }' "$node_src/package.json" \
|
jq '{ name, version, dependencies: (.dependencies + .devDependencies) }' "$node_src/package.json" \
|
||||||
>"$build_deps/package.json"
|
>"$build_deps/package.json.new"
|
||||||
|
|
||||||
# FIXME: Lock the version of @type/vscode, the latest one (1.43.0) will cause build failure.
|
if cmp --quiet "$build_deps"/package.json{.new,}; then
|
||||||
vscode_lock_ver="$(jq '.dependencies."@types/vscode".version' --raw-output "$node_src/package-lock.json")"
|
echo "package.json not changed, skip updating nodePackages"
|
||||||
jq '.dependencies."@types/vscode" = "'$vscode_lock_ver'"' "$build_deps/package.json" >"$build_deps/package.json.new"
|
rm "$build_deps"/package.json.new
|
||||||
mv "$build_deps"/package.json{.new,}
|
else
|
||||||
|
echo "package.json changed, updating nodePackages"
|
||||||
|
mv "$build_deps"/package.json{.new,}
|
||||||
|
|
||||||
pushd "../../../node-packages"
|
pushd "../../../node-packages"
|
||||||
./generate.sh
|
./generate.sh
|
||||||
popd
|
popd
|
||||||
|
fi
|
||||||
|
@ -4,23 +4,23 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"node-fetch": "^2.6.0",
|
"node-fetch": "^2.6.0",
|
||||||
"vscode-languageclient": "7.0.0-next.1",
|
"vscode-languageclient": "7.0.0-next.1",
|
||||||
"@rollup/plugin-commonjs": "^12.0.0",
|
"@rollup/plugin-commonjs": "^13.0.0",
|
||||||
"@rollup/plugin-node-resolve": "^8.0.0",
|
"@rollup/plugin-node-resolve": "^8.1.0",
|
||||||
"@types/glob": "^7.1.1",
|
"@types/glob": "^7.1.2",
|
||||||
"@types/mocha": "^7.0.2",
|
"@types/mocha": "^7.0.2",
|
||||||
"@types/node": "^14.0.5",
|
"@types/node": "~12.7.0",
|
||||||
"@types/node-fetch": "^2.5.7",
|
"@types/node-fetch": "^2.5.7",
|
||||||
"@types/vscode": "1.45.0",
|
"@types/vscode": "^1.44.1",
|
||||||
"@typescript-eslint/eslint-plugin": "^3.0.0",
|
"@typescript-eslint/eslint-plugin": "^3.4.0",
|
||||||
"@typescript-eslint/parser": "^3.0.0",
|
"@typescript-eslint/parser": "^3.4.0",
|
||||||
"eslint": "^7.0.0",
|
"eslint": "^7.3.1",
|
||||||
"glob": "^7.1.6",
|
"glob": "^7.1.6",
|
||||||
"mocha": "^7.1.2",
|
"mocha": "^8.0.1",
|
||||||
"rollup": "^2.10.7",
|
"rollup": "^2.18.1",
|
||||||
"tslib": "^2.0.0",
|
"tslib": "^2.0.0",
|
||||||
"typescript": "^3.9.3",
|
"typescript": "^3.9.5",
|
||||||
"typescript-formatter": "^7.2.2",
|
"typescript-formatter": "^7.2.2",
|
||||||
"vsce": "^1.75.0",
|
"vsce": "^1.75.0",
|
||||||
"vscode-test": "^1.3.0"
|
"vscode-test": "^1.4.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user