From dea15e4afdb68321ffad2af48ae29b448029f661 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas Date: Mon, 4 Aug 2025 08:59:55 -0400 Subject: [PATCH 1/2] [ci skip] Ignore crate-ci/typos patch and minor updates in dependabot This prevents dependabot from creating PRs for every minor and patch version update of the typos tool, reducing noise in the repository. --- .github/dependabot.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 700707c..ec3b005 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,3 +5,6 @@ updates: directory: "/" # Location of package manifests schedule: interval: "weekly" + ignore: + - dependency-name: "crate-ci/typos" + update-types: ["version-update:semver-patch", "version-update:semver-minor"] From 434b7e63ba26cebfa49675ee2db6d056c1df3f36 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas Date: Mon, 29 Dec 2025 04:45:46 -0500 Subject: [PATCH 2/2] Improve explicit imports hygiene MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix implicit imports: Add explicit imports for Cassette and DiffRules modules - Remove stale imports: Remove unused CodeInfo, SlotNumber, ReturnNode from Core - Add ExplicitImports.jl test to CI to prevent regression 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- Project.toml | 4 +++- src/FunctionProperties.jl | 5 +++-- test/explicit_imports.jl | 8 ++++++++ test/runtests.jl | 7 ++++++- 4 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 test/explicit_imports.jl diff --git a/Project.toml b/Project.toml index e7f3b82..04d00de 100644 --- a/Project.toml +++ b/Project.toml @@ -10,14 +10,16 @@ DiffRules = "b552c78f-8df3-52c6-915a-8e097449b14b" [compat] Cassette = "0.3.6" DiffRules = "1.15" +ExplicitImports = "1.9" julia = "1.10" [extras] ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66" +ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" Lux = "b2108857-7c20-44ae-9111-449ecde12c47" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" SafeTestsets = "1bc83da4-3b8d-516f-aca4-4fe02f6d838f" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Test", "SafeTestsets", "ComponentArrays", "Lux", "Random"] +test = ["Test", "SafeTestsets", "ComponentArrays", "Lux", "Random", "ExplicitImports"] diff --git a/src/FunctionProperties.jl b/src/FunctionProperties.jl index 34768ca..1b1c237 100644 --- a/src/FunctionProperties.jl +++ b/src/FunctionProperties.jl @@ -1,7 +1,8 @@ module FunctionProperties -using Cassette, DiffRules -using Core: CodeInfo, SlotNumber, SSAValue, ReturnNode, GotoIfNot +using Cassette: Cassette +using DiffRules: DiffRules +using Core: SSAValue, GotoIfNot const printbranch = false diff --git a/test/explicit_imports.jl b/test/explicit_imports.jl new file mode 100644 index 0000000..0a03fa7 --- /dev/null +++ b/test/explicit_imports.jl @@ -0,0 +1,8 @@ +using ExplicitImports +using FunctionProperties +using Test + +@testset "ExplicitImports" begin + @test check_no_implicit_imports(FunctionProperties) === nothing + @test check_no_stale_explicit_imports(FunctionProperties) === nothing +end diff --git a/test/runtests.jl b/test/runtests.jl index fdea993..af73ce3 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,4 +1,9 @@ -using FunctionProperties, Test +using FunctionProperties +using Test + +@testset "Explicit Imports" begin + include("explicit_imports.jl") +end @test hasbranching(1, 2) do x, y (x < 0 ? -x : x) + exp(y)