Skip to content

Conversation

KristofferC
Copy link
Contributor

@KristofferC KristofferC commented Oct 4, 2025

Let's see if this works.

Copy link
Contributor

github-actions bot commented Oct 4, 2025

Your PR requires formatting changes to meet the project's style guidelines.
Please consider running Runic (git runic master) to apply these changes.

Click here to view the suggested changes.
diff --git a/src/jlgen.jl b/src/jlgen.jl
index f9cf153..01b16fe 100644
--- a/src/jlgen.jl
+++ b/src/jlgen.jl
@@ -811,11 +811,15 @@ function compile_method_instance(@nospecialize(job::CompilerJob))
         # lookup function (used to populate method_instances) isn't always called then.
 
         num_cis = Ref{Csize_t}(0)
-        @ccall jl_get_llvm_cis(native_code::Ptr{Cvoid}, num_cis::Ptr{Csize_t},
-                               C_NULL::Ptr{Cvoid})::Nothing
+        @ccall jl_get_llvm_cis(
+            native_code::Ptr{Cvoid}, num_cis::Ptr{Csize_t},
+            C_NULL::Ptr{Cvoid}
+        )::Nothing
         resize!(method_instances, num_cis[])
-        @ccall jl_get_llvm_cis(native_code::Ptr{Cvoid}, num_cis::Ptr{Csize_t},
-                               method_instances::Ptr{Cvoid})::Nothing
+        @ccall jl_get_llvm_cis(
+            native_code::Ptr{Cvoid}, num_cis::Ptr{Csize_t},
+            method_instances::Ptr{Cvoid}
+        )::Nothing
 
         for (i, ci) in enumerate(method_instances)
             method_instances[i] = ci.def::MethodInstance
diff --git a/test/native.jl b/test/native.jl
index da08764..d6c6ced 100644
--- a/test/native.jl
+++ b/test/native.jl
@@ -340,9 +340,9 @@ end
 end
 
 @testset "always_inline" begin
-    # XXX: broken by JuliaLang/julia#51599, see JuliaGPU/GPUCompiler.jl#527.
-    #      yet somehow this works on 1.12?
-    broken = VERSION >= v"1.13-"
+        # XXX: broken by JuliaLang/julia#51599, see JuliaGPU/GPUCompiler.jl#527.
+        #      yet somehow this works on 1.12?
+        broken = VERSION >= v"1.13-"
 
     mod = @eval module $(gensym())
         import ..sink
@@ -362,20 +362,24 @@ end
         Native.code_llvm(mod.g, Tuple{Int64}; dump_module=true, kernel=true)
     end
 
-    @test @filecheck(begin
+        @test @filecheck(
+            begin
         check"CHECK-NOT: @{{(julia|j)_expensive_[0-9]+}}"
         Native.code_llvm(mod.g, Tuple{Int64}; dump_module=true, kernel=true, always_inline=true)
-    end) broken=broken
+            end
+        ) broken = broken
 
     @test @filecheck begin
         check"CHECK: @{{(julia|j)_expensive_[0-9]+}}"
         Native.code_llvm(mod.h, Tuple{Int64}; dump_module=true, kernel=true)
     end
 
-    @test @filecheck(begin
+        @test @filecheck(
+            begin
         check"CHECK-NOT: @{{(julia|j)_expensive_[0-9]+}}"
         Native.code_llvm(mod.h, Tuple{Int64}; dump_module=true, kernel=true, always_inline=true)
-    end) broken=broken
+            end
+        ) broken = broken
 end
 
 @testset "function attributes" begin
diff --git a/test/runtests.jl b/test/runtests.jl
index 243a96b..a18e3f0 100644
--- a/test/runtests.jl
+++ b/test/runtests.jl
@@ -331,7 +331,7 @@ println("Testing finished in $elapsed")
 # construct a testset to render the test results
 o_ts = Test.DefaultTestSet("Overall")
 function with_testset(f, testset)
-    @static if VERSION >= v"1.13.0-DEV.1044"
+    return @static if VERSION >= v"1.13.0-DEV.1044"
         Test.@with_testset testset f()
     else
         Test.push_testset(testset)
@@ -350,7 +350,7 @@ with_testset(o_ts) do
             with_testset(resp) do
                 Test.record(o_ts, resp)
             end
-        elseif isa(resp, Tuple{Int,Int})
+        elseif isa(resp, Tuple{Int, Int})
             fake = Test.DefaultTestSet(testname)
             for i in 1:resp[1]
                 Test.record(fake, Test.Pass(:test, nothing, nothing, nothing, nothing))
@@ -387,7 +387,7 @@ with_testset(o_ts) do
             # the test runner itself had some problem, so we may have hit a segfault,
             # deserialization errors or something similar.  Record this testset as Errored.
             fake = Test.DefaultTestSet(testname)
-            Test.record(fake, Test.Error(:nontest_error, testname, nothing, Base.ExceptionStack([(exception=resp,backtrace=[])]), LineNumberNode(1)))
+            Test.record(fake, Test.Error(:nontest_error, testname, nothing, Base.ExceptionStack([(exception = resp, backtrace = [])]), LineNumberNode(1)))
             with_testset(fake) do
                 Test.record(o_ts, fake)
             end
@@ -396,7 +396,7 @@ with_testset(o_ts) do
     for test in tests
         (test in completed_tests) && continue
         fake = Test.DefaultTestSet(test)
