Julia Package Development
Use this skill for package-oriented Julia work: bootstrapping a package, local environments, multi-package workspaces, extensions, and Pkg apps.
Core Workflow
using Pkg
Pkg.activate("./dev")
Pkg.develop(path="./MyPackage.jl")
using MyPackage
Prefer environments over mutating the global default environment.
- Set
ENV["JULIA_PKG_SERVER_REGISTRY_PREFERENCE"] = "eager"beforePkgoperations in local or CI sessions in this workspace. Use this by default when recent registrations may matter; otherwise just-registered packages can appear to be missing and create false resolution failures. - Prefer
Pkg.test(...)over directly executingtest/runtests.jlwhen validating a package checkout. Treat directtest/runtests.jlexecution as a runner-debugging path, not the default validation path. - Never read or edit
Manifest.tomldirectly. Treat every manifest as generated state owned byPkg. - If dependency resolution behaves impossibly, run
Pkg.update()andPkg.resolve()in the relevant environment first. If recurrent issues remain, delete the relevantManifest.tomlfile and regenerate it withPkg.instantiate(). - Read
Project.tomlwhen needed, but change dependencies and compat entries only throughPkgAPIs such asPkg.add,Pkg.develop,Pkg.rm,Pkg.free, andPkg.compat.
Multi-Repo Rule
- In a workspace with sibling repos, if compat or registry resolution blocks
testing, first
Pkg.develop(path=...)the local dependency checkouts already present, preferably on their currentmaster/main. - Do this before chasing registry lag or editing compat blindly.
Pick a Topic
- Pkg commands and dependency management:
references/pkg-commands.md - Interactive debugging and exploration:
references/debugging.md - Multi-package development and release flow:
references/multipackage-git-workflow.md - Package extension patterns:
references/extension-patterns.md - Testing and documenting extensions:
references/extension-testing.md - User-facing extension error hints:
references/weakdephelpers.md - Pkg app scaffolding and CLI patterns:
references/pkg-app-patterns.md
Common Tasks
Shared Workspace
using Pkg
Pkg.activate("quantum-dev")
Pkg.develop(path="./QuantumInterface.jl")
Pkg.develop(path="./QuantumSavory.jl")
Notes
- Use
julia-testsfor test execution and organization. - Use
julia-docsfor docs setup and doctests. - Use
julia-comoniconwhen you need a richer CLI than Pkg apps provide.
Related Skills
julia-testsjulia-docsjulia-scratch
Source: krastanov/juliallmagentskills — distributed by TomeVault.