Skip to content

Conversation

@not-matthias
Copy link
Member

No description provided.

@not-matthias not-matthias requested review from art049 and Copilot October 6, 2025 13:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for running tests in packages declared as package main by implementing package name transformation and removing restrictions on main packages.

Key changes:

  • Remove validation that prevented importing main packages during benchmark discovery
  • Add package name transformation from "main" to "main_compat" in source patching
  • Add test case to verify the functionality works correctly

Reviewed Changes

Copilot reviewed 23 out of 24 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
go-runner/testdata/projects/example-with-main/ Test project demonstrating main package support with Go files and benchmarks
go-runner/src/builder/patcher.rs Added package name transformation from "main" to "main_compat"
go-runner/src/builder/discovery.rs Removed restriction preventing discovery of main packages
go-runner/src/integration_tests.rs Added test case for the new example-with-main project
Multiple snapshot files Updated test snapshots reflecting the package name changes

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@not-matthias not-matthias force-pushed the cod-1314-suport-tests-in-main-package-in-golang branch from 547833f to f5b4ab3 Compare October 6, 2025 13:04
@codspeed-hq
Copy link

codspeed-hq bot commented Oct 6, 2025

CodSpeed Performance Report

Merging #19 will not alter performance

Comparing cod-1314-suport-tests-in-main-package-in-golang (f5b4ab3) with main (d7de44a)

Summary

✅ 22 untouched

Copy link
Member

@art049 art049 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@not-matthias not-matthias merged commit f5b4ab3 into main Oct 6, 2025
10 checks passed
@not-matthias not-matthias deleted the cod-1314-suport-tests-in-main-package-in-golang branch October 6, 2025 14:33
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