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

pyre: init at 0.0.8 #43212

Merged
merged 1 commit into from Jul 10, 2018
Merged

pyre: init at 0.0.8 #43212

merged 1 commit into from Jul 10, 2018

Conversation

teh
Copy link
Contributor

@teh teh commented Jul 8, 2018

Motivation for this change

Working version of #40809

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • 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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

@FRidh
Copy link
Member

FRidh commented Jul 10, 2018

Thanks for packaging this, I've been wanting to try this tool as well. Please do move the expression from development/compilers to development/tools.

Do you happen to have any experience with https://github.com/Instagram/MonkeyType? Seems quite useful as well.

@teh
Copy link
Contributor Author

teh commented Jul 10, 2018

Done - also removed some function parameters that I had left in by accident.

Hadn't heard about MonkeyType but looks really interesting, thanks!

@xeji
Copy link
Contributor

xeji commented Jul 10, 2018

@GrahamcOfBorg build pyre

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: pyre

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Failure on aarch64-linux (full log)

Attempted: pyre

Partial log (click to expand)

-> stderr:
Fatal error: exception (runtime-lib/runtime.ml.E "comparison failed"
  ((switch true) vs (switch false) (Loc src/config/discover.ml:205:15)))
Raised at file "src/import0.ml" (inlined), line 351, characters 22-32
Called from file "src/configurator.ml", line 511, characters 13-22
Called from file "src/config/discover.ml", line 136, characters 2-1023
make: *** [Makefile:5: default] Error 1
builder for '/nix/store/m3bi9638igddmxajqk1gr58il9j0f5ix-ocaml4.06.1-core-0.11.1.drv' failed with exit code 2
cannot build derivation '/nix/store/abz0s4583d3z4h9g71mnyv4xsn9sb0jc-pyre-0.0.8.drv': 1 dependencies couldn't be built
error: build of '/nix/store/abz0s4583d3z4h9g71mnyv4xsn9sb0jc-pyre-0.0.8.drv' failed

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: pyre

Partial log (click to expand)

findlib: [WARNING] Interface topdirs.cmi occurs in several directories: /nix/store/ap53zfjybabp1zbwjjcjrw5c7nrl2166-ocaml-4.06.1/lib/ocaml/compiler-libs, /nix/store/ap53zfjybabp1zbwjjcjrw5c7nrl2166-ocaml-4.06.1/lib/ocaml
findlib: [WARNING] Interface main.cmi occurs in several directories: ., /nix/store/ap53zfjybabp1zbwjjcjrw5c7nrl2166-ocaml-4.06.1/lib/ocaml/compiler-libs
installing
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/sx7460l47a04gwyyid2icklm7ygz6r0x-pyre-0.0.8
shrinking /nix/store/sx7460l47a04gwyyid2icklm7ygz6r0x-pyre-0.0.8/bin/pyre
strip is /nix/store/4qvrxzxa535y8304mk195x50b6p9607d-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/sx7460l47a04gwyyid2icklm7ygz6r0x-pyre-0.0.8/bin
patching script interpreter paths in /nix/store/sx7460l47a04gwyyid2icklm7ygz6r0x-pyre-0.0.8
checking for references to /build in /nix/store/sx7460l47a04gwyyid2icklm7ygz6r0x-pyre-0.0.8...

@xeji xeji merged commit 17fe19f into NixOS:master Jul 10, 2018
@bbarker
Copy link
Contributor

bbarker commented Jul 20, 2018

I came across this error when trying to use it:

$ pyre check
Uncaught exception:
  
  (Sys_error "/etc/localtime: No such file or directory")

Raised by primitive operation at file "pervasives.ml", line 389, characters 28-54
Called from file "src/zone.ml", line 343, characters 21-49
Called from file "src/core_zone.ml", line 160, characters 6-73
Called from file "camlinternalLazy.ml", line 27, characters 17-27
Re-raised at file "camlinternalLazy.ml", line 34, characters 4-11
Called from file "log.ml", line 94, characters 15-36
Called from file "log.ml", line 113, characters 2-27
Called from file "src/list.ml", line 557, characters 34-40
Called from file "service/serviceParser.ml", line 177, characters 6-84
Called from file "service/serviceParser.ml", line 222, characters 14-50
Called from file "command/commandCheck.ml", line 89, characters 23-72
Called from file "command/commandCheck.ml", line 209, characters 22-49
Called from file "src/command.ml", line 2734, characters 6-97
Called from file "src/exn.ml", line 113, characters 6-10

I can't find many references to /etc/localtime in the nix context, which isn't surprising; neither my non-NixOS nix container has it, nor my NixOS VM.

@teh
Copy link
Contributor Author

teh commented Jul 21, 2018

Hm, that's interesting. I have

$ stat /etc/localtime 
  File: /etc/localtime -> /etc/zoneinfo/Europe/London
$ uname -a
Linux nixos 4.15.18 #1-NixOS SMP Thu Apr 19 06:55:13 UTC 2018 x86_64 GNU/Linux

A quick google didn't tell me whether a system without /etc/localtime is a reasonable system. If it is I think we should report this upstream (though I'm also not sure to which specific module)

@bbarker
Copy link
Contributor

bbarker commented Jul 22, 2018

@teh does nix-locate (https://unix.stackexchange.com/questions/252224/how-to-find-out-which-not-installed-package-a-file-belongs-to-on-nixos) provide any information about which package provides the file? If not, as a workaround, I can just find out what should be installed in the base OS I'm using (though that wouldn't help me on my NixOS installation).

@bbarker
Copy link
Contributor

bbarker commented Jul 23, 2018

I think we can likely resolve my above issue: on non NixOS systems, this should be installed through the base OS if possible; otherwise one might need to install tzdata through nix and set up the appropriate symbolic links manually. For instance, I installed it via Ubuntu's apt and this was fine. On NixOS, I believe I heard on IRC that installing tzdata, then doing a rebuild-switch should do the job, but I haven't tested this as yet.

@teh
Copy link
Contributor Author

teh commented Jul 23, 2018

I think it's provided here: https://github.com/NixOS/nixpkgs/blob/55bc53d1dd9f99e59a8f218e98b5e484e2e6eae8/nixos/modules/config/timezone.nix

and indeed I have time.timeZone = "Europe/London"; in my configuration.nix. I think this needs to be fixed upstream, but happy to accept PR with patch that stops ocaml logging from failing over if /etc/localtime doesn't exist.

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

5 participants