Skip to content

imports don't seem to work. #3

Closed

Description

@Keshi

imports don't seem to work
Image

Image

Activity

  1. farhan-syah commented on Jul 15, 2026

    @farhan-syah
    Member

    Alright, thank your for creating this issue, I'll take a look.

  2. farhan-syah commented on Jul 15, 2026

    @farhan-syah
    Member

    @Keshi — this is fixed and released in v0.1.2.

    What was happening: Venus compiles a notebook's imports and type definitions into a shared venus_universe crate, and each cell is compiled as its own crate that links the universe and glob-imports it (use venus_universe::*;). Your use statements were being emitted into that crate as private use items, so the imported names (like DataFrame) were never re-exported and stayed invisible to the cells — hence not found in this scope. It only affected the interactive paths (venus run, venus serve); the standalone venus build inlines imports, so it was unaffected.

    The fix (#4): definition-cell use statements are now re-exported as pub use, and top-level definitions (structs, enums, helper fns, etc.) are promoted to pub, so everything a notebook declares is visible to its cells. Your original example now compiles and runs:

    use plotlars::polars::prelude::DataFrame;
    
    #[venus::cell]
    pub fn new_cell_1() -> DataFrame { /* ... */ }

    Grab v0.1.2 and let us know if you hit anything else. 🙏

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions