Skip to content

Dependencies from a detected nested test project are not loadable #97

Description

@Krastanov-agent

Problem

A test item belongs to a package but uses a separate project in a nested test directory:

PackageA/
  Project.toml
  test/Project.toml
  test/special/Project.toml
  test/special/Manifest.toml
  test/special/test_aqua.jl

The nested manifest path-develops PackageA. JuliaWorkspaces detects test/special as the project for the test item. TestItemControllers then activates a temporary environment based on the package test/Project.toml. Dependencies declared only in test/special/Project.toml are not loadable.

For example, a test item containing using Aqua fails with:

ArgumentError: Package Aqua not found in current path.

This reproduces with TestItemControllers 1.11.0.

Expected behavior

After the nested project and manifest are selected, their direct dependencies should be available to the test item.

Current workaround

QuantumClifford PR #820 adds the nested project to JULIA_LOAD_PATH for each test process:

https://github.com/QuantumSavory/QuantumClifford.jl/blob/f74d0b7cc6b46b757733728b462cad57b1ec5e17/.buildkite/pipeline.yml#L29-L37

Suggested solution

When projectUri differs from packageUri, preserve the selected project dependencies when creating the temporary test environment. This could merge the selected project dependencies into the temporary project or otherwise keep the selected project loadable. Callers should not need to overwrite JULIA_LOAD_PATH.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions