AgentSkillsCN

julia-multipackage

同时处理多个相互关联的 Julia 软件包,统筹管理各软件包之间的依赖关系,并协同测试各项变更。在开发彼此依赖的软件包时,这一技能不可或缺。

SKILL.md
--- frontmatter
name: julia-multipackage
description: Work with multiple inter-related Julia packages simultaneously, managing dependencies across packages and testing changes together. Use this skill when developing packages that depend on each other.

Julia Multi-Package Development

Work with multiple inter-related Julia packages simultaneously, managing dependencies across packages and testing changes together.

When to Use

  • Developing a package alongside its dependencies
  • Working on packages in the same ecosystem
  • Testing changes across package boundaries
  • Coordinating breaking changes across packages

Setting Up a Shared Environment

julia
using Pkg
Pkg.activate("quantum-dev")

Pkg.develop(path="./QuantumInterface.jl")
Pkg.develop(path="./QuantumClifford.jl")
Pkg.develop(path="./QuantumSavory.jl")

Directory Structure

code
workspace/
├── quantum-dev/           # Shared dev environment
│   ├── Project.toml
│   └── Manifest.toml
├── QuantumInterface.jl/
├── QuantumClifford.jl/
└── QuantumSavory.jl/

Testing Changes Across Packages

Test Downstream Package with Local Changes

bash
julia --project=$(mktemp -d) -e '
    using Pkg
    Pkg.develop(path="./QuantumClifford.jl")  # Local changes
    Pkg.add("QuantumSavory")                   # Released version
    Pkg.test("QuantumSavory")
'

Test with All Local Packages

bash
julia --project=quantum-dev -e '
    using Pkg
    Pkg.test("QuantumSavory")  # Uses all dev'd packages
'

Quick Reference

TaskCommand
Develop packagePkg.develop(path="./Pkg.jl")
Exit dev modePkg.free("Pkg")
Check statusPkg.status()
Test packagePkg.test("Pkg")
Create temp envPkg.activate(mktempdir())

Reference

  • Git Workflow - Branching and PR strategies for multi-package changes
  • CI Testing - Buildkite downstream testing configuration

Related Skills

  • julia-package-dev - Single package development
  • julia-github - Git and PR workflows
  • julia-ci-buildkite - Downstream testing in CI