-        Test.record(fake, Test.Error(:test_interrupted, test, nothing, Base.ExceptionStack([(exception="skipped",backtrace=[])]), LineNumberNode(1)))
+        Test.record(fake, Test.Error(:test_interrupted, test, nothing, Base.ExceptionStack([(exception = "skipped", backtrace = [])]), LineNumberNode(1)))
         with_testset(fake) do
             Test.record(o_ts, fake)
         end
@@ -405,7 +405,7 @@ end
 println()
 Test.print_test_results(o_ts, 1)
 if (VERSION >= v"1.13.0-DEV.1037" && !Test.anynonpass(o_ts)) ||
-   (VERSION < v"1.13.0-DEV.1037" && !o_ts.anynonpass)
+        (VERSION < v"1.13.0-DEV.1037" && !o_ts.anynonpass)
     println("    \033[32;1mSUCCESS\033[0m")
 else
     println("    \033[31;1mFAILURE\033[0m\n")
diff --git a/test/setup.jl b/test/setup.jl
index 38534e9..584712f 100644
--- a/test/setup.jl
+++ b/test/setup.jl
@@ -12,7 +12,7 @@ end
 using .FileCheck
 
 if VERSION >= v"1.13.0-DEV.1044"
-using Base.ScopedValues
+    using Base.ScopedValues
 end
 
 
@@ -65,8 +65,8 @@ function runtests(f, name)
     end
 
     old_print_setting = Test.TESTSET_PRINT_ENABLE[]
-    @static if VERSION >= v"1.13.0-DEV.1044"
-        @with Test.TESTSET_PRINT_ENABLE=>false begin
+    return @static if VERSION >= v"1.13.0-DEV.1044"
+        @with Test.TESTSET_PRINT_ENABLE => false begin
             inner()
         end
     else
diff --git a/test/spirv.jl b/test/spirv.jl
index 772531b..b50bc48 100644
--- a/test/spirv.jl
+++ b/test/spirv.jl
@@ -78,7 +78,7 @@ end
                                               backend, supports_fp16=false)) do msg
         occursin("unsupported use of half value", msg) &&
         occursin("[1] unsafe_store!", msg) &&
-        occursin(r"\[\d+\] kernel", msg)
+                    occursin(r"\[\d+\] kernel", msg)
     end
 
     @test_throws_message(InvalidIRError,
@@ -86,7 +86,7 @@ end
                                               backend, supports_fp64=false)) do msg
         occursin("unsupported use of double value", msg) &&
         occursin("[1] unsafe_store!", msg) &&
-        occursin(r"\[\d+\] kernel", msg)
+                    occursin(r"\[\d+\] kernel", msg)
     end
 end
 

@KristofferC KristofferC force-pushed the kc/fix_nightly_codeinfo branch from beda583 to cfe9111 Compare October 4, 2025 08:27
Copy link

codecov bot commented Oct 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.12%. Comparing base (6481ad9) to head (57c9188).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #725      +/-   ##
==========================================
+ Coverage   75.52%   76.12%   +0.60%     
==========================================
  Files          24       24              
  Lines        3538     3548      +10     
==========================================
+ Hits         2672     2701      +29     
+ Misses        866      847      -19     

☔ 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.

@KristofferC KristofferC force-pushed the kc/fix_nightly_codeinfo branch from d2b874c to 76f941b Compare October 4, 2025 10:33
@KristofferC
Copy link
Contributor Author

KristofferC commented Oct 4, 2025

For the Test problems, I guess either moving to using Base.runtests directly is a good idea (although I am not sure that is possible right now without some tweaks to it) or alternatively just update from there,

@maleadt
Copy link
Member

maleadt commented Oct 6, 2025

moving to using Base.runtests directly is a good idea

How is it reusable? I thought it only worked for running Base tests.

@KristofferC
Copy link
Contributor Author

Yeah, that's why I said

(although I am not sure that is possible right now without some tweaks to it)

LinearAlgebra uses it from its own repo: https://github.com/JuliaLang/LinearAlgebra.jl/blob/7b21cabb1e81b719e93ab612937c0ded809fbe6e/.ci/run_tests.jl#L8 and that barely works because julia considers it an stdlib. Some follow-up to JuliaLang/julia#56558 should make it possible to use it for packages as well.

@kshyatt
Copy link
Member

kshyatt commented Oct 6, 2025

For the push_testset stuff I think we can update based on what was already done for CUDA.jl and GPUArrays.jl, no? e.g. JuliaGPU/GPUArrays.jl#621

@kshyatt
Copy link
Member

kshyatt commented Oct 6, 2025

I'm making a PR to do that now

@maleadt
Copy link
Member

maleadt commented Oct 6, 2025

Sorry, didn't see your comment. I've put all the fixes in here. Some things in CUDA.jl and GPUArrays.jl were incorrect, fwiw.

@maleadt maleadt changed the title change call to codeinfo_for_const to work on newer nightlies Fixes for Julia nightly Oct 6, 2025
@maleadt maleadt force-pushed the kc/fix_nightly_codeinfo branch from eab97f2 to b8e9b29 Compare October 6, 2025 08:35
@maleadt maleadt force-pushed the kc/fix_nightly_codeinfo branch from 30a6a38 to 9a6487b Compare October 6, 2025 09:26
@maleadt maleadt force-pushed the kc/fix_nightly_codeinfo branch from 9a6487b to 57c9188 Compare October 6, 2025 09:44
@maleadt maleadt merged commit 4555002 into JuliaGPU:master Oct 6, 2025
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants