From 6c5a073b99287ec1ff7c9d26089feac926bb23c4 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge <5619885+DilumAluthge@users.noreply.github.com> Date: Sat, 18 Apr 2026 20:26:05 -0400 Subject: [PATCH 1/2] Make source imports explicit Co-authored-by: Codex --- src/CSVAnalysis.jl | 5 +++-- src/Fastly.jl | 3 ++- src/WebCacheUtilities.jl | 9 ++++++++- src/graylog.jl | 6 +++++- src/ipinfo.jl | 5 +++-- src/providers/AWS.jl | 4 ++-- src/providers/Azure.jl | 4 ++-- 7 files changed, 25 insertions(+), 11 deletions(-) diff --git a/src/CSVAnalysis.jl b/src/CSVAnalysis.jl index c02bce9..484d9bb 100644 --- a/src/CSVAnalysis.jl +++ b/src/CSVAnalysis.jl @@ -1,4 +1,5 @@ -using CSV, DataFrames +using CSV: CSV +using DataFrames: DataFrames, DataFrame export parse_csv_source_ips, parse_csv_payload_sizes, parse_csv_http_uri, parse_csv_http_method, parse_csv_http_response_code, attribute_data_to_providers, find_provider @@ -104,4 +105,4 @@ function attribute_data_to_providers(ip_traffic::Dict, pxs::Dict{String,Vector{< provider_traffic[find_provider(prefix_dict, ip)] += traffic end return provider_traffic -end \ No newline at end of file +end diff --git a/src/Fastly.jl b/src/Fastly.jl index 141556b..addfb87 100644 --- a/src/Fastly.jl +++ b/src/Fastly.jl @@ -1,5 +1,6 @@ module Fastly -using HTTP, JSON +using HTTP: HTTP +using JSON: JSON import ..IPSubnet export get_mutable_service_version diff --git a/src/WebCacheUtilities.jl b/src/WebCacheUtilities.jl index 5960881..42fb33a 100644 --- a/src/WebCacheUtilities.jl +++ b/src/WebCacheUtilities.jl @@ -1,5 +1,12 @@ module WebCacheUtilities -using JSON, HTTP, Sockets +using AbstractTrees: AbstractTrees, PostOrderDFS +using CSV: CSV +using DataFrames: DataFrames, DataFrame +using Dates: DateTime, Hour, Second, TimePeriod +using Gumbo: Gumbo, HTMLElement, parsehtml, tag +using HTTP: HTTP +using JSON: JSON +using Sockets: Sockets, IPAddr, IPv4, IPv6 include("file_cache.jl") include("IPSubnet.jl") diff --git a/src/graylog.jl b/src/graylog.jl index f0b9e8e..501f375 100644 --- a/src/graylog.jl +++ b/src/graylog.jl @@ -1,4 +1,8 @@ -using HTTP, Dates, JSON +using CSV: CSV +using DataFrames: DataFrame +using Dates: DateTime, Hour, Second, TimePeriod +using HTTP: HTTP +using JSON: JSON export get_graylog_csv, parse_message diff --git a/src/ipinfo.jl b/src/ipinfo.jl index 53fb758..0690c04 100644 --- a/src/ipinfo.jl +++ b/src/ipinfo.jl @@ -1,4 +1,5 @@ -using Gumbo, AbstractTrees +using AbstractTrees: AbstractTrees, PostOrderDFS +using Gumbo: Gumbo, HTMLElement, parsehtml, tag function for_each_href(f::Function, html_path::AbstractString) html = parsehtml(String(read(html_path))) @@ -52,4 +53,4 @@ function dig_cache(domain, record_type="A") end end return readlines(record_file) -end \ No newline at end of file +end diff --git a/src/providers/AWS.jl b/src/providers/AWS.jl index 575e16e..70362a5 100644 --- a/src/providers/AWS.jl +++ b/src/providers/AWS.jl @@ -1,5 +1,5 @@ module AWS -using HTTP, JSON +using JSON: JSON import ..IPSubnet, ..download_to_cache prefixes_by_region = Dict{String,Vector{IPSubnet}}() @@ -35,4 +35,4 @@ function prefix_regions() return collect(keys(prefixes_by_region)) end -end # AWS \ No newline at end of file +end # AWS diff --git a/src/providers/Azure.jl b/src/providers/Azure.jl index d5ab7d9..b095127 100644 --- a/src/providers/Azure.jl +++ b/src/providers/Azure.jl @@ -1,5 +1,5 @@ module Azure -using HTTP, JSON, Gumbo, AbstractTrees +using JSON: JSON import ..IPSubnet, ..download_to_cache, ..for_each_href prefixes_by_region = Dict{String,Vector{IPSubnet}}() @@ -48,4 +48,4 @@ function prefix_regions() return collect(keys(prefixes_by_region)) end -end # module Azure \ No newline at end of file +end # module Azure From 9716793b3b1a0c2806e238ce907471267e24cc00 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge <5619885+DilumAluthge@users.noreply.github.com> Date: Sat, 18 Apr 2026 20:27:18 -0400 Subject: [PATCH 2/2] Add ExplicitImports CI check Co-authored-by: Codex --- .github/workflows/CI.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 17c8324..1aafcb5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -60,3 +60,33 @@ jobs: using WebCacheUtilities Aqua.test_all(WebCacheUtilities; stale_deps=false, deps_compat=false) + + explicit-imports: + name: Julia ${{ matrix.version }} - ExplicitImports + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + version: + - '1' + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + - uses: julia-actions/setup-julia@v2 + with: + version: ${{ matrix.version }} + - uses: julia-actions/cache@v2 + - name: Run ExplicitImports.jl + shell: julia --color=yes {0} + run: | + import Pkg + Pkg.activate(; temp=true) + Pkg.develop(Pkg.PackageSpec(path=pwd())) + Pkg.add("ExplicitImports") + Pkg.instantiate() + + using ExplicitImports + using WebCacheUtilities + + check_no_implicit_imports(WebCacheUtilities)