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

Round the results of some floating-point doctests #76

Merged
merged 1 commit into from
Mar 1, 2019
Merged

Conversation

RyanGlScott
Copy link
Collaborator

This should make the results consistent enough to work across multiple implementations of libc. Fixes #73.

This should make the results consistent enough to work across
multiple implementations of `libc`. Fixes #73.
@RyanGlScott
Copy link
Collaborator Author

@nh2, can you confirm if the tests pass for you with musl using this PR?

@nh2
Copy link

nh2 commented Mar 1, 2019

@RyanGlScott I can't tell, I get this odd import error:

Test suite doctests: RUNNING...
/build/source/src/Numeric/AD.hs:177: failure in expression `import Numeric.AD.Internal.Doctest'
expected: 
 but got: 
          <no location info>: error:
              Could not find module ‘Numeric.AD.Internal.Doctest’
              Perhaps you meant
                Numeric.AD.Internal.Dense (from ad-4.3.5)
                Numeric.AD.Internal.Tower (from ad-4.3.5)
                Numeric.AD.Internal.Forward (from ad-4.3.5)

Even with nh2@97a3bc0 applied on top. The parent commit of this PR, commit be71c10, continues to show the doctest test failure, so it really seems that this PR somehow results in Numeric.AD.Internal.Doctest not being visible.

Any idea?

nh2 added a commit to nh2/static-haskell-nix that referenced this pull request Mar 1, 2019
@nh2
Copy link

nh2 commented Mar 1, 2019

Ah, the line

Compiling Numeric.AD.Internal.Doctest ( src/Numeric/AD/Internal/Doctest.hs, dist/build/Numeric/AD/Internal/Doctest.o )

was even missing from the compiler output.

I suspect this is because I tried to try your PR using

ad = pkgs.haskell.lib.overrideCabal super.ad (old: {
  src = pkgs.fetchFromGitHub {
    owner = "nh2";
    repo = "ad";
    rev = "97a3bc0883b97604351396f884df847ebb1b284c"; # fixed
    sha256 = "1q707cid6wgbz9n3mkvwq2ccq14sbmyajakv9dxk830vwa4s7pnw"; # fixed
  };
});

and that keeps the old cabal file, with its modules?

Using callCabal2nix made it work:

      ad = self.callCabal2nix "ad" (pkgs.fetchFromGitHub {
        owner = "ekmett";
        repo = "ad";
        rev = "d35d76738498dd2cedebeaa9a03c471fd5e5e2da";
        sha256 = "0c7wca9xysyf973nxr9vwkd512xkmp6nwjg9grb4s434sfjxhfmb";
      }) {};

This works for your PR directly, without my extra patch on top that puts it into exposed-modules.

I've tested it on nh2/static-haskell-nix@eda03f4 with command NIX_PATH=nixpkgs=https://github.com/NixOS/nixpkgs/archive/88ae8f7d.tar.gz nix-build --no-link survey/default.nix -A haskellPackages.ad.

can you confirm if the tests pass for you with musl using this PR?

Yes. 👍

@RyanGlScott
Copy link
Collaborator Author

Excellent! I'll prepare a Hackage release with this fix soon.

@RyanGlScott RyanGlScott merged commit ee3964b into master Mar 1, 2019
@RyanGlScott
Copy link
Collaborator Author

ad-4.3.6

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

Successfully merging this pull request may close these issues.

2 participants