Skip to content
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
18 changes: 9 additions & 9 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ resolver = "2"
ra_ap_proc_macro_api = { path = "crates/third_party/ra_ap_proc_macro_api" }

[workspace.package]
version = "0.3.0-rc14"
version = "0.3.0-rc15"
description = "The Incan programming language compiler"
edition = "2024"
rust-version = "1.92"
Expand Down
18 changes: 9 additions & 9 deletions src/backend/ir/codegen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -904,14 +904,15 @@ impl<'a> IrCodegen<'a> {

// Generate module files by path
let mut lowered_modules = Vec::new();
for (name, ast, _) in &self.dependency_modules {
// Find matching path by comparing joined segments with module name
// Module name is path segments joined with "_" (e.g., "db_models")
for path in module_paths {
let path_name = path.join("_");
if path_name != *name {
continue;
}
for (name, ast, stored_path_segments) in &self.dependency_modules {
let matching_path = if let Some(stored_path_segments) = stored_path_segments {
module_paths.iter().find(|path| *path == stored_path_segments)
} else {
// Legacy callers may still register only a flat module name. Prefer explicit path segments when they
// exist because distinct paths such as `a_b` and `a/b` share the same underscore-joined fallback.
module_paths.iter().find(|path| path.join("_") == *name)
};
if let Some(path) = matching_path {
let module_type_info = {
use crate::frontend::typechecker::TypeChecker;
let mut tc = TypeChecker::new();
Expand All @@ -931,7 +932,6 @@ impl<'a> IrCodegen<'a> {
// newtypes (e.g., stdlib wrapper types like std.web.request.Query/Path).
super::trait_bound_inference::infer_trait_bounds(&mut ir);
lowered_modules.push((path.clone(), ir));
break;
}
}
for idx in 0..lowered_modules.len() {
Expand Down
3 changes: 2 additions & 1 deletion src/backend/ir/codegen/dependency_metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ fn has_web_route_passthrough_decorator(
})
}

/// Collect dependency-module declarations that are referenced through imports.
/// Collect dependency-module declarations that must remain reachable from externally visible roots such as imports,
/// ambient logging, and web route registration.
pub(super) fn collect_externally_reachable_items_by_module(
main: &Program,
dependency_modules: &[(&str, &Program, Option<Vec<String>>)],
Expand Down
2 changes: 1 addition & 1 deletion src/backend/ir/emit/expressions/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ impl<'a> IrEmitter<'a> {
/// Return the explicitly registered compatibility borrow policy for a metadata-free external method argument.
///
/// Signature metadata remains the source of truth for Rust-boundary borrowing. These policies are only for
/// default-build interop surfaces that v0.3 already emits without rust-inspect metadata.
/// default-build interop surfaces emitted without rust-inspect metadata.
fn metadata_free_method_arg_borrow_policy(
receiver: &TypedExpr,
method: &str,
Expand Down
5 changes: 5 additions & 0 deletions src/backend/ir/lower/expr/calls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1661,6 +1661,11 @@ impl AstLowering {
if let ast::Expr::Ident(name) = &f.node
&& let Some(builtin) = BuiltinFn::from_name(name)
&& imported_callee_path.is_none()
&& self
.type_info
.as_ref()
.is_none_or(|info| info.ident_kind(f.span).is_none())
&& self.callable_signature_for_call_span(call_span).is_none()
&& !matches!(func.ty, IrType::Function { .. })
{
let args_ir = self.lower_call_args(args)?.into_iter().map(|a| a.expr).collect();
Expand Down
2 changes: 1 addition & 1 deletion src/backend/ir/reference_shape.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Predicates for IR expressions that already emit Rust reference-shaped values.
//!
//! Ownership and coercion planning may still see these expressions as ordinary Incan surface types. Keep the
//! reference-shape predicate here so conversions, method emission, and future argument planners do not drift.
//! reference-shape predicate here so conversions, method emission, and argument planning do not drift.

use super::expr::{IrExpr, IrExprKind};
use super::types::IrType;
Expand Down
Loading
Loading