Skip to content

threads and mt predicate #96

@bobot

Description

@bobot

The mt predicate is forced by jbuilder.

let preds = ["ppx_driver"; "mt"; "mt_posix"] in

What is the rational for that? For example Lablgtk can be used without threads, jbuilder force the user to use them (or perhaps it change nothing when you don't use them).

ocamlfind has some heuristics for adding missing threads dependency (eg. lablgtk with mt doesn't depend on thread):

let fixup_thread_needed_1 predlist =
  (* When the thread fixup is required to apply, 1st criterion *)
  List.mem "mt" predlist
;;

let fixup_thread_needed_2 pkg =
  (* When the thread fixup is required to apply, 2nd criterion *)
  (pkg <> "unix" && pkg <> "threads" && not (has_prefix pkg "threads."))
;;

It seems to me that jbuilder doesn't have them, even if ,maybe by chance , program that use lablgtk and threads can be linked well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions