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

ocamlPackages.merlin: 3.3.9 -> 3.4.0 #98816

Merged
merged 1 commit into from Oct 4, 2020
Merged

Conversation

@hongchangwu
Copy link
Contributor

@hongchangwu hongchangwu commented Sep 26, 2020

Motivation for this change

https://discuss.ocaml.org/t/ann-merlin-3-4-0-introducing-external-configuration-readers/6446

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): 407972720 -> 419151640
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
@hongchangwu
Copy link
Contributor Author

@hongchangwu hongchangwu commented Sep 26, 2020

cc @vbgl

@vbgl
Copy link
Contributor

@vbgl vbgl commented Sep 27, 2020

This removes merlin for OCaml versions below 4.08. This is quite a regression, isn’t it? It might be better to first fix csexp for OCaml < 4.08 and then update merlin.

@hongchangwu
Copy link
Contributor Author

@hongchangwu hongchangwu commented Sep 27, 2020

@vbgl you are quite right, I forgot to update minimumOCamlVersion when I updated csexp in #98527. Opened #98957 to fix it.

@hongchangwu hongchangwu force-pushed the hongchangwu:merlin-3.4.0 branch from b7c0494 to e3467bd Sep 27, 2020
src = ./fix-paths.patch;
dot_merlin_reader = "${dot-merlin-reader}/bin/dot-merlin-reader";
dune = "${dune_2}/bin/dune";
})

This comment has been minimized.

@vbgl

vbgl Oct 2, 2020
Contributor

What’s the rationale for this patch? IIUC, merlin uses either dune or dot-merlin-reader depending on the development environment: it should be able to find them in the PATH when needed.

This comment has been minimized.

@hongchangwu

hongchangwu Oct 3, 2020
Author Contributor

This ensures that merlin is able to find dune or dot-merlin-reader even if they are not on the PATH (e.g. if the user only has merlin in systemPackages).

Both dot-merlin-merlin and dune are runtime dependencies of merlin. As far as I understand runtime dependencies of executable needs special handling in Nix, either by patching the source or wrapping the executable.

This comment has been minimized.

@vbgl

vbgl Oct 3, 2020
Contributor

Indeed, but each user only needs one of them: if you use dune rather than .merlin files, do you want to afford dot-merlin-reader in your PATH?

This comment has been minimized.

@hongchangwu

hongchangwu Oct 3, 2020
Author Contributor

but each user only needs one of them:

That's true on a project level, but I don't think that's a decision we can make at build time. Right now the logic is roughly: if .merlin files are present, use dot-merlin-reader, otherwise use dune. So one project may need dot-merlin-reader, while another needs dune.

I definitely think we should patch the path of dot-merlin-reader, because that's not something that a user will likely have on his PATH and the vast majority of projects still use .merlin files. For dune it is debatable, you can argue if you are building a Dune project, you should already have dune on your PATH.

This comment has been minimized.

@vbgl

vbgl Oct 4, 2020
Contributor

Thanks for your detailed and convincing answer.

@hongchangwu
Copy link
Contributor Author

@hongchangwu hongchangwu commented Oct 3, 2020

@GrahamcOfBorg build ocaml-ng.ocamlPackages_4_02.merlin ocaml-ng.ocamlPackages_4_08.merlin

@vbgl vbgl merged commit 4304c70 into NixOS:master Oct 4, 2020
18 checks passed
18 checks passed
tests tests
Details
action
Details
ocaml-ng.ocamlPackages_4_02.merlin, ocaml-ng.ocamlPackages_4_08.merlin on aarch64-linux No attempt
Details
Evaluation Performance Report Evaluator Performance Report
Details
Wait for ofborg
Details
grahamcofborg-eval ^.^!
Details
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="e3467bd"; rev="e3467bd1cb4d557a63c2c052dd44de2cf67dc715"; } ./pkgs/t
Details
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="e3467bd"; rev="e3467bd1cb4d557a63c2c052dd44de2cf67dc715"; } ./nixos/
Details
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="e3467bd"; rev="e3467bd1cb4d557a63c2c052dd44de2cf67dc715"; } ./nixos/
Details
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="e3467bd"; rev="e3467bd1cb4d557a63c2c052dd44de2cf67dc715"; } ./nixos/
Details
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="e3467bd"; rev="e3467bd1cb4d557a63c2c052dd44de2cf67dc715"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="e3467bd"; rev="e3467bd1cb4d557a63c2c052dd44de2cf67dc715"; } ./pkgs/t
Details
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="e3467bd"; rev="e3467bd1cb4d557a63c2c052dd44de2cf67dc715"; } ./pkgs/t
Details
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
ocaml-ng.ocamlPackages_4_02.merlin, ocaml-ng.ocamlPackages_4_08.merlin on x86_64-linux Success
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.