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

Error in documentation for foreign build sandboxing #3345

Open
samoht opened this issue Apr 9, 2020 · 1 comment
Open

Error in documentation for foreign build sandboxing #3345

samoht opened this issue Apr 9, 2020 · 1 comment
Labels
docs Documentation improvements

Comments

@samoht
Copy link
Member

samoht commented Apr 9, 2020

https://dune.readthedocs.io/en/latest/foreign-code.html#foreign-sandboxing is recommending to write this dune file:

(data_only_dirs libfoo)

(rule
 (deps (source_tree libfoo))
 (targets libfoo.a dllfoo.so)
 (action (progn
          (chdir libfoo (run make))
          (copy libfoo/libfoo.a libfoo.a)
          (copy libfoo/libfoo.so dllfoo.so)))

(library
 (name bar)
 (foreign_archives foo))

Otherwise this doesn't work as the copy stanzas will fail because the files do not exist before the build ir run, and dune complains that it doens't know how to build these.

@samoht samoht changed the title Error in documentation for Foreign build sandboxing Error in documentation for foreign build sandboxing Apr 9, 2020
@ghost
Copy link

ghost commented Apr 9, 2020

Indeed. We need to add a mode to disable targets/deps inference. Directory targets (#3316) would also help here.

@rgrinberg rgrinberg added the docs Documentation improvements label Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation improvements
Projects
None yet
Development

No branches or pull requests

2 participants