Skip to main content

copy_project_tree

Function copy_project_tree 

Source
fn copy_project_tree(
    config: &Config,
    copy: &Path,
    dir: &Path,
    dependencies: &[PathBuf],
    skipped: &[PathBuf],
) -> Result<()>
Expand description

Copies a project directory into a workspace, without Git data, the skipped paths, agent settings and instructions (AGENT_CONFIG), and, at the project root, hidden entries such as .env.

A dependency directory becomes a real directory whose entries link to the project’s entries. A linked dependency directory would resolve outside the workspace, and the compiler then cannot resolve a dependency’s own absolute imports, such as src/lib/X.sol in a pnpm package. A link to a path in the project leads to that path in the workspace, so it stays inside it.