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

Cannot apply patches to hmatrix because of modified line endings in Cabal revision #302

Open
nh2 opened this issue May 17, 2019 · 12 comments

Comments

@nh2
Copy link
Contributor

nh2 commented May 17, 2019

I wanted to use the patch from #301 on my nix-based build, but the build fails with:

Replace Cabal file with edited version from mirror://hackage/hmatrix-0.19.0.0/revision/1.cabal.
applying patch /nix/store/2lf83g48pd79lkv1gg639ivbmcjbkvvb-hmatrix-Allow-disabling-random_r-usage-manually.patch
patching file hmatrix.cabal
Hunk #1 FAILED at 36 (different line endings).
Hunk #2 FAILED at 99 (different line endings).
2 out of 2 hunks FAILED -- saving rejects to file hmatrix.cabal.rej

This is because the .cabal file was modified in https://hackage.haskell.org/package/hmatrix-0.19.0.0/revisions/ which changed all original \n line endings to \r\n, which means a patch working on hmatrix git master no longer works on hmatrix on Hackage.

This breaks my workflow.

Could you fix the cabal file on Hackage, so that the version on Hackage is the same as on Github?

Thanks!

@idontgetoutmuch
Copy link
Member

This is very frustrating - I'll have to investigate what happened with line endings.

@nh2
Copy link
Contributor Author

nh2 commented Jun 30, 2019

@idontgetoutmuch Was it intended that the above commit closes this ticket?

@idontgetoutmuch
Copy link
Member

Yes for reasons best known to itself, github truncated the commit message

@nh2
Copy link
Contributor Author

nh2 commented Jun 30, 2019

Well, may you reveal to me what the message was then? 😁

@nh2
Copy link
Contributor Author

nh2 commented Jun 30, 2019

Then it wasn't cut off, as that's what idontgetoutmuch@cb09d0e says.

But I don't understand how that implements the request

Could you fix the cabal file on Hackage

And the latest "revision" on https://hackage.haskell.org/package/hmatrix-0.19.0.0/revisions/ for that version still has the problem.

@idontgetoutmuch
Copy link
Member

idontgetoutmuch commented Jun 30, 2019

Isn't is this what you want? https://hackage.haskell.org/package/hmatrix-0.20.0.0

TBH I don't understand what you do want now I think about it.

@nh2
Copy link
Contributor Author

nh2 commented Jun 30, 2019

A new release is also good because its .cabal file will also agree with what's in the repo (for now, until somebody makes a Cabal revision via the Hackage UI, at which piont the problem wil reappear for that version as well).

However, a new release will not fix the current problems with 0.19 on Hackage, and many setups still use that.

What I originally asked (sorry for not being clear!) was

Could you fix the cabal file on Hackage

for the 0.19 version, e.g. by making a Hackage revision for that version, that has correct line endings.

@idontgetoutmuch
Copy link
Member

It's not obvious how to do this. It seems I can edit the file only by using the GUI provided and I assume this saves the file with the undesirable line endings. I will ask on # hackage.

@idontgetoutmuch
Copy link
Member

How about doing a sed via nix in the pre build phase (I forget what nix calls this)? I have had no response from # hackage so far.

@idontgetoutmuch
Copy link
Member

Is this still causing a problem?

@chreekat
Copy link

For what it's worth, I would classify this as a Hackage bug rather than an HMatrix bug.

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

No branches or pull requests

3 participants