Skip to content

Support Julia language#1519

Merged
j178 merged 5 commits intoj178:masterfrom
fllesser:julia
Feb 1, 2026
Merged

Support Julia language#1519
j178 merged 5 commits intoj178:masterfrom
fllesser:julia

Conversation

@fllesser
Copy link
Contributor

@fllesser fllesser commented Feb 1, 2026

resolve #1446

@fllesser fllesser marked this pull request as draft February 1, 2026 04:24
@codecov
Copy link

codecov bot commented Feb 1, 2026

Codecov Report

❌ Patch coverage is 98.21429% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.02%. Comparing base (1808e0f) to head (6192892).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
crates/prek/src/languages/julia.rs 98.13% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1519      +/-   ##
==========================================
+ Coverage   91.98%   92.02%   +0.03%     
==========================================
  Files          88       89       +1     
  Lines       18374    18500     +126     
==========================================
+ Hits        16901    17024     +123     
- Misses       1473     1476       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

update docs and ci

tweak

tweak

Addd lang-julia profile

order
@prek-ci-bot
Copy link

prek-ci-bot bot commented Feb 1, 2026

📦 Cargo Bloat Comparison

Binary size change: +0.00% (22.6 MiB → 22.6 MiB)

Expand for cargo-bloat output

Head Branch Results

 File  .text    Size           Crate Name
 0.3%   0.8% 77.0KiB           prek? <prek::cli::Command as clap_builder::derive::Subcommand>::augment_subcommands
 0.3%   0.8% 70.3KiB            prek prek::languages::<impl prek::config::Language>::run::{{closure}}::{{closure}}
 0.3%   0.7% 65.1KiB            prek prek::languages::<impl prek::config::Language>::run::{{closure}}::{{closure}}
 0.2%   0.5% 50.8KiB            prek prek::languages::<impl prek::config::Language>::install::{{closure}}
 0.2%   0.5% 43.9KiB            prek prek::run::{{closure}}
 0.2%   0.5% 43.4KiB            prek prek::identify::by_extension::{{closure}}
 0.2%   0.4% 41.5KiB            prek prek::cli::run::run::run::{{closure}}
 0.1%   0.3% 32.0KiB           prek? <prek::cli::RunArgs as clap_builder::derive::Args>::augment_args
 0.1%   0.2% 22.1KiB            prek prek::hooks::meta_hooks::MetaHooks::run::{{closure}}
 0.1%   0.2% 22.1KiB            prek prek::hooks::meta_hooks::MetaHooks::run::{{closure}}
 0.1%   0.2% 21.2KiB    clap_builder clap_builder::parser::parser::Parser::get_matches_with
 0.1%   0.2% 20.0KiB cargo_metadata? <cargo_metadata::_::<impl serde_core::de::Deserialize for cargo_metadata::Package>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map
 0.1%   0.2% 19.6KiB            prek prek::archive::unzip::{{closure}}
 0.1%   0.2% 19.5KiB            prek prek::cli::run::filter::collect_files_from_args::{{closure}}
 0.1%   0.2% 19.3KiB             std core::ptr::drop_in_place<prek::languages::<impl prek::config::Language>::install::{{closure}}>
 0.1%   0.2% 19.3KiB            prek <prek::languages::ruby::ruby::Ruby as prek::languages::LanguageImpl>::install::{{closure}}
 0.1%   0.2% 19.1KiB            prek prek::cli::run::filter::collect_files_from_args::{{closure}}
 0.1%   0.2% 18.6KiB            ring ring_core_0_17_14__x25519_ge_frombytes_vartime
 0.1%   0.2% 18.1KiB       [Unknown] fe_loose_invert
 0.1%   0.2% 18.1KiB      hyper_util hyper_util::client::legacy::client::Client<C,B>::send_request::{{closure}}
36.8%  91.3%  8.3MiB                 And 20083 smaller methods. Use -n N to show more.
40.3% 100.0%  9.1MiB                 .text section size, the file size is 22.6MiB

