-
Notifications
You must be signed in to change notification settings - Fork 63
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
Consistent, predictable, simplified build steps #87
Comments
I've seen other tools deal with that problem by providing a install script which works across different distributions and operating systems. That is the case for e.g. Alternatively, in the past I've used containers to set up reproducible build procedures. Something like the following: # build zigup inside of a Docker image
docker build --tag zigup-builder .
# create a temporary container
docker container create --name tmp zigup-builder
# pull the built zigup from the container
docker container cp tmp:/zigup . I don't think that using containers is necessary, but it might be easier that way. Notably, this is the approach that cross takes and it works pretty well for them. |
Me too, here's the latest proposal for a standardized way of doing this: ziglang/zig#14475 Outside of having a standard, any mechanism we choose will be non-standard and require developers to read the documentation and/or scrub the codebase to figure out what version they'll need. Before standard is set, the simplest/most obvious way to do this in my mind is to document the version in the README which I'd be willing to maintain.
This isn't really a solvable problem, you always have to start with something. The best you can do is make that "thing" you need to start with the simplest/easiest thing to setup as possible (or even better, likely to already be setup). We currently have 2 main methods to get started with zigup, either you can download a prebuilt zig archive, or you could download a prebuilt zigup binary. Both these are relatively simple to do, but, I'd be open to making improvements on these workflows such as providing convenient scripts to set them up for you. By switching to docker we've introduced a relatively large dependency in comparison to what we have now that requires more setup/system integration. Docker is large and requires interaction with your system including networking, namespacing, daemons, elevated privileges etc. One option is to support Docker in addition to our current methods, but, if we accepted that reasoning alone to add new bootstrap methods then we'd have an endless sea of bootstrap frameworks to support (CMake/Meson/Bazel/Npm/Nuget/Docker/RunC/etc). So we have to evaluate each one on a case-by-case basis. A strong argument in favor of each one would be how popular/ubiquitous it is. I think this would be a strong argument for a BASH script used in combination with a set of HTTP client tools like curl/wget/etc. |
This is indeed my intent. Sorry if it wasn't clear enough.
While that is true, it's also possible to build Dockerfiles with
That's the approach taken by e.g. Perhaps there could be a Python script which: 1 - Downloads the Zig toolchain (Python provides an HTTP client and That could be good enough for most users. On the other hand, using a Dockerfile saves us the trouble of maintaining said script. |
I think it would be valuable for there to be a way of building
zigup
without having to guess which compiler version is compatible with it. Even better would be to have be a singlebuild
command which sets up all the required build tools and produces the binary regardless of which operating system is used. I understand that this "single build command" is supposed to bezig build
, but I need to have a workingzig
installation for that, which is what this tool is supposed to help me with (i.e. a "chicken and egg situation").The text was updated successfully, but these errors were encountered: