Skip to content

Conversation

@Al-Kindi-0
Copy link
Collaborator

Describe your changes

This PR fixes two bugs related to cross-module imports and comprehension scoping:

  1. Cross-module constant dependencies:
    Constants used in comprehension iterables fail when imported across module boundaries.

  2. Comprehension periodic binding scoping:
    Iterating over a vector containing periodic column references causes the binding to be mistyped as PeriodicColumn, leading to "no entry found for key" panic.

Checklist before requesting a review

  • Repo forked and branch created from next according to naming convention.
  • Commit messages and codestyle follow conventions.
  • Commits are signed.
  • Relevant issues are linked in the PR description.
  • Tests added for new functionality.
  • Documentation/comments updated according to changes.
  • Updated CHANGELOG.md

@Al-Kindi-0 Al-Kindi-0 changed the title Al fix cross module constants and comprehension scoping Fix cross module constants and comprehension scoping Dec 23, 2025
@Soulthym Soulthym self-requested a review January 14, 2026 13:49
Copy link
Collaborator

@Soulthym Soulthym left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @Al-Kindi-0, I left a few comments below about clarifications and a minor nit regarding Boxing RangeExpr. The code itself looks good to me otherwise, great job!

let current_item_node_index = self.get_node_index_or_add(&current_item);
for (referenced_item, ref_type) in self.referenced.clone().iter() {
let referenced_item_node_index = self.get_node_index_or_add(referenced_item);
self.deps_graph.add_edge(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm assuming this is the part of the issue you encountered, we were overriding values without checking for their existence first?

This edit looks correct, just asking to confirm I understand the problem properly

Default,
/// Access binds a sub-slice of a vector
Slice(RangeExpr),
Slice(Box<RangeExpr>),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason to switching to a Box here instead of an owned RangeExpr?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants