Skip to content

Conversation

@not-matthias
Copy link
Member

Fixes #22

@not-matthias not-matthias force-pushed the cod-1499-error-running-action-for-go branch from d55e56f to a717729 Compare October 14, 2025 15:34
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 fixes an issue where the Go runner incorrectly processes directories ending with .go as if they were Go source files. The fix adds a check to skip directories when patching imports, preventing errors when projects contain folders with names like vendor/github.com/nats-io/nats.go or some_package.go.

  • Added validation to skip directories in the glob pattern matching
  • Added comprehensive test coverage with a new test project containing a .go folder
  • Updated integration tests to verify the fix works correctly

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
go-runner/src/builder/patcher.rs Added directory check to skip non-file paths in glob results
go-runner/src/integration_tests.rs Added test case for the new example project
go-runner/testdata/projects/example-with-dot-go-folder/go.mod Test project module definition
go-runner/testdata/projects/example-with-dot-go-folder/bench_test.go Root-level benchmark test for the test project
go-runner/testdata/projects/example-with-dot-go-folder/some_package.go/bench_test.go Benchmark test inside the .go folder to verify the fix
go-runner/src/snapshots/codspeed_go_runner__integration_tests__assert_results_snapshots@example-with-dot-go-folder.snap Expected test output snapshot

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

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 14, 2025

CodSpeed Performance Report

Merging #21 will degrade performances by 27.91%

Comparing cod-1499-error-running-action-for-go (a717729) with main (83d8105)

Summary

❌ 1 regression
✅ 23 untouched

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
BenchmarkLargeSetupInLoop 31 ns 43 ns -27.91%

@not-matthias not-matthias merged commit a717729 into main Oct 14, 2025
12 of 13 checks passed
@not-matthias not-matthias deleted the cod-1499-error-running-action-for-go branch October 14, 2025 15:59
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.

Error running action for go

3 participants