Skip to content

[Suggestion]: statically link imports #668

Description

@lumenradley

Which fff frontend(s)?

Node SDK (@ff-labs/fff-node)

What problem are you trying to solve?

Pi derivatives require static resolved imports.

Issue: oh-my-pi validates extension by statically resolving imports. pi-fff top-level imports @ff-labs/fff-node → ffi-rs native optional deps. Validator chokes on optional native package even though runtime install has it.

I needed to patch locally to run

Proposed solution

To solve: Fix: lazy-load @ff-labs/fff-node inside ensureFinder(), not at module top.

I patched:

  • removed static @ff-labs/fff-node import
  • changed to dynamic import:
  const fffNodePackage = "@ff-labs/fff-node";
  const { FileFinder } = await import(fffNodePackage);

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions