Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gopackagesdriver: separates "s" files in pkg info #3165

Merged
merged 1 commit into from
Jun 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions go/tools/gopackagesdriver/aspect.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,16 @@ def _go_archive_to_pkg(archive):
ExportFile = _file_path(archive.data.export_file),
GoFiles = [
_file_path(src)
for src in archive.data.orig_srcs
for src in archive.data.orig_srcs if not src.path.endswith(".s")
],
CompiledGoFiles = [
_file_path(src)
for src in archive.data.srcs
for src in archive.data.srcs if not src.path.endswith(".s")
],
SFiles = [
_file_path(src)
for src in archive.data.orig_srcs if src.path.endswith(".s")
]
)

def _make_pkg_json(ctx, archive, pkg_info):
Expand Down
2 changes: 2 additions & 0 deletions go/tools/gopackagesdriver/flatpackage.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ type FlatPackage struct {
Errors []FlatPackagesError `json:",omitempty"`
GoFiles []string `json:",omitempty"`
CompiledGoFiles []string `json:",omitempty"`
SFiles []string `json:",omitempty"`
OtherFiles []string `json:",omitempty"`
ExportFile string `json:",omitempty"`
Imports map[string]string `json:",omitempty"`
Expand Down Expand Up @@ -97,6 +98,7 @@ func WalkFlatPackagesFromJSON(jsonFile string, onPkg PackageFunc) error {
func (fp *FlatPackage) ResolvePaths(prf PathResolverFunc) error {
resolvePathsInPlace(prf, fp.CompiledGoFiles)
resolvePathsInPlace(prf, fp.GoFiles)
resolvePathsInPlace(prf, fp.SFiles)
resolvePathsInPlace(prf, fp.OtherFiles)
fp.ExportFile = prf(fp.ExportFile)
return nil
Expand Down