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

Use write-file instead of bash in dune action #158

Closed
vitoyucepi opened this issue Sep 26, 2023 · 1 comment
Closed

Use write-file instead of bash in dune action #158

vitoyucepi opened this issue Sep 26, 2023 · 1 comment
Labels
forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system.

Comments

@vitoyucepi
Copy link

Summary

Is it possible to use write-file action instead of bash?

base/src/dune

Lines 29 to 30 in 448ea48

(rule (targets ocamlopt-flags) (deps)
(action (bash "echo '()' > ocamlopt-flags")))

--- a/src/dune
+++ b/src/dune
@@ -27,4 +27,4 @@
 (documentation)
 
 (rule (targets ocamlopt-flags) (deps)
- (action (bash "echo '()' > ocamlopt-flags")))
\ No newline at end of file
+ (action (write-file ocamlopt-flags "()")))

Additional

If write-file is not feasible, perhaps run sh can be used instead?

--- a/src/dune
+++ b/src/dune
@@ -27,4 +27,4 @@
 (documentation)
 
 (rule (targets ocamlopt-flags) (deps)
- (action (bash "echo '()' > ocamlopt-flags")))
\ No newline at end of file
+ (action (run sh "echo '()' > ocamlopt-flags")))
@vitoyucepi vitoyucepi changed the title Use write-file instead of bash in dune action Use write-file instead of bash in dune action Sep 26, 2023
@github-iron github-iron added the forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system. label Sep 29, 2023
@dkalinichenko-js
Copy link
Contributor

Hi! Our dune build rules are auto-generated from our internal jenga build-rules, and it's unlikely we'll support non-bash actions there. We can manually override some of those to use non-bash actions, but we generally only do so for Windows support. Thanks for your contribution nonetheless!

@dkalinichenko-js dkalinichenko-js closed this as not planned Won't fix, can't repro, duplicate, stale Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwarded-to-js-devs This report has been forwarded to Jane Street's internal review system.
Projects
None yet
Development

No branches or pull requests

3 participants