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

Upload to hackage without cabal-install #313

Closed
andrewthad opened this issue Jun 15, 2015 · 14 comments
Closed

Upload to hackage without cabal-install #313

andrewthad opened this issue Jun 15, 2015 · 14 comments
Assignees
Milestone

Comments

@andrewthad
Copy link

@andrewthad andrewthad commented Jun 15, 2015

If I'm using stack to build a library that I want to upload to hackage, how can I build something that hackage will accept? I can't find any mention of this in the wiki, and hackage's upload page doesn't give any instructions on how to make the tarball on your own.

@andrewthad andrewthad changed the title equivalent of cabal's sdist equivalent of cabal sdist Jun 15, 2015
@snoyberg
Copy link
Contributor

@snoyberg snoyberg commented Jun 15, 2015

I actually just added stack upload support, which if given a directory will generate the tarball and then upload it. Under the surface right now, it actually does call out to cabal-install, but in the future we can change this. I originally wrote the code to do runghc Setup.hs sdist, but that generate tarballs in the wrong format.

I'd like to leave this open to track doing sdist without cabal-install. It shouldn't actually be that difficult, we'd want to:

  • Call runghc Setup.hs sdist --list-sources=tmpfile
  • Process the tmpfile for a list of all filenames
  • Generate the tarball

If you or someone else reading is interested in taking a crack at this, let me know, it shouldn't be too hard.

@snoyberg snoyberg added this to the Later improvements milestone Jun 15, 2015
@andrewthad
Copy link
Author

@andrewthad andrewthad commented Jun 15, 2015

If I remember this when I'm less busy a week from now (and if no one has already done it), I may give it a try. If I switch to using the master branch of stack (which I assume has the upload command) instead of the beta that I downloaded a week ago, should that give me the ability to upload? Also, in your opinion, does that seem like a reasonably safe idea?

@andrewthad
Copy link
Author

@andrewthad andrewthad commented Jun 15, 2015

I'm renaming this to be more consistent with its purpose on the milestone.

@andrewthad andrewthad changed the title equivalent of cabal sdist Upload to hackage with cabal-install Jun 15, 2015
@gregwebs
Copy link
Contributor

@gregwebs gregwebs commented Jun 15, 2015

@andrewthad given that it uses cabal-install it shouldn't have any bugs (other than those in cabal-install). I would recommend using stack or stackage-upload as soon as you can because they at least use https.

@andrewthad andrewthad changed the title Upload to hackage with cabal-install Upload to hackage without cabal-install Jun 15, 2015
@andrewthad
Copy link
Author

@andrewthad andrewthad commented Jun 15, 2015

I'd like to use stack right now, especially since I don't even have cabal-install installed anymore. Given that stack upload doesn't seem to be available in the version of stack in the ubuntu repository, is it safe to use the master branch of this github repo?

@snoyberg
Copy link
Contributor

@snoyberg snoyberg commented Jun 15, 2015

Yes, it's safe to use master, but unfortunately (because of what I mentioned earlier) it still depends on cabal-install being available. It shouldn't be hard to overcome that though.

@andrewthad
Copy link
Author

@andrewthad andrewthad commented Jun 15, 2015

Thanks. That shouldn't be a problem.

@andrewthad
Copy link
Author

@andrewthad andrewthad commented Jun 15, 2015

@snoyberg I'm using the master branch of stack, and it doesn't recognize stack upload. Is this still on another branch, or am I supposed to be running it differently?

@snoyberg
Copy link
Contributor

@snoyberg snoyberg commented Jun 15, 2015

It's the master branch. Are you certain that the executable you're running is the one you built? What's the output of stack --version?

@andrewthad
Copy link
Author

@andrewthad andrewthad commented Jun 15, 2015

0.0.2

@snoyberg
Copy link
Contributor

@snoyberg snoyberg commented Jun 15, 2015

What Git revision does it say? If it doesn't have one, it means you installed from a tarball, which means you're not running master :)

@andrewthad
Copy link
Author

@andrewthad andrewthad commented Jun 15, 2015

Ah, thanks. That's much better. Now I've got it to say:

Version 0.0.2, Git revision 2736115d1fac7670e587b617c0cc1f7fefc35d52

So, I think I should be good now.

@snoyberg snoyberg modified the milestones: 0.2.0.0, Later improvements Jun 16, 2015
@mgsloan
Copy link
Contributor

@mgsloan mgsloan commented Jul 2, 2015

I'll be working on removing the dependency on the cabal binary.

@mgsloan mgsloan self-assigned this Jul 2, 2015
mgsloan added a commit that referenced this issue Jul 18, 2015
mgsloan added a commit that referenced this issue Jul 18, 2015
mgsloan added a commit that referenced this issue Jul 18, 2015
mgsloan added a commit that referenced this issue Jul 18, 2015
mgsloan added a commit that referenced this issue Jul 18, 2015
@mgsloan
Copy link
Contributor

@mgsloan mgsloan commented Jul 18, 2015

Done! I've tested it by uploading a new package, yesod-media-simple, an old project I cleaned up for release today.

PR: #627

@snoyberg Confirmed?

@mgsloan mgsloan assigned snoyberg and unassigned mgsloan Jul 18, 2015
mgsloan added a commit that referenced this issue Jul 19, 2015
mgsloan added a commit that referenced this issue Jul 20, 2015
mgsloan added a commit that referenced this issue Jul 20, 2015
mgsloan added a commit that referenced this issue Jul 20, 2015
mgsloan added a commit that referenced this issue Jul 20, 2015
@snoyberg snoyberg closed this Jul 20, 2015
@snoyberg snoyberg removed the in progress label Jul 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.