Skip to content
Open
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
12 changes: 2 additions & 10 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@ use_repo(zig_toolchains, "zig_sdk")
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain(
edition = "2021",
versions = ["nightly/2023-12-06"],
extra_target_triples = ["aarch64-unknown-linux-gnu"],
versions = ["nightly/2025-03-01"],
)

use_repo(rust, "rust_toolchains")

register_toolchains("@rust_toolchains//:all")
Expand All @@ -28,7 +27,6 @@ crate = use_extension(
"@rules_rust//crate_universe:extension.bzl",
"crate",
)

crate.from_cargo(
name = "crates",
cargo_lockfile = "Cargo.lock",
Expand All @@ -49,12 +47,10 @@ crate.from_cargo(
],
)
use_repo(crate, "crates")

crate.annotation(
crate = "protoc-gen-prost",
gen_binaries = ["protoc-gen-prost"],
)

crate.annotation(
crate = "protoc-gen-tonic",
gen_binaries = ["protoc-gen-tonic"],
Expand All @@ -63,20 +59,16 @@ crate.annotation(
register_toolchains("//:prost_toolchain")

rules_ts_ext = use_extension("@aspect_rules_ts//ts:extensions.bzl", "ext", dev_dependency = True)

rules_ts_ext.deps(
ts_version_from = "//editors/code:package.json",
ts_integrity = "sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==",
ts_version_from = "//editors/code:package.json",
)

use_repo(rules_ts_ext, "npm_typescript")

npm = use_extension("@aspect_rules_js//npm:extensions.bzl", "npm", dev_dependency = True)

npm.npm_translate_lock(
name = "npm",
pnpm_lock = "//editors/code:pnpm-lock.yaml",
verify_node_modules_ignored = "//:.bazelignore",
)

use_repo(npm, "npm")
52 changes: 26 additions & 26 deletions MODULE.bazel.lock

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

2 changes: 1 addition & 1 deletion crates/starpls/src/document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ impl DefaultFileLoader {
Ok((file_id, contents))
}

fn repo_for_path<'a>(&'a self, path: &'a Path) -> Option<&str> {
fn repo_for_path<'a>(&'a self, path: &'a Path) -> Option<&'a str> {
match path.strip_prefix(&self.external_output_base) {
Ok(stripped) => stripped
.components()
Expand Down
4 changes: 2 additions & 2 deletions crates/starpls_bazel/src/label.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub struct Label<'a> {
}

impl<'a> Label<'a> {
pub fn parse(input: &'a str) -> ParseResult {
pub fn parse(input: &'a str) -> ParseResult<'a> {
Parser {
chars: input.chars(),
pos: 0,
Expand Down Expand Up @@ -134,7 +134,7 @@ struct Parser<'a, 'b> {
label: Label<'a>,
}

impl<'a, 'b> Parser<'a, 'b> {
impl<'a> Parser<'a, '_> {
fn parse(mut self) -> ParseResult<'a> {
match self.parse_full() {
Ok(_) => Ok(self.label),
Expand Down
2 changes: 1 addition & 1 deletion crates/starpls_hir/src/def/codeflow/pretty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ struct CodeFlowGraphPrettyCtx<'a> {
indent: String,
}

impl<'a> CodeFlowGraphPrettyCtx<'a> {
impl CodeFlowGraphPrettyCtx<'_> {
fn pretty_print(mut self) -> String {
wln!(&mut self.result, "def main():");
self.push_indent_level();
Expand Down
2 changes: 1 addition & 1 deletion crates/starpls_hir/src/def/lower.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ struct LoweringContext<'a> {
source_map: ModuleSourceMap,
}

impl<'a> LoweringContext<'a> {
impl LoweringContext<'_> {
fn lower(mut self, syntax: ast::Module) -> (Module, ModuleSourceMap) {
let line_index = line_index(self.db, self.file);
self.module.type_ignore_comment_lines = syntax
Expand Down
2 changes: 1 addition & 1 deletion crates/starpls_hir/src/def/resolver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ impl<'a> Resolver<'a> {
pub(crate) fn resolve_name(
&'a self,
name: &'a Name,
) -> Option<(ExecutionScopeId, impl Iterator<Item = SymbolDef<'a>> + '_)> {
) -> Option<(ExecutionScopeId, impl Iterator<Item = SymbolDef<'a>> + 'a)> {
let mut defs = self
.scopes_with_id()
.filter_map(move |(scope_id, scope)| {
Expand Down
4 changes: 2 additions & 2 deletions crates/starpls_hir/src/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub struct DisplayWithDbWrapper<'a, T: DisplayWithDb + ?Sized> {
alt: bool,
}

impl<'a, T: DisplayWithDb> DisplayWithDbWrapper<'a, T> {
impl<T: DisplayWithDb> DisplayWithDbWrapper<'_, T> {
pub fn alt(self) -> Self {
Self {
db: self.db,
Expand All @@ -64,7 +64,7 @@ impl<'a, T: DisplayWithDb> DisplayWithDbWrapper<'a, T> {
}
}

impl<'a, T: DisplayWithDb> fmt::Display for DisplayWithDbWrapper<'a, T> {
impl<T: DisplayWithDb> fmt::Display for DisplayWithDbWrapper<'_, T> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
if self.alt {
self.item.fmt_alt(self.db, f)
Expand Down
14 changes: 8 additions & 6 deletions crates/starpls_hir/src/typeck.rs
Original file line number Diff line number Diff line change
Expand Up @@ -926,10 +926,9 @@ impl Param {
HirDefParam::KwargsDict { .. }
)
}
ParamInner::IntrinsicParam { parent, index } => matches!(
parent.params(db)[index],
IntrinsicFunctionParam::KwargsDict { .. }
),
ParamInner::IntrinsicParam { parent, index } => {
matches!(parent.params(db)[index], IntrinsicFunctionParam::KwargsDict)
}
ParamInner::BuiltinParam { parent, index } => matches!(
parent.params(db)[index],
BuiltinFunctionParam::KwargsDict { .. }
Expand Down Expand Up @@ -1460,7 +1459,10 @@ pub(crate) struct Rule {
}

impl Rule {
pub(crate) fn attrs<'a>(&'a self, db: &'a dyn Db) -> impl Iterator<Item = (&Name, &Attribute)> {
pub(crate) fn attrs<'a>(
&'a self,
db: &'a dyn Db,
) -> impl Iterator<Item = (&'a Name, &'a Attribute)> {
// This chaining is done to put the `name` attribute first.
let common = common_attributes_query(db);
let mut common_attrs = match self.kind {
Expand Down Expand Up @@ -1777,7 +1779,7 @@ struct TypeRefResolver<'a, 'b> {
errors: Vec<String>,
}

impl<'a, 'b> TypeRefResolver<'a, 'b> {
impl TypeRefResolver<'_, '_> {
fn resolve_type_ref(mut self, type_ref: &TypeRef) -> (Ty, Vec<String>) {
let ty = self.resolve_type_ref_inner(type_ref);
(ty, self.errors)
Expand Down
2 changes: 1 addition & 1 deletion crates/starpls_hir/src/typeck/infer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1662,7 +1662,7 @@ impl TyContext<'_> {
continue;
}
}
FlowNode::Unreachable { .. } => Ty::never(),
FlowNode::Unreachable => Ty::never(),
};

break Some(curr_node_ty);
Expand Down
Loading
Loading