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

feat: Make server version available to front-ends #429

Merged
merged 4 commits into from
Oct 4, 2021

Conversation

erikmd
Copy link
Member

@erikmd erikmd commented Oct 3, 2021

This "future-proof PR" is needed to help interoperability in a loosely-coupled way,
so the latest learn-ocaml-client binary (& the learn-ocaml.el front-end depending on it) is compat. with learn-ocaml ↓ version "0.12".

There are now three possible commands:

  • learn-ocaml-client --version
  • learn-ocaml-client server-version
  • learn-ocaml-client server-version --min (the min of the previous two)

Note: the back-end API is unchanged by this PR.

erikmd and others added 4 commits October 3, 2021 02:32
* Usage: learn-ocaml-client server-version
     or: learn-ocaml-client server-version --min
     or: learn-ocaml-client server-version -s http://localhost:8080
     or: learn-ocaml-client server-version --local

* Also, ensure that the error
  """
  [ERROR] API request not supported by server v.%s using client v.%s
  Do you use the latest learn-ocaml-client binary?
  """
  is accompanied with 70 as exit code.

See also https://tldp.org/LDP/abs/html/exitcodes.html & /usr/include/sysexits.h
href: bc69958

Co-Authored-By: Léo Segond <leo.segond@master-developpement-logiciel.fr>
Co-Authored-By: Erik Martin-Dorel <erik.martin-dorel@irit.fr>
@erikmd
Copy link
Member Author

erikmd commented Oct 4, 2021

Let's close-reopen this one for CI just in case, as it deals with learn-ocaml-client

@erikmd erikmd closed this Oct 4, 2021
@erikmd erikmd reopened this Oct 4, 2021
@erikmd erikmd added this to the learn-ocaml 0.13.0 milestone Oct 4, 2021
@erikmd erikmd self-assigned this Oct 4, 2021
@erikmd erikmd merged commit d607281 into ocaml-sf:master Oct 4, 2021
@erikmd erikmd deleted the server-version branch October 4, 2021 22:23
@erikmd erikmd mentioned this pull request Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement Enhancement to an existing user-facing feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants