Skip to content

go-framework: fail early when no Go sources are present - #1114

Open
gcomneno wants to merge 1 commit into
canonical:mainfrom
gcomneno:fix/go-framework-missing-go-sources
Open

go-framework: fail early when no Go sources are present#1114
gcomneno wants to merge 1 commit into
canonical:mainfrom
gcomneno:fix/go-framework-missing-go-sources

Conversation

@gcomneno

Copy link
Copy Markdown
Contributor

This change makes the go-framework extension validate that the project contains at least one Go source file.

Motivation: projects with a go.mod but no .go files can otherwise reach later stages and fail with lower-level errors.

Unit tests were updated to add a minimal main.go in valid test cases.

@gcomneno
gcomneno requested a review from tigarmo as a code owner February 26, 2026 17:32
@gcomneno
gcomneno force-pushed the fix/go-framework-missing-go-sources branch from 23901c7 to 6297d0c Compare March 17, 2026 10:20
@gcomneno
gcomneno force-pushed the fix/go-framework-missing-go-sources branch from 6297d0c to 08a57ef Compare May 24, 2026 16:07
@gcomneno

Copy link
Copy Markdown
Contributor Author

Hi! Just gently following up on this one.

I rebased the branch onto current upstream/main and re-ran the focused checks locally:

  • uv run --group dev python -m pytest -q tests/unit/extensions/test_go.py -rs
  • uv run --group lint --group types ruff check rockcraft/extensions/go.py tests/unit/extensions/test_go.py
  • uv run --group lint --group types ruff format --check rockcraft/extensions/go.py tests/unit/extensions/test_go.py

The focused test run passes with 16 passed, and Ruff is clean.

Happy to adjust anything else if useful.

@gcomneno

Copy link
Copy Markdown
Contributor Author

Friendly ping on this PR. It has been idle for a while, and it should still be ready from my side.

Please let me know if you would like me to rebase, refresh the checks, or adjust anything else.

Thanks!

@gcomneno
gcomneno force-pushed the fix/go-framework-missing-go-sources branch from 08a57ef to dd7a846 Compare July 31, 2026 10:15
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.

1 participant