Skip to content
This repository was archived by the owner on Aug 11, 2021. It is now read-only.
This repository was archived by the owner on Aug 11, 2021. It is now read-only.

Extracting package source for a different platform may cause errors #526

@markfinal

Description

@markfinal

This is demonstrated on Windows with the VulkanTriangle test from the bam-graphicssdk package repository.

That test, depends on the VulkanSDK, which on macOS, depends on the MoltenVK package. The tar source for MoltenVK contains symlinked files, which BuildAMation uses the Mono.Posix.NETStandard NuGet to extract. This fails to work on Windows:

(System.EntryPointNotFoundException) Unable to find an entry point named 'Mono_Posix_Syscall_getcwd' in DLL 'MonoPosixHelper'.

   at Mono.Unix.Native.Syscall.getcwd(StringBuilder buf, UInt64 size)
   at Mono.Unix.UnixDirectoryInfo.GetCurrentDirectory()
   at Mono.Unix.UnixPath._GetFullPath(String path)
   at Mono.Unix.UnixFileSystemInfo..ctor(String path)
   at Bam.Core.PackageSource.<>c.<DownloadAndExtractPackageViaHTTP>b__40_2(String sourcePath, String targetPath) in C:\dev\BuildAMation\Bam.Core\Package\PackageSource.cs:line 314

The packages are referenced in the build scripts for the test, so this cannot be avoided. But when the build runs, there should be no modules referenced on Windows to do with MoltenVK, so there is no need for the archived source of that package.

Unfortunately, the download and extraction currently works off of the package definition file requirements, i.e. the first sentence of the previous paragraph.

It should really work off the second sentence.
In doing so, it would delay the build further on the first build, should package source archives need to be downloaded and extracted.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions