julia/README.md
This package provides Julia support for Dependabot.
It handles updates for packages managed through Julia's package manager and parses Project.toml/Manifest.toml files.
Project.toml and Manifest.toml filesThis implementation is designed to align with CompatHelper.jl, the main tool used for automated dependency updates by the Julia ecosystem (at the time of writing).
There are some notable differences:
Project.toml and tries to update any Manifest.toml files, whereas CompatHelper.jl only updates Project.toml.Also, a goal of this is to integrate into github's CVE database and alerting systems for vulnerabilities in Julia packages.
For more information about Julia package management, see:
When manifest updates fail (common in workspace configurations with conflicting sibling dependencies), Dependabot will:
Project.toml file with the new dependency requirementsProject.toml was updatedThis ensures users understand when lockfiles couldn't be updated and why, while still providing the compatibility range update in the project file.
Project.toml / JuliaProject.toml - Main project filesManifest.toml / JuliaManifest.toml - Lock filesManifest-vX.Y.toml / JuliaManifest-vX.Y.toml - Version-specific lock filesJulia workspaces are fully supported. In workspace configurations:
Project.toml file in a subdirectoryManifest.toml) shared by all workspace packagesProject.toml and the shared manifestImportant: There is a terminology difference between Julia and Dependabot ecosystems:
| File | Julia Terminology | Dependabot Terminology |
|---|---|---|
Project.toml | "Project file" | "Manifest file" / "Package manifest" / "Dependency manifest" |
Manifest.toml | "Manifest file" | "Lockfile" |
Implications for development:
parse_project, parse_manifest)The Julia ecosystem implementation follows a hybrid approach where the Ruby infrastructure handles Dependabot's core workflow, while the complex Julia-specific logic is implemented in Julia itself via the DependabotHelper.jl package.
┌─────────────────┐ JSON-RPC ┌─────────────────────┐
│ │ ─────────────► │ │
│ Ruby Classes │ │ DependabotHelper.jl │
│ (Dependabot) │ ◄───────────── │ (Julia Package) │
│ │ │ │
└─────────────────┘ └─────────────────────┘
Why this approach?
Pkg.jl for accurate dependency resolution and version constraints| Ruby Class/Method | Julia Function | Purpose |
|---|---|---|
| FileParser | ||
FileParser#project_file_dependencies | parse_project(project_path, manifest_path) | Parse Project.toml and extract dependencies with resolved versions |
| RegistryClient | ||
RegistryClient#fetch_latest_version | get_latest_version(package_name, package_uuid) | Get latest non-yanked version from Julia registry (requires UUID) |
RegistryClient#fetch_package_metadata | get_package_metadata(package_name, package_uuid) | Get comprehensive package information (requires UUID) |
RegistryClient#parse_project | parse_project(project_path, manifest_path) | Project parsing with metadata |
RegistryClient#parse_manifest | parse_manifest(manifest_path) | Parse Manifest.toml files |
RegistryClient#get_version_from_manifest | get_version_from_manifest(manifest_path, name, uuid) | Extract specific package version from manifest (requires UUID) |
| FileUpdater | ||
FileUpdater#updated_dependency_files | update_manifest(project_path, updates) | Update Project.toml and Manifest.toml with comprehensive change tracking and error handling |
| UpdateChecker | ||
LatestVersionFinder#latest_version | get_latest_version(package_name, package_uuid) | Find latest available non-yanked version (requires UUID) |
| MetadataFinder | ||
MetadataFinder#source_url | find_package_source_url(package_name, package_uuid) | Extract repository URL from package metadata (requires UUID) |
| PackageDetailsFetcher | ||
PackageDetailsFetcher#fetch_release_dates | get_version_release_date(package_name, version, package_uuid) | Get registration date for a version (General registry only) |
PackageDetailsFetcher#fetch_release_dates | batch_get_version_release_dates(packages_versions) | Batch fetch registration dates (General registry only) |
Ruby classes communicate with Julia functions via:
UUID Enforcement: All package lookup functions require both package name and UUID for precise identification. This eliminates ambiguity when multiple packages have similar names and ensures registry lookups are deterministic.
Yanked Version Exclusion: The get_latest_version function automatically excludes yanked versions from consideration by checking the yanked flag in the registry's version metadata, ensuring only stable, non-retracted versions are returned.
Error Handling: When all versions of a package are yanked, the function returns a descriptive error message rather than failing silently.
Release Date Tracking: For packages in the General registry, release dates are fetched from the GeneralMetadata.jl API. This enables Dependabot's cooldown period feature, which allows users to wait a specified number of days after a version is released before updating. Packages in other registries will not have release date information available, and cooldown periods will not apply to them.
julia/helpers/DependabotHelper.jl/
├── src/
│ ├── DependabotHelper.jl # Main module
│ ├── functions.jl # Core dependency management functions
│ └── precompile.jl # Precompilation setup
├── test/ # Test package for precompilation
└── run_dependabot_helper.jl # Entry point script
The run_dependabot_helper.jl script acts as the JSON-RPC server, receiving function calls from Ruby and dispatching them to the appropriate Julia functions.
For integration testing against real Julia package structures, use the Julia-DependabotTest repository, which contains various package configurations to validate Dependabot's behavior.
The Julia-DependabotTest repository includes a workflow to test custom dependabot-core branches or PRs:
ib/julia_workspaces_fixes) or PR number (e.g., 13889)results.yaml, dependabot.log)# From the dependabot-core repository root
docker build --no-cache -f Dockerfile.updater-core -t ghcr.io/dependabot/dependabot-updater-core .
docker build --no-cache -f julia/Dockerfile -t ghcr.io/dependabot/dependabot-updater-julia .
# Run against a test configuration
script/dependabot update -f /path/to/Julia-DependabotTest/dependabot-test-workspace.yaml -o results.yaml