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

dot-merlin-reader: init at 3.4.0 #98603

Merged
merged 1 commit into from Sep 25, 2020

Conversation

hongchangwu
Copy link
Contributor

@hongchangwu hongchangwu commented Sep 24, 2020

Motivation for this change

dot-merlin-reader is a new dependency for merlin 3.4.0 (which I plan to do in a separate PR). It serves as an external config provider for merlin. The intention is that future versions of merlin will be able to source config from different providers (e.g., dune).

Reference PRs:

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions: Ubuntu
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@hongchangwu
Copy link
Contributor Author

cc @vbgl

@vbgl
Copy link
Contributor

vbgl commented Sep 24, 2020

Does this need to be part of ocamlPackages? I.e, does the version of OCaml used to build the dot-merlin-reader binary matters?

If not, please move it out of that set. This will make it easier to use dot-merlin-reader with OCaml < 4.08.

@hongchangwu
Copy link
Contributor Author

hongchangwu commented Sep 24, 2020

@vbgl that's a good point, I don't think the OCaml version matters. AFAICT the sole responsibility of dot-merlin-reader is to read .merlin files.

The only requirement is that the version of dot-merlin-reader has to match merlin: https://opam.ocaml.org/packages/merlin/merlin.3.4.0/

@vbgl
Copy link
Contributor

vbgl commented Sep 24, 2020

I fear that the opam description does not tell you about this kind of constraints.

The dot-merlin-reader has at least one more responsibility: communicate (what has been read in the .merlin files) to merlin. It might be the case that the communication protocol rely on OCaml built-in serialization (aka marshaling) — which would be unfortunate…

@hongchangwu
Copy link
Contributor Author

Took a look at the protocol, it uses csexp for serialization/de-serialization so should be independent of the version of OCaml used.

@vbgl
Copy link
Contributor

vbgl commented Sep 25, 2020

Thanks for investigating. Then, please do move dot-merlin-reader out of the ocamlPackages attribute set.

@hongchangwu hongchangwu changed the title ocamlPackages.dot-merlin-reader: init at 3.4.0 dot-merlin-reader: init at 3.4.0 Sep 25, 2020
@hongchangwu
Copy link
Contributor Author

Done and updated title.

@vbgl
Copy link
Contributor

vbgl commented Sep 25, 2020

@GrahamcOfBorg build dot-merlin-reader

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants