Skip to content

Latest commit

 

History

History
743 lines (666 loc) · 36.3 KB

File metadata and controls

743 lines (666 loc) · 36.3 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Changed

  • Julia v1.12.7 compatibility has been updated for newer Compiler.jl releases.

Fixed

  • Fixed stale diagnostics that could remain after redefining methods involved in a previous report.
  • Fixed false MissingConcretizationErrorReports for top-level loops whose body contains comprehension code and whose iterator is a top-level const value (aviatesk/JETLS.jl#555).

Added

  • Added method-matching report filtering via LastFrameMethod and AnyFrameMethod.

Changed

  • LoweredCodeUtils compatibility is temporarily restricted to v3.4-v3.5 until JET is updated for breaking changes introduced in v3.6.

Fixed

  • Fixed top-level error report stack traces on Julia v1.12.5.
  • Fixed repeated analysis of multiple standalone files that define @main in the same session.
  • Fixed module context information recorded for macro-generated modules, so tooling built on JET resolves macro call sites to the enclosing module.

Changed

  • Updated Revise dependency version to v3.13

Changed

  • Parallelized report_package: Method signature analysis in report_package is now parallelized using Julia's multithreading, providing significant speedup on multi-core systems.

    With --threads=4,2

    • Benchmark on report_package(JET): 52.07s → 17.75s (~3x faster)
    • Benchmark on report_package(CSV): 44.23s → 19.57s (~2x faster)

Changed

  • Added CodeTracking v3 as a compatible version.

Internal

  • Refactored the project file to use the [workspace] for the docs/test environment of JET. This allows running e.g. julia --project=./test test/runtests.jl or julia --project=./docs docs/make.jl successfully.

Changed

  • Major improvement to report_package: Switched to a Revise.jl-based implementation that brings significant improvements (#763):
    • Incremental analysis: Analysis results are now cached and reused across multiple runs. When you analyze the same package again, only methods affected by code changes are re-analyzed, while unchanged methods reuse their cached results. This dramatically reduces analysis time for iterative development workflows.

      E.g. Incremental analysis on JET itself

      Screen.Recording.2025-10-23.at.03.01.14.mov
    • Improved robustness: The new implementation leverages Revise's battle-tested infrastructure for tracking package definitions, providing much more reliable analysis coverage across diverse code patterns compared to the previous custom code loading mechanism.

    • Breaking change: report_package now requires a Module argument instead of accepting a package name as AbstractString. Users must now load the target package before analysis. See the deprecated section for more details.

    • Limitation: As a trade-off of the Revise-based approach, report_package can no longer analyze packages that fail to load. Previously, report_package could atl least report top-level errors for such packages (though it couldn't perform inference-based analysis). Now users must fix loading errors before applying JET analysis via report_package. These errors are typically straightforward to fix by examining the error output from using MyPkg or Pkg.precompile().

    • The previous default configurations analyze_from_definitions=true and concretization_patterns=[:(x_)] are no longer needed or used, as the Revise-based approach does not require JET's own code loading mechanism. These configurations can still be used in other top-level analysis entry points (e.g. report_file and report_text).

  • Revise.jl is now a required dependency instead of an optional weak dependency. This means watch_file no longer requires manually loading Revise with using Revise before use.
  • Enabled the ad-hoc concrete evaluation in JETAnalyzer for Julia v1.13 and higher, reducing false positives in more general cases
  • Module filtering behavior change: target_modules and ignored_modules now include submodules by default (#628, #772):
    • Submodule-inclusive filtering: When a Module object is passed to target_modules or ignored_modules, JET now matches not only that exact module but also all of its submodules. This provides more intuitive filtering behavior in most use cases.
    • Breaking change: This changes the filtering behavior when target_modules or ignored_modules accept an iterator of modules. To preserve the previous exact-match behavior (matching only the specified module without its submodules), wrap the module with LastFrameModuleExact or AnyFrameModuleExact:
      # New default (v0.11+): matches MyPackage and all its submodules
      report_call(f, args...; target_modules=(MyPackage,))
      
      # Previous behavior (v0.10): matched only MyPackage exactly
      # To preserve this in v0.11+, use:
      report_call(f, args...; target_modules=(LastFrameModuleExact(MyPackage),))
    • New matcher types:
      • ReportMatcher: abstract interface type for JET.match_report
      • LastFrameModuleExact: exact match in last frame only
      • AnyFrameModuleExact: exact match in any frame

Added

  • Symbol-based module filtering: target_modules and ignored_modules now accept Symbol in addition to Module objects (#602, #773). This allows filtering by module name without requiring the module as a dependency:
    # Filter by module name without loading CUDA package
    report_call(f, args...; ignored_modules=(:CUDA,))
    
    # Equivalent to passing the Module object (if CUDA is loaded)
    report_call(f, args...; ignored_modules=(CUDA,))
    All matcher types (LastFrameModule, AnyFrameModule, LastFrameModuleExact, AnyFrameModuleExact) now accept Union{Module,Symbol}.

Deprecated

  • report_package(::AbstractString), report_package([::Nothing]): The old signatures accepting a package name as a string, or no arguments are deprecated. Load the package first and pass the Module instead:
    # Preferred (v0.11):
    julia> using MyPackage
    julia> report_package(MyPackage)
    
    # Deprecated (v0.10):
    julia> report_package("MyPackage")
    julia> report_package()
  • target_defined_modules configuration: Use the more flexible target_modules configuration instead. To limit error reports to your package's module context (filtering out errors from dependencies), use:
    report_package(MyPackage; target_modules=(MyPackage,))

Fixed

  • Enabled more concrete evaluation in report_call, fixing false positive reports such as those reported for @report_call 1.0 > π (#767)
  • Fixed error reporting for setglobal! on variables with incompatible types, fixing a test failure on v1.12 (#768).

Fixed

  • Fixed compatibility with Base.@deprecate_binding macro, which before could trigger an internal error in packages using it (#733, #765).

Fixed

  • Fix locking issue with Base.require_lock that occurs in Julia 1.12.1 (#762)

Fixed

  • Fixed method error from the LoweringErrorReport constructor.
  • Added support for macros that return :toplevel expressions, fixing wrong error reports from e.g. @enumx macros (#748, #759).

Added

  • ui: Add sourceinfo configuration option to control file path display in error reports. The new option supports five modes:
    • :full - Expand all file paths to absolute paths
    • :default - Show paths as-is, prefixing ./ only for relative paths
    • :compact - Show basename only for absolute paths, relative paths unchanged
    • :minimal - Show only module information, omit file paths
    • :none - Omit location information entirely (treated as :compact for toplevel errors where location is essential)

Deprecated

  • ui: The fullpath configuration option is now deprecated in favor of sourceinfo. Use sourceinfo=:full instead of fullpath=true.

Changed

  • Precompilation of JET has been re-enabled. This should significantly improve startup times:

    $ julia --startup-file=no -e '
      macro simpletime(ex)
          :(let s = time()
              $(ex)
              e = time()
              elapsed = round(e - s; digits=2)
              println("  Elapsed: $elapsed sec")
          end)
      end
      @simpletime using JET
      @simpletime @report_call sum("julia")
      @simpletime report_file(normpath(pkgdir(JET), "demo.jl"); toplevel_logger=nothing)'
    v0.10.6
      Elapsed: 1.25 sec
      Elapsed: 10.08 sec
      Elapsed: 11.43 sec
    This version
      Elapsed: 1.33 sec
      Elapsed: 0.01 sec
      Elapsed: 0.14 sec
    

    This makes the precompilation during installation take longer. If you're developing JET itself, we recommend having:

    LocalPreferences.toml

    [JET]
    precompile_workload = false
  • report_call and report_package now reports undefined local variables. Error reports should be obtained for local variables that can be undefined in cases like the following:

    julia> report_call((Int,)) do x
               local y
               return sin(y) # `y` is not defined here
           end
    ═════ 1 possible error found ═════
    ┌ (::var"#8#9")(x::Int64) @ Main ./REPL[7]:3
    │ local variable `y` is not defined: y
    └────────────────────
    
    julia> report_call((Bool,Int,)) do c, x
               if c
                   y = x
               end
               return sin(y) # `y` may be undefined here
           end
    ═════ 1 possible error found ═════
    ┌ (::var"#5#6")(c::Bool, x::Int64) @ Main ./REPL[6]:5
    │ local variable `y` may be undefined: y::Int64
    └────────────────────
  • Improved accuracy of VirtualProcessResult.analyzed_files.

  • JET now requires JuliaSyntax v1.0.

  • JET's pre-defined analyzers (JETAnalyzer and OptAnalyzer) and interpreters (JETConcreteInterpreter) now use fixed world ages for improved robustness against invalidations that may be caused by loading external packages (#732). This behavior is enabled by default (more specifically, it is enabled when the JET_DEV_MODE is turned off). You can configure this behavior by setting the new JET.use_fixed_world = !JET.JET_DEV_MODE preference.

  • Updated depedency versions (allowing JET to be used with CodeTracking v2).

  • For errors that occur during JET's top-level analysis, it is now possible to distinguish between those that occur during macro expansion (JET.MacroExpansionErrorReport) and those that occur during lowering (JET.LoweringErrorReport) (#737).

Removed

  • BREAKING: The ReportPass interface has been removed. The [@]report_call entrypoints continue to support the mode::Symbol option with values :basic, :typo, or :sound (#731).
    • Advanced analysis customization that was previously possible using the ReportPass interface can now be achieved by the JET.JETAnalyzer type, which is now an abstract type.
    • For OptAnalyzer, such customization is no longer possible, but for most use cases, simply configuring function_filter is sufficient.
  • WARNING: Support for Cthulhu extension has been temporarily removed. This is because JET requires JuliaSyntax@1.0, while Cthulhu still requires JuliaSyntax@0.4. We will restore extension support once Cthulhu (or more precisely, TypedSyntax.jl) supports JuliaSyntax@1.0.
  • Removed the include_callback functionality that was added in 0.9.14. External consumers should subtype JET.ConcreteInterpreter and implement their own customized interpretation logic (#721).

Added (Internal)

  • Added the ability for external users of JET to customize virtualprocess.jl. Similar to the design of JuliaInterpreter.Interpreter and Base.Compiler.AbstractInterpreter, the new JET.ConcreteInterpreter <: JuliaInterpreter.Interpreter interface is designed, allowing external packages to subtype it and customize the behavior of virtual_process(interp::JET.ConcreteInterpreter, ...). Please note that this is still undocumented and is a highly experimental interface. Currently, it is being experimentally used in the JETLS project. (#721).
  • Introduced ToplevelAbstractAnalyzer interface type that extends AbstractAnalyzer to provide clear separation between analyzers that support top-level analysis and those that don't. This architectural improvement ensures type safety by restricting virtual_process usage to analyzers that explicitly extend ToplevelAbstractAnalyzer, while keeping non-toplevel analyzers like OptAnalyzer free from toplevel-specific logic (#722).
  • Added typeinf_world(analyzer::AbstractAnalyzer) optional interface for controlling the world age used during type inference (#721).
  • Added interpret_world(interp::ConcreteInterpreter) optional interface for controlling the world age used during interpretation (#721).

Changed

  • Started to use the new Compiler.jl stdlib as the base compiler, allowing easier switch of the compiler implementation (#710).
  • JETInterface now includes the ToplevelErrorReport interface.

Changed

  • Updated JuliaInterpreter to v0.10

Changed

  • Includes internal dependency updates

Reimplemented top-level analysis features like report_package. By updating to this version, you can use these features on Julia v1.12.

However, to use JET v0.10.3, you need to use Julia version v"1.12.0-beta2" or later. As of April 19, 2025, you need to build Julia from this branch for using this 1.12 beta version. Updated (April 26, 2025): Julia version v"1.12.0-beta2" is available at this link now.

Also, please be aware that some minor features haven't been fully tested yet. In particular, there might be issues related to timholy/Revise.jl#903. Updated (April 23, 2025): This issue has been fixed on the latest version of Revise.jl.

Changed

  • JET is now compatible with JuliaSyntax v1.0

Fixed

  • Improved the robustness of the pass to report captured variables in report_opt. Specifically, this fixes an internal error that occurred when running report_opt(JSON3.read, (String,Type{CustomType})).

Warning

v0.10.0 is a transitional release with limited functionality:

  • Compatibility: JET v0.10.0 supports Julia v1.12 but is incompatible with v1.11. Users on v1.11 should continue using JET v0.9, which will only receive bug fixes.
  • Functionality: This version provides basic local analysis features but lacks fully functional top-level analysis capabilities. These will be addressed in future updates.
  • Future Plans: Development will focus on stabilizing v0.10 and refactoring JET for integration with the new language server project. For stable use, stick with v0.9.

JET v0.10.0 introduces compatibility with Julia v1.12, addressing significant changes in the runtime and compiler systems. However, maintaining compatibility with Julia v1.11 was deemed infeasible, leading to the decision to drop support for it in this release. Users on Julia v1.11 should remain on JET v0.9, which will continue to receive bug fixes but no new features.

This release is a stepping stone toward full compatibility with Julia v1.12. Due to the urgency of supporting Julia v1.12 for the PkgEval process, JET v0.10.0 was released despite its limitations:

  • Working Features: Basic local analysis features, such as [@]report_call and [@]report_opt, are expected to be functional.
  • Non-Functional Features: Top-level analysis features, such as report_package and report_file, are not yet verified and will be updated in future patch releases.

Future Development:

  • Updates to the v0.10 series will focus on improving stability and functionality.
  • Extensive refactoring is planned to support JET's integration into the JETLS project.
  • Stability on Julia v1.12 may remain uncertain until these updates are complete. Users requiring stable functionality should continue using the v0.9 series.

Changed

  • Dropped support for Julia v1.11.

Change

Changed

  • Even when JET fails to be loaded on nightly versions, stub functions mimicking JET’s API are now defined. These stubs raise an error with an appropriate message when executed. (#688, #689)

Changed

  • JET is now able to show multiple syntax errors at once, e.g.,

    multisyntaxerrors.jl

    function f(W,X,Y)
        s = 0
        for i = 1:10
            s += g(W[i]*f(X[end-1] + Y[end÷2+]),
                   W[i+1]*f(X[end-2] + Y[end÷2]) +,
                   W[i+2]*f(X[end-3] + Y[end÷2-3]))
        end
        return s
    end
    julia> report_file("multisyntaxerrors.jl")
    [...]
    ═════ 2 toplevel errors found ═════
    ┌ @ multisyntaxerrors.jl:4# Error @ multisyntaxerrors.jl:4:42for i = 1:10
    │         s += g(W[i]*f(X[end-1] + Y[end÷2+]),
    │ #                                        ╙ ── unexpected `]`
    └──────────────────────
    ┌ @ multisyntaxerrors.jl:5# Error @ multisyntaxerrors.jl:5:47
    │         s += g(W[i]*f(X[end-1] + Y[end÷2+]),
    │                W[i+1]*f(X[end-2] + Y[end÷2]) +,
    │ #                                             ╙ ── unexpected `,`
    └──────────────────────
    (#687)

Changed

  • JET.jl now will not be loaded on nightly version by default. This ensures that JETremains at least loadable on nightly builds, where JET's compatibility is not guaranteed. If you want to load JET on a nightly version, set the JET_DEV_MODE configuration of Preferences.jl to true and load it as usual (#684, #686).
  • JET now fully uses JuliaSyntax.jl for reporting syntax errors (#685).

Added

  • Added include_callback to the virtual process, allowing custom callback logic during code inclusion (#683).
  • Includes internal updates.

Fixed

  • Fixed a broadcasting-related issue in @report_call (which caused false error reports) by allowing concrete evaluation for typejoin (#669, #670).

Fixed

  • Fixed an exception thrown by report_package on Julia 1.11.1 (#668).

Changed

  • The improved statement selection logic implemented in v0.9.9 is now ported to LoweredCodeUtils.jl@3.0.2, so that it can shared by JET.jl and Revise.jl.

Added

Changed

  • Implemented an improved control-flow graph analysis and statement selection logic, enhancing JET’s top-level analysis accuracy (#654).

Added

  • An extension that integrates @report_opt with Cthulhu (#648)
  • reportkey for trimming multiple reports that resolve to the same runtime-dispatch caller/callee pair (#648)
  • Updated dependencies, made minor refactorings.

Fixed

  • report_opt no longer raises reports from callees on throw code path when the skip_unoptimized_throw_blocks::Bool=true configuration is enabled (#643).

Added

  • analyze_from_definitions can now be specified as entry_point_name::Symbol to make JET's top-level analyses start analysis using the interpreted method signature whose name is equal to entry_point_name as the analysis entry point. For example, when analyzing a script that specifies its entry point using the new @main special macro, you can specify report_file(script_name; analyze_from_definitions=:main) to automatically start the analysis from the main(args) function.

Changed

  • Made some adjustments to the warning text in the README.

Added

  • A simple logo badge for JET.jl is now available (thanks to @MilesCranmer!). You can add the line [![](https://img.shields.io/badge/%F0%9F%9B%A9%EF%B8%8F_tested_with-JET.jl-233f9a)](https://github.com/aviatesk/JET.jl) to your package's README to display the logo image that shows your package uses JET.jl for code quality checks (#635).
  • JET's top-level analyses such as report_package and report_file can now handle the new public keyword that is introduced in v1.11. (#637)

Fixed

  • Allow overly deep relative module paths when analyzing a package with report_package (#619, #633)

Fixed

  • Fixed the issue where the line numbers of methods whose locations were revised by Revise were not being updated (#513).

Added

  • A new configuration stacktrace_types_limit::Union{Nothing,Int}=nothing has been added. It's turned on by default and limits deeply nested types when JET prints reports. If you prefer the old behavior, set stacktrace_types_limit=0 (#601).

Changed

  • Revise.jl-related features are now implemented as a package extension, so in order to use watch_file, you need to load Revise.jl into your session first (#624, #625).
  • The compatibility with LoweredCodeUtils has been raised to version 2.4 and later, so it's now possible to use the latest version of Revise with JET again. Additionally, the top-level statement selection algorithm internally used by top-level analysis functions like report_file has been significantly improved.

Fixed

  • report_package now supports the using Module: Inner.object syntax (#554, #555).
  • Various internal improvements.

Fixed

  • report_package now supports the import Module as Alias syntax (#521, #553).

Changed

  • Changed the default toplevel_logger configuration for test_package to nothing. test_package no longer emits logs like [toplevel-info] analyzing from top-level definitions (xxx/yyy) (#550).

Fixed

  • Fixed the default ignore_missing_comparison configuration for report_package.

Fixed

  • Fixed report_package so that it does not produce noisy error reports from reducing on potentially empty collections.

Added

  • Made the (x == y)::Union{Missing,Bool} → Any widening behavior for report_package (that was added in #542) configurable. Specify report_package("TargetPkg", ignore_missing_comparison=false) if TargetPkg handles missing (#547).

Changed

  • Generalized the (x == y)::Union{Missing,Bool} → Any widening behavior for report_package that was added in #542 to other comparison operators (e.g. in) (#545).

Changed

  • JET now ignores the possibility of a poorly-inferred x == y call returning missing during the report_package analysis. Refer to issue #542 for reasons justifying this behavior. Essentially, report_package often relies on poor input argument type information at the beginning of analysis, leading to noisy error reports for function definitions like:

    struct MyToken end
    ismytoken(x) = x == MyToken() ? true : false

    This error is arguably just noise when the target package does not handle missing. report_package is designed as an entry point for easy analysis, even at the cost of accuracy, so it is not sound from the beginning. Hence, it might be beneficial to simply ignore such noise.

    However note that in interactive entry points like report_call, where concrete input argument types are available, this behavior should be turned off. This is because, if the code, when given specific input argument types, results in a Union{Bool,Missing} possibility, it likely signifies an inferrability issue or the code really needs to handle missing (#541, #542).

Fixed

  • report_package now supports the using MyPkg syntax (without specifying relative module path ...) from inner modules of MyPkg (#539, #540).

Added

  • report_call and report_opt can now analyze mi::MethodInstance. This feature allows JET to analyze method instances collected by MethodAnalysis.methodinstances. See the documentation for the details. (#510)
  • This CHANGELOG.md has been added and will be updated (#536).

Changed

  • JET's tree-like view, which represents inference stacktrace leading to each error point, now closely resembles the stacktrace displayed by Julia Base upon exception. The new view should be more intuitive for general users and additionally, the type information of arguments of each frame are nicely truncated, as in Julia Base.

    Before

    julia> @report_call sum([])
    ═════ 1 possible error found ═════
    ┌ @ reducedim.jl:996 Base.:(var"#sum#821")(:, pairs(NamedTuple()), #self#, a)
    │┌ @ reducedim.jl:996 Base._sum(a, dims)
    ││┌ @ reducedim.jl:1000 Base.:(var"#_sum#823")(pairs(NamedTuple()), #self#, a, _3)
    │││┌ @ reducedim.jl:1000 Base._sum(identity, a, :)
    ││││┌ @ reducedim.jl:1001 Base.:(var"#_sum#824")(pairs(NamedTuple()), #self#, f, a, _4)
    │││││┌ @ reducedim.jl:1001 mapreduce(f, Base.add_sum, a)
    ││││││┌ @ reducedim.jl:357 Base.:(var"#mapreduce#814")(:, Base._InitialValue(), #self#, f, op, A)
    │││││││┌ @ reducedim.jl:357 Base._mapreduce_dim(f, op, init, A, dims)
    ││││││││┌ @ reducedim.jl:365 Base._mapreduce(f, op, IndexStyle(A), A)
    │││││││││┌ @ reduce.jl:432 Base.mapreduce_empty_iter(f, op, A, Base.IteratorEltype(A))
    ││││││││││┌ @ reduce.jl:380 Base.reduce_empty_iter(Base.MappingRF(f, op), itr, ItrEltype)
    │││││││││││┌ @ reduce.jl:384 Base.reduce_empty(op, eltype(itr))
    ││││││││││││┌ @ reduce.jl:361 Base.mapreduce_empty(op.f, op.rf, T)
    │││││││││││││┌ @ reduce.jl:372 Base.reduce_empty(op, T)
    ││││││││││││││┌ @ reduce.jl:352 Base.reduce_empty(+, T)
    │││││││││││││││┌ @ reduce.jl:343 zero(T)
    ││││││││││││││││┌ @ missing.jl:106 Base.throw(Base.MethodError(zero, tuple(Base.Any)))
    │││││││││││││││││ MethodError: no method matching zero(::Type{Any}): Base.throw(Base.MethodError(zero, tuple(Base.Any)::Tuple{DataType})::MethodError)
    ││││││││││││││││└──────────────────

    After

    julia> @report_call sum([])
    ═════ 1 possible error found ═════
    ┌ sum(a::Vector{Any}) @ Base ./reducedim.jl:996
    │┌ sum(a::Vector{Any}; dims::Colon, kw::@Kwargs{}) @ Base ./reducedim.jl:996
    ││┌ _sum(a::Vector{Any}, ::Colon) @ Base ./reducedim.jl:1000
    │││┌ _sum(a::Vector{Any}, ::Colon; kw::@Kwargs{}) @ Base ./reducedim.jl:1000
    ││││┌ _sum(f::typeof(identity), a::Vector{Any}, ::Colon) @ Base ./reducedim.jl:1001
    │││││┌ _sum(f::typeof(identity), a::Vector{Any}, ::Colon; kw::@Kwargs{}) @ Base ./reducedim.jl:1001
    ││││││┌ mapreduce(f::typeof(identity), op::typeof(Base.add_sum), A::Vector{Any}) @ Base ./reducedim.jl:357
    │││││││┌ mapreduce(f::typeof(identity), op::typeof(Base.add_sum), A::Vector{Any}; dims::Colon, init::Base._InitialValue) @ Base ./reducedim.jl:357
    ││││││││┌ _mapreduce_dim(f::typeof(identity), op::typeof(Base.add_sum), ::Base._InitialValue, A::Vector{Any}, ::Colon) @ Base ./reducedim.jl:365
    │││││││││┌ _mapreduce(f::typeof(identity), op::typeof(Base.add_sum), ::IndexLinear, A::Vector{Any}) @ Base ./reduce.jl:432
    ││││││││││┌ mapreduce_empty_iter(f::typeof(identity), op::typeof(Base.add_sum), itr::Vector{Any}, ItrEltype::Base.HasEltype) @ Base ./reduce.jl:380
    │││││││││││┌ reduce_empty_iter(op::Base.MappingRF{typeof(identity), typeof(Base.add_sum)}, itr::Vector{Any}, ::Base.HasEltype) @ Base ./reduce.jl:384
    ││││││││││││┌ reduce_empty(op::Base.MappingRF{typeof(identity), typeof(Base.add_sum)}, ::Type{Any}) @ Base ./reduce.jl:361
    │││││││││││││┌ mapreduce_empty(::typeof(identity), op::typeof(Base.add_sum), T::Type{Any}) @ Base ./reduce.jl:372
    ││││││││││││││┌ reduce_empty(::typeof(Base.add_sum), ::Type{Any}) @ Base ./reduce.jl:352
    │││││││││││││││┌ reduce_empty(::typeof(+), ::Type{Any}) @ Base ./reduce.jl:343
    ││││││││││││││││┌ zero(::Type{Any}) @ Base ./missing.jl:106
    │││││││││││││││││ MethodError: no method matching zero(::Type{Any}): Base.throw(Base.MethodError(zero, tuple(Base.Any)::Tuple{DataType})::MethodError)
    ││││││││││││││││└────────────────────
    (#524)
  • A predicate function that is specified as the function_filter configuration now takes a function object instead of its type. For instance, the following code
    myfilter(@nospecialize ft) = !(
        ft === typeof(Base.mapreduce_empty) ||
        ft === typeof(Base.reduce_empty))
    @test_opt function_filter=myfilter func(args...)
    should now be written:
    myfilter(@nospecialize f) = !(
        f === Base.mapreduce_empty ||
        f === Base.reduce_empty)
    @test_opt function_filter=myfilter func(args...)
    (#507).

Removed

  • Dropped the support for Julia 1.8. JET now supports Julia 1.9 and above (#527).
  • report_and_watch_file has been removed. Use watch_file instead.

Fixed

  • Concrete evaluation is now enabled within JET's error analysis. This fixes numerous false positive error reports, and leads to faster analysis speed (#529, #523, #522).
  • report_package no longer reports error from methods that are intentionally designed to throw, e.g.
    @noinline raise_error(x::T) where T = error(lazy"Missing interface implementation for $T")
    (#532, #477).
  • report_package no longer reports error from methods with keyword arguments that don't have default values, e.g.
    struct Bar
        x
    end
    Bar(; x) = Bar(x)
    (#532, #478).
  • Fixed false error report from Base.aligned_sizeof (#512, #514, JuliaLang/julia#49801).
  • The optimization analysis has been adjusted to prevent skipping the reporting of runtime dispatches within non-compileable but inlineable frames (#526).
  • The sound error analysis mode has been fixed and now reports if there are any unanalyzed function calls, which typically occur due to excessive matching methods (#533).
  • report_file can now handle parameterized type alias definitions (#534).
  • Extensive refactoring and cleanup has been carried out.