cabal upload should automatically find tarball to upload #272

Closed
bos opened this Issue May 24, 2012 · 8 comments

Projects

None yet

5 participants

@bos
Contributor
bos commented May 24, 2012

(Imported from Trac #279, reported by guest on 2008-05-14)

Cabal-upload is a nice enough tool, but it doesn't have a good default: it just errors out if not specifically told exactly where to find a tarball.

I think this could be smarter. cabal-upload will almost always be run in the top level of a cabal package. A much better default would be: if no arguments are given, cabal-upload looks in dist/ and if there is an appropriate tarball in it, uploads it.

Smarter possibilities:

  • if there are multiple tarballs, instead of bailing out, cabal-upload just picks the highest numbered one.
  • before looking in dist/, do a runhaskell Setup sdist.

gwern

@feuerbach
Contributor

I propose that cabal upload without the archive argument should be equivalent to cabal sdist && cabal upload "$result.tar.gz".

I can volunteer to implement this if there's an agreement here.

@23Skidoo
Member
23Skidoo commented Nov 9, 2013

I propose that cabal upload without the archive argument should be equivalent to cabal sdist && cabal upload "$result.tar.gz".

+1. Though I think it should prompt the user first.

@feuerbach
Contributor

Do you have any scenario in mind where someone would type cabal upload without meaning it?

@23Skidoo
Member

Yes, by mistake. Rationale for asking for confirmation is that upload is a relatively infrequent action with irreversible consequences.

@feuerbach
Contributor
@23Skidoo
Member

@hvr writes on Reddit:

With my Trustee hat on, I'm a bit worried about promoting the workflow of uploading packages straight from the current source-repo w/o any --non-candidate flag failsafe to make it a conscious choice.

This means more work for Trustees to manually edit .cabal files for packages accidentally uploaded broken that didn't pass basic QA...

@BardurArantsson
Collaborator

Please see my comments on #2253

I think they completely supercede this issue. If you agree, please close this one.

@ezyang ezyang changed the title from Cabal-upload could have a smarter default to cabal upload should automatically find tarball to upload Aug 16, 2016
@ezyang
Contributor
ezyang commented Aug 16, 2016

OK I agree, closing this one.

@ezyang ezyang closed this Aug 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment