# Deprecate ocamlc -vmthread #2038

Merged
merged 4 commits into from Sep 13, 2018

## Conversation

Projects
None yet
4 participants
Member

### diml commented Sep 10, 2018

 As discussed on caml-devel, this PR deprecates the otherlibs/threads library. It does so by deprecating the -vmthread command line flag of ocamlc.

Contributor

### dbuenzli commented Sep 10, 2018

 git grep vmthread will suggest where the manual needs to be updated ;-)

### dbuenzli reviewed Sep 10, 2018

 let vmthread_deprecated_message = "\ The -vmthread argument of ocamlc is deprecated\n\ and will soon be abandoned. For VM-level scheduling, consider using a\n\ third-party library such as Lwt. Otherwise, please switch to system\n\

#### dbuenzli Sep 10, 2018

Contributor

I don't find the mention of Lwt particularly enlighting here since IIRC vm-thread actually implemented a compatibility layer for the system threads library.

#### xavierleroy Sep 10, 2018

Contributor

I think it is useful to mention LWT, but perhaps in position number 2? E.g.

The -vmthread argument of ocamlc is deprecated\n
which have the same API. Lightweight threads with VM-level scheduling\n
are provided by third-party libraries such as Lwt, but with a different API.

 @@ -142,6 +142,12 @@ module Options = Main_args.Make_bytecomp_options (struct let anonymous = anonymous end) let vmthread_deprecated_message = "\ The -vmthread argument of ocamlc is deprecated\n\ and will soon be abandoned. For VM-level scheduling, consider using a\n\

#### dbuenzli Sep 10, 2018

Contributor

isn't "soon abandoned" synonym with "deprecated" ?

#### pmetzger Sep 10, 2018

Member

It's close enough to a synonym. "removed" would be a better word.

#### xavierleroy Sep 10, 2018

Contributor

+1 for "removed".

#### dbuenzli Sep 10, 2018

Contributor

What I meant is that one could simply say "VM-threads are deprecated".

#### diml Sep 11, 2018

Author Member

I guess the information that is missing is when the feature will indeed be removed. We don't have to specify it, but in general it is useful for users to know this.

Contributor

### dbuenzli commented Sep 10, 2018

 xref MPR7687.
 Deprecate -vmthread 
 7cad870 

Member Author

### diml commented Sep 11, 2018

 Thanks, I updated the deprecation message and the manual.
 Update tests 
 80d7331 
Contributor

### dbuenzli commented Sep 11, 2018

 Sorry to bother you on such trivial matters but could you please indicate the version where it was deprecated in the manual, release notes are sometimes a bit difficult to skim through or not readily at hand. Also maybe update the title of the PR it's a bit misleading.
 code review 
 2c575d3 

Member Author

### diml commented Sep 11, 2018

 Sure, no problem. I added the version number in the error message as well since it seems useful to have it as soon as we get an error.
Member Author

### diml commented Sep 12, 2018

 Is this good to merge then?

Contributor

### xavierleroy left a comment

 Looks good to me and ready for merging. Thanks!

### dbuenzli reviewed Sep 12, 2018

 @@ -707,7 +707,7 @@ Useful to debug C library problems. \comp{% \item["-vmthread"] Compile or link multithreaded programs, in combination with the Deprecated. Compile or link multithreaded programs, in combination with the

#### dbuenzli Sep 12, 2018 • edited

Contributor

Still missing the version number here.

Author Member

Contributor

### dbuenzli left a comment

 The rest is ok.
 Add missing version 
 a5c5268 

### diml merged commit ee3730f into ocaml:trunk Sep 13, 2018 0 of 2 checks passed

#### 0 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

Merged

Closed