-
Notifications
You must be signed in to change notification settings - Fork 412
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
Forbid #require in dune files in OCaml syntax #938
Conversation
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
Signed-off-by: Jeremie Dimino <jeremie@dimino.org>
I looked at the projects using While we don't want to encourage the use of the OCaml syntax, we don't support enough yet to replace the current uses cases for it, so it doesn't seem worth making it difficult for users to switch from jbuilder to dune just because of not allowing |
let rec loop ic acc = | ||
match input_line ic with | ||
| exception End_of_file -> close_in ic; List.rev acc | ||
| line -> loop ic (line :: acc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move this to the Io
module? Note that I see so much opportunity for code reuse, but keeping the application code uncluttered is nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a trivial move since this is for plugins
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah, that's right. Bit of a shame.
let rec loop ic acc = | ||
match input_line ic with | ||
| exception End_of_file -> close_in ic; List.rev acc | ||
| line -> loop ic (line :: acc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yeah, that's right. Bit of a shame.
#require
was restricted to#require "unix"
a while ago as allowing files in OCaml syntax to load anything didn't seem right. We initially kept"unix"
as some projects were using it, but we can now forbid#require
entirely indune
files.Forbidding
unix
improves portability.