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

file-depends support #8686

Open
rgrinberg opened this issue Sep 18, 2023 · 3 comments
Open

file-depends support #8686

rgrinberg opened this issue Sep 18, 2023 · 3 comments

Comments

@rgrinberg
Copy link
Member

Opam is allowed to include files and their checksums in <pkgname.config>. E.g.:

file-depends: [
  [ "/foo/bar" "checksum" ]
]

This is basically a dynamic dependency mechanism like in our dynamic action plugin. We can discard the hash and just add a dependency on the file in question.

@Alizter
Copy link
Collaborator

Alizter commented Sep 25, 2023

When do we add the dependency? The .config files exist in the sources of the repos themselves, sometimes even being generated using .in files.

This means that we cannot add this dependency in the lock file for the package. The build step could generate the config files so it might be possible to include the dependency then. Or the install step might be an ideal place to do it.

@rgrinberg
Copy link
Member Author

When do we add the dependency?

Right after the .config file is parsed. Which I think is done when we create the build cookie.

@Alizter
Copy link
Collaborator

Alizter commented Oct 29, 2023

As an update I had a go at this, but from what I understand there doesn't seem to be a way to add dynamic dependencies to custom actions. Notably, dune_action_plugin is using it's own thing. There appears to be a CR in action_intf about adding such a "needs more dependencies" result in the action part of a custom action.

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

No branches or pull requests

2 participants