Repository navigation
Tags
Tags
[Diff since v0.12.3](v0.12.3...v0.13.0) - Added support for Julia v1.14. JET now loads full functionality on Julia 1.14 instead of empty stubs. - Added the `allow_unsupported_julia` preference, which loads full JET functionality on unsupported Julia versions, e.g. nightly builds, without the development features that `JET_DEV_MODE` also enables: > LocalPreferences.toml ```toml [JET] allow_unsupported_julia = true # previously `JET_DEV_MODE = true` was needed ``` JET emits a warning when it is loaded on an unsupported Julia version this way, since it may not work correctly there. - `JETInterface` now exports `has_problems`, the predicate that `call_test_ex` and `func_test` use to decide whether an analysis result fails a test. - Calls whose matching methods are ambiguous are now reported as `AmbiguousMethodErrorReport` instead of `MethodErrorReport` saying that no matching method is found. For a union-split call, the ambiguous signatures are reported separately from those without any matching method: ```julia k(::Int, ::Any) = 1 k(::Any, ::Int) = 2 m(x::Int) = k(x, x) # reported: ambiguous `k(::Int, ::Int)` n(x::Union{Int,String}) = k(x, x) # reported: ambiguous `k(::Int, ::Int)` # and no method for `k(::String, ::String)` ``` - `invoke` calls that throw `MethodError` because no method matches the specified signature are now reported as `MethodErrorReport` in the `:basic` and `:sound` modes, and those whose matching methods are ambiguous are reported as `AmbiguousMethodErrorReport`: ```julia f(::Int) = 1 g(x) = invoke(f, Tuple{String}, x) # reported: no method for `f(::String)` h(x) = @invoke f(x::Integer) # reported: no method for `f(::Integer)` k(::Int, ::Any) = 1 k(::Any, ::Int) = 2 l(x) = @invoke k(x::Int, x::Int) # reported: ambiguous `k(::Int, ::Int)` ``` - Top-level analysis now reports a `@test` that always fails, i.e. whose expression is inferred to evaluate to `false` or to a non-boolean value, and a `@test_throws` that always fails, i.e. whose expression is inferred to throw only exceptions that do not match the expected one. The errors in the expression of `@test_throws`, which is expected to throw, are no longer reported: ```julia @testset "foo" begin x = nothing @test x isa Int # reported: always `false` end @testset "bar" begin y = rand((0, nothing)) @test y # reported: non-boolean `Union{Nothing, Int64}` end @testset "baz" begin @test_throws MethodError sin("x") # no longer reported @test_throws ArgumentError sin("x") # reported: throws `MethodError` end ``` `@test_broken` and `@test ex broken=true` are not reported, nor are the tests in function bodies. `@test false` is also reported, so use e.g. `error("unreachable")` to mark code that should not be reached. The check of `@test_throws` is conservative: the exceptions inferred across function calls are often `Any`, which matches any expected exception, and message patterns are not checked. - Top-level processing now stops entirely at the first fatal parsing, macro expansion, lowering, concrete execution, dependency, or include failure. No later statements, modules, files, or definition analysis are processed. Fatal results are displayed as `Top-level analysis failed`, with guidance to fix the error and rerun the incomplete analysis. `VirtualProcessResult.toplevel_error_report` holds that single `ToplevelErrorReport`, or `nothing` on success. `get_reports` on a `JETToplevelResult` still returns a vector: only the fatal error on failure, or warnings followed by filtered inference reports on success. Module and `report_config` filtering apply only to inference reports; warnings are retained, so successful results can contain a mix of report types. The console output prints warnings before inference reports and omits the "No errors detected" message when warnings are present. The `Test` integration (`test_file`, `test_text`, `test_package`) does not count `UnsupportedFeatureReport`s as failures, but `ParseWarningReport`s still fail tests. > [!WARNING] > Known limitation: forced interruption skips user `finally` blocks in > interpreted code, including during timeout, missing-concretization, and > fatal include failures. Concrete execution can leave the working directory > changed or locks held after analysis exits; its side effects are not rolled > back. - Nonfatal JET warnings are stored in `VirtualProcessResult.toplevel_warning_reports`, a `Vector{ToplevelWarningReport}`, and are not also emitted as `@warn` logs. Parser warnings now produce nonfatal `ParseWarningReport`s. Unsupported `include(mapexpr, filename)` and `Base.include(mapexpr, mod, filename)` calls produce `UnsupportedFeatureReport`s and analyze the included file without applying `mapexpr`, in the current or explicitly specified module, respectively. - The explanatory text of top-level reports is wrapped at 90 columns, or at the terminal width when results are shown in a narrower REPL. Error messages, stacktraces, and source excerpts are not wrapped. - The `Top-level analysis failed` header is now highlighted in red. - Top-level report messages now start with a summary, followed by a blank line and the details. Errors from parsing, macro expansion, lowering, and concrete execution are summarized with what JET was doing and the first line of the error message, e.g. `JET could not execute this top-level code: UndefVarError: ...`, and parser diagnostics as `Syntax error: ...` or `Syntax warning: ...`. `UnsupportedFeatureReport`s show a common summary above the description of the unsupported feature, and `RecursiveIncludeErrorReport`s list the include chain. The VS Code integration keeps the summary on the first line of its diagnostics. - Top-level analysis now analyzes test sets as if they were declared with `failfast=true`, where a failing test aborts the test set, so it analyzes the code after `@test ex` assuming that `ex` is `true`: ```julia @testset "foo" begin x = rand((0, nothing)) @test x isa Int sin(x) # no longer reported as `sin(::Nothing)`: `x` is an `Int` here end ``` The new `testset_failfast` configuration controls this. With `testset_failfast=false`, only the test sets that specify `failfast=true` are analyzed this way, together with the test sets nested in them and the files included from them: ```julia # runtests.jl @testset "MyPkg" failfast=true begin @testset "foo" include("foo.jl") # the test sets in foo.jl are analyzed the same way end ``` Test sets that specify `failfast=false` and test sets of a custom type, e.g. `@testset MyTestSet ...`, are analyzed as declared. Note that the code after a test that always fails is not analyzed. Likewise, regardless of `testset_failfast`, the code after `@test_warn`, `@test_nowarn`, `@inferred`, and `@testset let ... end` is not analyzed if they always throw, since Test.jl does not catch exceptions in them. The values of `@test_warn`, `@test_nowarn`, and `@inferred` also keep their inferred types, e.g. `y` of `y = @inferred parse(Int, "1")` is inferred as `Int` instead of `Any`. - `VirtualFrame` has the new `pc` field, the index of the statement that the frame points to in the code analyzed for its `MethodInstance`, or `0` if the frame does not point to a statement. Frames at different statements on the same line are no longer equal: ```julia VirtualFrame(file, line, linfo, pc) # was `VirtualFrame(file, line, linfo)` first(report.vst).pc # the statement where `report` was found ``` - The `print_toplevel_success` and `print_inference_success` configurations are deprecated and will be removed in a future release. Passing either one emits `Base.depwarn`. `print_toplevel_success` now has no effect; displayed analysis results never printed its message. `print_inference_success` keeps working until its removal; use `JET.has_problems(result)` to check whether an analysis result has problems. - `VirtualProcessResult.toplevel_error_reports` is deprecated and will be removed in a future release. Access emits `Base.depwarn` and returns a fresh empty or one-element `Vector`; `propertynames` lists the property only when private names are requested. Migrate to `toplevel_error_report`: replace `isempty(res.toplevel_error_reports)` with `isnothing(res.toplevel_error_report)` and use the singular report directly when non-`nothing`. For a vector of reports from a `JETToplevelResu 8000 lt`, use `JET.get_reports(result)` instead. - Fixed top-level analysis crashing with an `AssertionError` when a docstring is attached to an expression that cannot be documented, such as an `if` block. The analysis now stops with the error that Julia raises for such code, `cannot document the following expression`. - Fixed top-level analysis concretizing the code after a `try` block, such as a `Base.ScopedValues.@with` block, within the block's exception handler and dynamic scope when the block contains definitions. Such code could read the scoped values set by the block, and an error thrown by it ran the code after the block again. - Fixed a `WARNING: Detected access to binding ... in a world prior to its definition world` message that top-level analysis (e.g. `report_file`) could print when reading a constant declared earlier in the same top-level block, such as a `global const` inside a `let` block. - Fixed a `WARNING: Detected access to binding ... in a world prior to its definition world` message that `report_opt` could print when reporting a runtime dispatch to a function defined after JET was loaded. - Fixed top-level analysis treating any function named `include` as Julia's file loader instead of executing its body. Custom wrappers now run their own logic, such as path transformations, before calls to the standard `include` are intercepted during recursive interpretation. - Fixed printing of a report about an `include` call with arguments that no `include` method accepts, such as `include(Symbol("file.jl"))`, which threw a `TypeError` instead of showing the `MethodError`. - Fixed reports about an `include` call, such as a failure to read the included file or a `RecursiveIncludeErrorReport`, pointing to the first line of the enclosing top-level statement when the call is inside a block or a function. They now point to the line of the `include` call, or to the line that calls the enclosing function when that function is defined in another file. - Fixed reports in code checked by Test.jl macros, such as the body of a `@testset` or a multi-line `@test` expression, pointing to the first line of the enclosing top-level statement since 0.12.1. They now point to the line of the reported code. - Fixed the loop bodies of `Threads.@threads` not being analyzed on Julia 1.13.2 and later, where its tasks call the loop body through a dynamic dispatch (JuliaLang/julia#63184). The loop body is now analyzed where `@threads` is used, and `report_opt` no longer reports that dynamic dispatch in `Base.Threads._threads_call`: ```julia const g = Ref{Any}(1) helper(i) = i + g[] function f(n) Threads.@threads for i in 1:n helper(i) # `@report_opt f(10)` reports this runtime dispatch again end end ``` - Fixed `join` on a tuple of unknown length, such as one created by splatting a vector, being inferred to return `Union{AnnotatedString{String},String}` rather than `String`, which caused spurious reports for code that requires a `String` (JuliaLang/julia#63999): ```julia report_call((Vector{String},)) do xs pointer(join((xs...,), ", ")) # no longer reported end ``` - Fixed errors in the function run by a `Task` not being reported when the function had not been analyzed before, as when the task is created by `Task(f, reserved_stack)`: ```julia report_call() do t = Task(() -> sum("julia"), 0) # errors in `sum("julia")` now reported schedule(t) fetch(t) end ``` - Fixed analysis crashing with `Could not find single target method` when a `Task` is created from a function whose type is not known, such as `f::Function`: ```julia g(f::Function) = Task(f) report_call(g, (Function,)) # no longer throws ``` - Fixed top-level analysis (e.g. `report_file`) reporting a global variable as not defined when the variable is exported after its assignment: ```julia x = rand(Bool) export x println(x) # was reported: `x` is not defined ``` - Fixed the reports from a call being discarded by the constant propagation of another call to the same function on the same line: ```julia foo(a) = a < 0 ? a + string(a) : a bar(x) = (foo(x), foo(1)) # the report from `foo(x)` was discarded report_call(bar, (Int,)) ``` - Fixed conversion intrinsics such as `bitcast` being reported as called with a non-primitive target type when the target type is a `Union` of primitive types: ```julia # was reported: bitcast: target type not a leaf primitive type report_call(signed, (Base.BitUnsigned,)) ``` - Fixed reports about `getfield` or `setfield!` on a type object listing the fields of that type instead of the fields of the type object itself, and the analysis of field accesses throwing on a field name that is neither a `Symbol` nor an `Int`, or on a tuple of unknown length: ```julia struct Foo; x::Int; end # now reported: type DataType has no field `y` report_call(() -> getfield(Foo, :y)) report_call(() -> getfield(Foo, "y")) # no longer throws ``` - Fixed `Core.invoke` calls with a `CodeInstance` being misclassified as invalid `invoke` calls when the invoked code always throws. Callee diagnostics for direct `CodeInstance` calls are not yet collected. **Merged pull requests:** - toplevel: Stop analysis at the first fatal error (#883) (@aviatesk) - toplevel: Record definition locations in `SignatureInfo` (#886) (@aviatesk) - print: Deprecate the success message configurations (#887) (@aviatesk) - print: Summarize and wrap top-level report messages (#888) (@aviatesk) - build(deps): bump dawidd6/action-download-artifact from 25 to 27 (#889) (@dependabot[bot]) - Look up callee bindings in the analysis world when building report signatures (#891) (@Beforerr) - Fix root-anchored .gitignore entries (#892) (@Beforerr) - toplevel: Exit the handlers and scopes entered by concretization (#893) (@aviatesk) - toplevel: Narrow types after `@test` in fail-fast test sets (#895) (@aviatesk) - Analyze test sets as fail-fast by default and report `@test`s that always fail (#896) (@aviatesk) - toplevel: Concretize `Base.deprecate` calls (#897) (@aviatesk) - typeinfer: Analyze `Threads.@threads` loop bodies at call sites (#898) (@aviatesk) - toplevel: Keep binding states across partitions replaced by `export` (#899) (@aviatesk) - Propagate exceptions in Test.jl macros and check exceptions of `@test_throws` (#901) (@aviatesk) - jetanalyzer: Add overlay for `join` on tuples (#902) (@aviatesk) - toplevel: Skip native compilation of `precompile` calls (#903) (@aviatesk) - Support Julia v1.14 (#904) (@aviatesk) - jetanalyzer: Skip `Union` target types in conversion checks (#905) (@aviatesk) - jetanalyzer: Report `MethodError` from `invoke` lookup failures (#906) (@aviatesk) - jetanalyzer: Report ambiguous method calls separately (#907) (@aviatesk) **Closed issues:** - `Threads.@threads` loop bodies no longer analyzed on Julia 1.13.2 (#890) - AssertionError: invalid `cache_argtypes` for `mi` (#894) - `@test_throws MethodError f(x)` reports the `MethodError` the test expects (#900)
[Diff since v0.12.2](v0.12.2...v0.12.3) **Merged pull requests:** - trivial: add recommended badge md code to README (#877) (@tpapp) - jetanalyzer: Add overlay for `SkipMissing` `mapreduce_impl` (#878) (@aviatesk) - build(deps): bump dawidd6/action-download-artifact from 24 to 25 (#880) (@dependabot[bot]) - toplevel: Replace sticky signature workers with a non-yielding lock (#881) (@aviatesk) - toplevel: Interpret `Core.eval`ed code concretely (#882) (@aviatesk) **Closed issues:** - Report short path format (#302) - Handle version of JET when testing on several versions of Julia (#546) - Possible LinearAlgebra false positive (#562) - @test_opt without the printing (#617) - Weird false positive for simple code (#777) - Unexpected error on `report_package` (#790) - Segmentation fault on Julia 1.13.0 (#867)
[Diff since v0.12.1](v0.12.1...v0.12.2) **Merged pull requests:** - build(deps): bump dawidd6/action-download-artifact from 21 to 24 (#859) (@dependabot[bot]) - toplevel: Suppress reports from concretized calls (#862) (@aviatesk) - toplevel: Merge non-constant global binding states across assignments (#864) (@aviatesk) - abstractinterpret: Support literal callee objects in signatures (#865) (@aviatesk) - toplevel: Materialize untyped global declarations under control flow (#866) (@aviatesk) - toplevel: Add a timeout for concrete execution of top-level statements (#869) (@aviatesk) - toplevel: Report invalid constant declarations without crashing (#870) (@aviatesk) - toplevel: Fix documented binding analysis on Julia 1.13 (#871) (@aviatesk) - jetanalyzer: Suppress incompatible global assignments in typo mode (#872) (@aviatesk) - toplevel: Make `concretization_timeout` cover calls from top-level code (#873) (@aviatesk) - jetanalyzer: Avoid spurious errors for unknown `ntuple` lengths (#874) (@aviatesk) - jetanalyzer: Add overlays for `Libdl.dlsym` and tuple `in` (#875) (@aviatesk) - jetanalyzer: Add overlays for bottom-type arity guards (#876) (@aviatesk) **Closed issues:** - False positive `BoundsError` for `getindex` on a `Tensor` (#678) - @report_opt crashes on Julia 1.13: typeof_arg does not support Base.BottomRF in optimized IR (#863)
[Diff since v0.12.0](v0.12.0...v0.12.1) **Merged pull requests:** - toplevel: Derive concretization patterns from the actual assignment (#855) (@aviatesk) - toplevel: Simplify Test.jl macros during virtual processing (#856) (@aviatesk) - toplevel: Isolate conditional closures in Test expressions (#857) (@aviatesk)
[Diff since v0.11.6](v0.11.6...v0.12.0) - Added support for Julia v1.13. - Added `JET.JET_AVAILABLE` so test suites can skip JET checks when only empty stubs are available. See the new [Julia compatibility and versioning policy](README.md#julia-compatibility-and-versioning). - **Breaking**: JET no longer accepts Julia compiler parameter keywords such as `max_methods` and `inlining` as user-facing configuration options for analysis entry points; such keywords now throw `JETConfigError`. - Module matchers for the `target_modules`/`ignored_modules` configurations now follow lexical module nesting that stops at namespace roots: `Base` is no longer considered a submodule of `Main`. `target_modules = (Main,)` therefore matches only code defined interactively in the REPL or in an analyzed script, instead of also matching every report from `Base`. - JET now loads empty stubs on unsupported future Julia versions while remaining installable as a test dependency. - Overhauled JET's documentation across the project. - Improved the implementation of optimization analysis to make it more robust. - **Breaking**: Removed support for `.JET.toml` configuration files, including the parent-directory file lookup that `report_file` performed. A single configuration file could not be shared between analyzers that accept different configuration sets, and some configurations could not even be specified through the file at all. All analysis configurations are now specified via keyword arguments of each entry point. - **Breaking**: Removed the experimental `watch_file` entry point. Use [JETLS.jl](https://github.com/aviatesk/JETLS.jl) for interactive diagnostics. - **Breaking**: Removed the `report_package(::AbstractString)` and `report_package()` entry points (and the corresponding `test_package` forms), which had been deprecated since v0.11. Load the target package first and pass its module directly, e.g. `report_package(PkgModule)`. - **Breaking**: Removed the `target_defined_modules` configuration, which had been deprecated since v0.11. Use the more flexible `target_modules` configurat 10BC8 ion instead, e.g. `target_modules=(PkgModule,)`. - **Breaking**: Removed the `fullpath` printing configuration, which had been deprecated since v0.11. Use `sourceinfo=:full` instead. - Fixed a data race in shared top-level binding state (#840, thanks [@PatrickHaecker](https://github.com/PatrickHaecker)). - Fixed `report_package` to analyze definitions from source files included into multiple modules. - Fixed races between `report_package` and concurrent Revise package tracking or revision. **Merged pull requests:** - abstractinterpret: Fix data race on shared `binding_states` (#840) (@PatrickHaecker) - Support Julia 1.13 (#841) (@aviatesk) - optanalyzer: Analyze runtime dispatches on `IRCode` (#843) (@aviatesk) - release: Prepare JET v0.12.0 (#844) (@aviatesk) - config: Hide compiler parameter settings from users (#845) (@aviatesk) - agents: Add JET development skills (#846) (@aviatesk) - Remove `watch_file` (#847) (@aviatesk) - toplevel: Fix Revise signature collection (#849) (@aviatesk) - config: Remove `.JET.toml` support (#850) (@aviatesk) - toplevel: Pin signature inference to worker threads (#852) (@aviatesk) - api: Remove APIs deprecated in v0.11 (#853) (@aviatesk) **Closed issues:** - docs: documentation for incoming VSCode integration (#248) - Branches that restrict a type (#520) - JET shows new printing instabilities for SparseArrays on 1.12 (#746) - `using Nemo, JET ; report_package(Nemo)` still runs into an error (#776) - Importing JET fails on 1.13.0-alpha2 (#796) - JET fails to analyse Oceananigans (#804) - JET.jl should have new release to co-install with Cthulhu.jl in Julia 1.13.0-rc1 (#806) - Julia 1.13 and `JET#master` compatibility (#819) - `MethodError: no method matching getfile(::Nothing)` when analysing MPI.jl (#826) - Error with LoweredCodeUtils v3.6 (#827) - False-positive runtime dispatch reports on Julia 1.13-rc1 for concrete Base broadcast/view/CartesianIndex code (clean on 1.12) (#839) - Revisit Julia runtime compat bounds (#842)
[Diff since v0.11.5](v0.11.5...v0.11.6) **Merged pull requests:** - toplevel: Align virtual process worlds with JuliaInterpreter v0.11 (#833) (@aviatesk) - typeinfer: Drop redundant eager add of cached callee reports (#835) (@aviatesk) - abstractinterpret: Preserve reports from distinct callsites (#837) (@aviatesk)
[Diff since v0.11.4](v0.11.4...v0.11.5) **Merged pull requests:** - Adjustments for incoming Julia v1.12.7 (#825) (@aviatesk) - abstractinterpret: Track cached report dependencies (#828) (@aviatesk) - virtualprocess: Avoid latestworld-driven loop concretization (#830) (@aviatesk) - Bump actions/checkout from 6 to 7 (#831) (@dependabot[bot]) - deps: Update to LoweredCodeUtils v3.6.2 (#832) (@aviatesk) **Closed issues:** - Changelog out of date (#829)
[Diff since v0.10.14](v0.10.14...v0.10.15) This release has been identified as a backport. Automated changelogs for backports tend to be wildly incorrect. Therefore, the list of issues and pull requests is hidden. <!-- **Closed issues:** - JET doesn't like `vcat` on Julia 1.12 (#699) - no matching method found with Vector (#761) - Expected MethodTableView with julia 1.12.2 (#783) - JET tests broken on 1.112.2 (#786) - Compatibility with Julia 1.12? (#812) - Missed erroring function in `if-else` branches (#820) -->
[Diff since v0.11.3](v0.11.3...v0.11.4) **Merged pull requests:** - Enable testing of prereleases (#797) (@ChrisRackauckas) - Add new ReportMatchers: AnyFrameMethod and LastFrameMethod (#798) (@fingolfin) - CI: fix harmless typo in artifact name (#799) (@fingolfin) - Remove SnoopCompile documentation link from README (#800) (@MagicMuscleMan) - Bump dawidd6/action-download-artifact from 11 to 14 (#802) (@dependabot[bot]) - Adjustments for v1.12.5 (#803) (@aviatesk) - Bump dawidd6/action-download-artifact from 14 to 15 (#805) (@dependabot[bot]) - Bump actions/upload-artifact from 6 to 7 (#807) (@dependabot[bot]) - Bump dawidd6/action-download-artifact from 15 to 16 (#808) (@dependabot[bot]) - Bump julia-actions/cache from 2 to 3 (#809) (@dependabot[bot]) - Bump dawidd6/action-download-artifact from 16 to 18 (#810) (@dependabot[bot]) - Bump dawidd6/action-download-artifact from 18 to 19 (#811) (@dependabot[bot]) - Bump dawidd6/action-download-artifact from 19 to 21 (#818) (@dependabot[bot]) - Bump codecov/codecov-action from 5 to 7 (#821) (@dependabot[bot]) - deps: Restrict LoweredCodeUtils to 3.4-3.5 (#824) (@aviatesk) **Closed issues:** - JET doesn't like `vcat` on Julia 1.12 (#699) - Compatibility with Julia 1.12? (#812) - Missed erroring function in `if-else` branches (#820)
PreviousNext