Base Branch Results

 File  .text    Size           Crate Name
 0.3%   0.8% 72.1KiB           prek? <prek::cli::Command as clap_builder::derive::Subcommand>::augment_subcommands
 0.3%   0.7% 66.3KiB            prek prek::languages::<impl prek::config::Language>::run::{{closure}}::{{closure}}
 0.3%   0.7% 61.2KiB            prek prek::languages::<impl prek::config::Language>::run::{{closure}}::{{closure}}
 0.2%   0.5% 46.0KiB            prek prek::languages::<impl prek::config::Language>::install::{{closure}}
 0.2%   0.5% 43.4KiB            prek prek::identify::by_extension::{{closure}}
 0.2%   0.5% 43.2KiB            prek prek::run::{{closure}}
 0.2%   0.4% 41.7KiB            prek prek::cli::run::run::run::{{closure}}
 0.1%   0.3% 31.8KiB           prek? <prek::cli::RunArgs as clap_builder::derive::Args>::augment_args
 0.1%   0.2% 22.1KiB            prek prek::hooks::meta_hooks::MetaHooks::run::{{closure}}
 0.1%   0.2% 22.1KiB            prek prek::hooks::meta_hooks::MetaHooks::run::{{closure}}
 0.1%   0.2% 21.2KiB    clap_builder clap_builder::parser::parser::Parser::get_matches_with
 0.1%   0.2% 20.6KiB            prek prek::archive::unzip::{{closure}}
 0.1%   0.2% 20.0KiB cargo_metadata? <cargo_metadata::_::<impl serde_core::de::Deserialize for cargo_metadata::Package>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map
 0.1%   0.2% 19.5KiB            prek prek::cli::run::filter::collect_files_from_args::{{closure}}
 0.1%   0.2% 19.3KiB            prek <prek::languages::ruby::ruby::Ruby as prek::languages::LanguageImpl>::install::{{closure}}
 0.1%   0.2% 19.1KiB            prek prek::cli::run::filter::collect_files_from_args::{{closure}}
 0.1%   0.2% 19.0KiB             std core::ptr::drop_in_place<prek::languages::<impl prek::config::Language>::install::{{closure}}>
 0.1%   0.2% 18.6KiB            ring ring_core_0_17_14__x25519_ge_frombytes_vartime
 0.1%   0.2% 18.1KiB       [Unknown] fe_loose_invert
 0.1%   0.2% 18.1KiB      hyper_util hyper_util::client::legacy::client::Client<C,B>::send_request::{{closure}}
36.8%  91.4%  8.3MiB                 And 20038 smaller methods. Use -n N to show more.
40.3% 100.0%  9.1MiB                 .text section size, the file size is 22.6MiB

@fllesser
Copy link
Contributor Author

fllesser commented Feb 1, 2026

I haven't added the remote hook test yet. Once you've forked the repository (https://github.com/fllesser/julia-hooks), I will push the test cases @j178

@j178
Copy link
Owner

j178 commented Feb 1, 2026

Forked https://github.com/prek-test-repos/julia-hooks! Also invited you as a member to prek-test-repos.

Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
@fllesser fllesser marked this pull request as ready for review February 1, 2026 06:13
@j178 j178 requested a review from Copilot February 1, 2026 06:15
@j178 j178 added the enhancement New feature or request label Feb 1, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds support for the Julia language to prek, implementing a new language handler that allows hooks written in Julia to be installed and executed. The implementation follows established patterns from other language implementations like Haskell and Lua.

Changes:

  • Added Julia language support with isolated environment management using Julia's Pkg package manager
  • Integrated Julia throughout the codebase including schema, configuration, documentation, tests, and CI/CD
  • Fixed alphabetical ordering of language enums (moved Pygrep before Swift)

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
prek.schema.json Added Julia to language schema and default_language_version in alphabetical order
docs/languages.md Added Julia documentation describing installation, features, and limitations
docs/cli.md Updated CLI documentation to include Julia in language list
crates/prek/src/languages/julia.rs New Julia language implementation with install, health check, and run methods
crates/prek/src/languages/mod.rs Integrated Julia language handler into the languages module
crates/prek/src/config.rs Added Julia to Language enum with proper alphabetical ordering
crates/prek/tests/languages/julia.rs Comprehensive test suite for Julia hooks covering local, remote, script file, and dependency scenarios
crates/prek/tests/languages/main.rs Added Julia test module
.github/workflows/ci.yml Added Julia installation step and version configuration for CI
.config/nextest.toml Added Julia test profile configuration

@j178
Copy link
Owner

j178 commented Feb 1, 2026

Thanks!

@j178 j178 merged commit 0a4be22 into j178:master Feb 1, 2026
54 checks passed
@fllesser fllesser deleted the julia branch February 1, 2026 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support julia language

2 participants