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

New Hackage release #84

Closed
elldritch opened this issue Nov 21, 2023 · 9 comments
Closed

New Hackage release #84

elldritch opened this issue Nov 21, 2023 · 9 comments

Comments

@elldritch
Copy link

It looks like the last version of this package published on Hackage is 0.5.1.1 published in August 2019. Are there plans to do a new release, especially since HEAD is now up to 0.7.0.0?

@Bodigrim
Copy link
Contributor

Yes, but not immediately. There've been multiple changes recently and dust has not settled yet. You can accelerate things by acting as a beta tester:

  • test your packages / products against tar-HEAD,
  • build htar and use it instead of a system tar utility,
  • build cabal-install agaisnt tar-HEAD and employ it.

Long file names and symbolic links are areas of special interest, because they are undergoing massive changes.

@elldritch
Copy link
Author

Great, looking forward to it! We are already using HEAD on https://github.com/fossas/tar. Things have been great for us thus far, I'm excited for the new release.

@Bodigrim
Copy link
Contributor

I've uploaded a release candidate: https://hackage.haskell.org/package/tar-0.6.0.0/candidate

I managed to adapt Cabal to work with it. @mpilgrem could you possibly check how it works with Stack?

@Bodigrim
Copy link
Contributor

@mpilgrem
Copy link

mpilgrem commented Dec 14, 2023

@Bodigrim, I was not able to get to this previously, but may I ask: does the change log entry "Prohibit non-ASCII file names instead of silent corruption." mean that programs, like Stack, which UTF8 encode file names in tar achives cannot now use this version of the package? For example, when creating sdist archives, Stack has:

  let tarPath isDir fp =
        case Tar.toTarPath isDir (forceUtf8Enc (pkgIdName FP.</> fp)) of
          Left e -> prettyThrowIO $ ToTarPathException e
          Right tp -> pure tp
      -- convert a String of proper characters to a String of bytes in UTF8
      -- encoding masquerading as characters. This is necessary for tricking the
      -- tar package into proper character encoding.
      forceUtf8Enc = S8.unpack . T.encodeUtf8 . T.pack

@Bodigrim
Copy link
Contributor

Unfortunately this is unlikely to work, yes.

I do not recommend playing fast and loose with filenames, but I don't have fundamental reservations against providing ByteString -> TarPath function, which would allow you to trick tar.

There likely to be bigger compatibility issues though.

@mpilgrem
Copy link

Thanks. Other parts of Stack use the tar-conduit package, which does handle UTF8 encoding. I had some involvement with that package in fixing a problem with long file paths, and during that came across the pax extension to the old ustar: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html. UTF8 encoding is part of the pax standard (see the section 'pax Archive Character Set Encoding/Decoding').

@hasufell
Copy link
Member

@mpilgrem we're planning to do a major release after migrating to OsPath: #88

On unix, this will be encoding agnostic (so anything goes) and on windows it will assume UTF-8 when decoding from the tar archive.

@hasufell
Copy link
Member

@Bodigrim maybe a discourse post would help get more attention and users testing it.

My hope is that we get this library into a state beyond "cabal uses it", which has been annoying me for some time.

I'd switch ghcup back to it, if we had a fix for: #57

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

4 participants