Add test for module without packages, but sources, in workspace

This commit is contained in:
Michael B. Gale
2024-10-07 12:21:18 +01:00
parent 22f6af8145
commit f61635a08c
4 changed files with 34 additions and 1 deletions

View File

@@ -13,7 +13,7 @@
}
}
{
"markdownMessage": "Go files were found outside of the Go modules corresponding to these `go.mod` files.\n\n`workspace/subdir/go.mod`, `module/go.mod`",
"markdownMessage": "Go files were found outside of the Go modules corresponding to these `go.mod` files.\n\n`workspace/subdir/go.mod`, `module/go.mod`, `no-packages/go.mod`",
"severity": "note",
"source": {
"extractorName": "go",
@@ -26,3 +26,17 @@
"telemetry": true
}
}
{
"markdownMessage": "The following 1 Go project could not be extracted successfully:\n\n`no-packages`\n",
"severity": "warning",
"source": {
"extractorName": "go",
"id": "go/autobuilder/extraction-failed-for-project",
"name": "Unable to extract some Go projects"
},
"visibility": {
"cliSummaryTable": true,
"statusPage": true,
"telemetry": true
}
}

View File

@@ -0,0 +1,3 @@
This folder contains a Go module and a Go source file, but no packages will be extracted due to build constraints.
Overall extraction should still succeed, because there are other Go modules in this workspace for which we are able to extract files.

View File

@@ -0,0 +1,5 @@
go 1.22
toolchain go1.22.0
module module

View File

@@ -0,0 +1,11 @@
//go:build unit
package subdir
import (
"fmt"
)
func test() {
fmt.Print("Hello world")
}