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

Dependency types and specification #5

Open
staticfloat opened this issue May 20, 2024 · 0 comments
Open

Dependency types and specification #5

staticfloat opened this issue May 20, 2024 · 0 comments

Comments

@staticfloat
Copy link
Member

We should think clearly about how we want to specify dependencies. I believe there are three important axes for dependency specification:

  1. PkgSpec -- We need to specify what to install, obviously. This could just be a name, like "Glibc_jll", or a full PkgSpec to install a particular version or URL/branch.
  2. Platform -- We need to specify whether this is for the target or the host.
  3. Packaging links -- We need to specify whether this dependency is a dependency of the packaged JLL or not.

In BB1, (2) and (3) are determined by using Dependency()/HostDependency() or BuildDependency()/HostBuildDependency(). I am not a huge fan of this because it feels rather messy to be constantly filtering/unwrapping dependency object types, and also because I want to be able to tackle horrendously complicated builds like a Canadian Cross in BB2. In such a case, there are three separate platforms at play, the host of the current machine, the host of the machine that will eventually run our compiler, and the host that will run the output of the generated compiler. So I would like a fully-generic solution that does not have special Host types.

How BB2 works right now

Right now, there is a JLLSource(pkgspec, platform) method that takes in a platform object as well, so it is fully-specified from the get-go. (example) BB2's BuildConfig takes in two separate lists of JLL sources, one called target_dependencies and one called host_dependencies. This is already not what I want w.r.t. the ability to do a canadian cross.

Also, most users won't use the BuildConfig API, they'll use build_tarballs() which has convenience methods like JLLSource(pkgspec) that will automatically cycle through the list of platforms passed in to build_tarballs() so as to be target dependencies, and automatically get included in JLL output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant