Skip to content

Conversation

gbaraldi
Copy link
Contributor

@gbaraldi gbaraldi commented Sep 5, 2025

We can change the names here but I've tested that this works (maybe we could register a callback and see if it gets invoked?)

Copy link
Contributor

github-actions bot commented Sep 5, 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/test/newpm.jl b/test/newpm.jl
index 68ae97c8..b2ea6070 100644
--- a/test/newpm.jl
+++ b/test/newpm.jl
@@ -409,31 +409,31 @@ end
     end
 end
 
-@testset "callbacks" begin
-    # just check that the callbacks can be registered and run without errors
-    @dispose ctx=Context() begin
-        # module callbacks
-        @dispose pb=NewPMPassBuilder() mod=test_module() begin
-            run!("PipelineStartCallbacks", mod) === nothing
-        end
-        @dispose pb=NewPMPassBuilder() mod=test_module() begin
-            run!(PipelineStartCallbacks(), mod) === nothing
-        end
-        # CGSCC callback
-        @dispose pb=NewPMPassBuilder() mod=test_module() begin
-            run!("CGSCCOptimizerLateCallbacks", mod) === nothing
-        end
-        @dispose pb=NewPMPassBuilder() mod=test_module() begin
-            run!(CGSCCOptimizerLateCallbacks(), mod) === nothing
-        end
-        # function callbacks
-        @dispose pb=NewPMPassBuilder() mod=test_module() begin
-            run!("PeepholeCallbacks", mod) === nothing
-        end
-        @dispose pb=NewPMPassBuilder() mod=test_module() begin
-            run!(PeepholeCallbacks(), mod) === nothing
+    @testset "callbacks" begin
+        # just check that the callbacks can be registered and run without errors
+        @dispose ctx = Context() begin
+            # module callbacks
+            @dispose pb = NewPMPassBuilder() mod = test_module() begin
+                run!("PipelineStartCallbacks", mod) === nothing
+            end
+            @dispose pb = NewPMPassBuilder() mod = test_module() begin
+                run!(PipelineStartCallbacks(), mod) === nothing
+            end
+            # CGSCC callback
+            @dispose pb = NewPMPassBuilder() mod = test_module() begin
+                run!("CGSCCOptimizerLateCallbacks", mod) === nothing
+            end
+            @dispose pb = NewPMPassBuilder() mod = test_module() begin
+                run!(CGSCCOptimizerLateCallbacks(), mod) === nothing
+            end
+            # function callbacks
+            @dispose pb = NewPMPassBuilder() mod = test_module() begin
+                run!("PeepholeCallbacks", mod) === nothing
+            end
+            @dispose pb = NewPMPassBuilder() mod = test_module() begin
+                run!(PeepholeCallbacks(), mod) === nothing
+            end
         end
     end
-end
 
 end

@vchuravy
Copy link
Collaborator

vchuravy commented Sep 5, 2025

Would it make sense to open a PR upstream and ask for feedback?

@gbaraldi
Copy link
Contributor Author

gbaraldi commented Sep 5, 2025

I think so.

But we also need this here anyway.

@vchuravy
Copy link
Collaborator

vchuravy commented Sep 5, 2025

Sure, but before we commit to the API. Maybe we get lucky with a quick review ;)

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.

2 participants