diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac2571c6..dc6ecd08 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ concurrency: jobs: check: name: Check - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 with: @@ -53,7 +53,7 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-latest", "windows-latest", "macOS-latest"] + os: ["ubuntu-22.04", "windows-latest", "macOS-latest"] include: - RUSTFLAGS: "-Dwarnings" CARGO_INCREMENTAL: 1 @@ -74,7 +74,7 @@ jobs: submodules: true - name: Install packages - if: matrix.os == 'ubuntu-latest' + if: matrix.os == 'ubuntu-22.04' run: | sudo apt-get update sudo apt-get install libasound2-dev libudev-dev @@ -126,7 +126,7 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-latest", "windows-latest", "macOS-latest"] + os: ["ubuntu-22.04", "windows-latest", "macOS-latest"] include: - RUSTFLAGS: "-Dwarnings" CARGO_INCREMENTAL: 1 @@ -167,7 +167,7 @@ jobs: test-mdbook: name: Test mdbook - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: check steps: - uses: actions/checkout@v4 @@ -220,7 +220,7 @@ jobs: strategy: fail-fast: false matrix: - os: ["ubuntu-latest", "windows-latest", "macOS-latest"] + os: ["ubuntu-22.04", "windows-latest", "macOS-latest"] include: - RUSTFLAGS: "-Dwarnings" - os: "windows-latest" @@ -288,7 +288,7 @@ jobs: style: name: Check Style - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: check steps: - uses: actions/checkout@v4 diff --git a/crates/mun_language_server/src/completion/unqualified_path.rs b/crates/mun_language_server/src/completion/unqualified_path.rs deleted file mode 100644 index 39fa9490..00000000 --- a/crates/mun_language_server/src/completion/unqualified_path.rs +++ /dev/null @@ -1,62 +0,0 @@ -use super::{CompletionContext, Completions}; - -/// Adds completions to `result` for unqualified path. Unqualified paths are -/// simple names which do not refer to anything outside of the current scope: -/// local function names, variables, etc. E.g.: -/// ```mun -/// fn foo() { -/// let foo_bar = 3; -/// foo_$0 -/// } -/// ``` -pub(super) fn complete_unqualified_path(result: &mut Completions, ctx: &CompletionContext<'_>) { - - // Only complete trivial paths (e.g. foo, not ::foo) - if !ctx.is_trivial_path { - return; - } - - // Iterate over all items in the current scope and add completions for them - ctx.scope.visit_all_names(&mut |name, def| { - result.add_resolution(ctx, name.to_string(), &def); - }); -} - -#[cfg(test)] -mod tests { - use crate::completion::{test_utils::completion_string, CompletionKind}; - - #[test] - fn test_local_scope() { - insta::assert_snapshot!(completion_string( - r#" - fn foo() { - let bar = 0; - let foo_bar = 0; - f$0 - } - "#, - Some(CompletionKind::Reference) - )); - } - - #[test] - fn test_associate_function() { - insta::assert_snapshot!(completion_string( - r#" - struct Foo; - - impl Foo { - fn new() -> Self { - Self - } - } - - fn foo() { - let bar = Foo::$0; - } - "#, - Some(CompletionKind::Reference) - )); - } -} diff --git a/scripts/install-llvm.sh b/scripts/install-llvm.sh index 3b23ef56..3e7b453b 100755 --- a/scripts/install-llvm.sh +++ b/scripts/install-llvm.sh @@ -25,8 +25,6 @@ case "$DIST_VERSION" in Ubuntu_20.04 ) REPO_NAME="deb http://apt.llvm.org/focal/ llvm-toolchain-focal-$LLVM_VERSION main" ;; Ubuntu_22.04 ) REPO_NAME="deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-$LLVM_VERSION main" ;; Ubuntu_22.10 ) REPO_NAME="deb http://apt.llvm.org/kinetic/ llvm-toolchain-kinetic-$LLVM_VERSION main" ;; - Ubuntu_24.04 ) REPO_NAME="deb http://apt.llvm.org/noble/ llvm-toolchain-noble-$LLVM_VERSION main" ;; - Ubuntu_24.10 ) REPO_NAME="deb http://apt.llvm.org/oracular/ llvm-toolchain-oracular-$LLVM_VERSION main" ;; * ) echo "Distribution '$DISTRO' in version '$VERSION' is not supported by this script (${DIST_VERSION})." exit 2