I don't think that the antivirus matters for two reasons:
- I work entirely on a dedicated volume that is excluded from the antivirus as it is meant strictly for development use only.
- I actually did these tests on machines using DevDrives which automatically excludes the volume from the AV interference as well.
Actually quite the opposite - antimony generates more files as it is generating static libraries and dynamic libraries as intermediates even.
SPM does not grant you control of the linkage model, nor does it use static or dynamic libraries but only object libraries. The simplex solver is a dependency for Swift/Win32, not antimony itself.
I think that what I have in mind might be quite a bit different. Namely, removal of Package.swift in favour of per-directory build files with explicit file lists and target definitions. This would be closer in some senses to bazel's BUILD files.
The bigger thing though is the fundamental removal of the concept of object libraries in the model. The user would have to define the library and whether it is static or dynamic and the library would be created. Additionally, the separation of a static and dynamic library, forcing multiple builds for each if necessary is core to the model.
The design decision that is important is supporting native paths. The model explicitly supports paths such as:
@swift-argument-parser//S:\SourceCache\apple\swift-argument-parser\Sources\ArgumentParserToolInfo\ToolInfo.swift
I do not know if there are possible concerns around completely changing the model from what is closer to Xcode's to something that is closer to CMake or Bazel's - namely working in terms of library and executable targets rather than the Xcode model of target and products. This would effectively remove the target and products and only deal with what are currently deemed "products".
I think that its reasonably easy to start with, but I also am likely a bad judge. To that end, let me share what something for building an executable would look like:
executable("sb") {
sources = [
"sb.swift",
]
deps = [
"@swift-argument-parser//:swift-argument-parser",
":antimony",
]
}
As to the difficulty of composability - I expect that this would likely fall into the same problem that bazel and buck do - they do not interact with other systems. You could do the same thing as them and overlay a file to build, but there wouldn't be a good way to interact with them. Although, in complete fairness, SPM does not interact with other build systems either - I cannot simply take a CMake project and use it with SPM nor can I just take a autotools project and use that with SPM.
The correct output is from antimony. The binary size differences is due to the proper use of static libraries over object libraries which allows for proper dead code elimination. SPM does not support libraries, it uses object libraries only as it is designed with the MachO format and ld64 in mind and does not always take into consideration ELF, COFF, WASM needs.
Sorry if it was unclear, the code size is for the products that are being built, not the tool. While that is important, I don't think that I am particularly concerned about that currently.
But you are pointing out rightly something that was implied - I was not looking at dependency management, only the build aspect. SPM does not really fetch code over HTTPS per se - it delegates that to git and just invokes it and does not package it or use a library.
The "non-build subcommands" are relatively tiny (and antimony does have a small one that accidentally leaked in the prototype - one to format the definitions). The build command itself generates a manifest and delegates to llbuild (which is dynamically linked).
In that sense, both of these tools do something similar in both of those cases - antimony assumes that something has cloned the dependencies where desired, and both delegate to other tools to build.
I think that you are missed what antimony does. All it does is take the jobs that the driver says it will execute and writes that out to a ninja specification. It does close to nothing other than reading the configuration to determine the libraries and executables. Everything is the result of the driver.
I don't know how much of it is "weird overhead" and how much of it is the model that SPM uses for building. IMO there is a lot more complexity in the SPM model of writing out a manifest that will be re-processed by llbuild to generate the commands.
I think that I would be happier with that assuming that we can easily change the design of SPM without having to worry about the implications for interactions with Xcode as this will fundamentally change the product/target model.