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

Make n2o.cabal hackage-proof #12

Open
6 tasks
nponeccop opened this issue Feb 26, 2016 · 3 comments
Open
6 tasks

Make n2o.cabal hackage-proof #12

nponeccop opened this issue Feb 26, 2016 · 3 comments
Milestone

Comments

@nponeccop
Copy link
Owner

@nponeccop
Copy link
Owner Author

cabal sdist works now, but the the Hackage library tarball should not contain the sample. Also Hackage has its own validation process so we should pass it too for this bug to be closed

@5HT
Copy link
Collaborator

5HT commented Apr 4, 2016

why should not? where it does state?

@nponeccop
Copy link
Owner Author

The main reason is that having chat inside the package doesn't make end-user workflow any simpler. Imagine a quickstart instruction when N2O is on hackage.

The user basically needs:

  • a .cabal file for the haskell part, with n2o as a dependency
  • a document root with index.html, index.css and client.js (user's client code and third-party libraries. Think of d3.js, paper or whatever)
  • a way to expose N2O *.js via HTTP
  • a way to expose the document root via HTTP
  • a way to update *.js whenever N2O is improved

A common solution for all of the above is scaffolding - providing a tool to create all of those for fresh projects.

I was thinking of something like cabal unpack n2o-scaffold-chat or cabal unpack n2o-scaffold-empty for a poor-man version of scaffolding (e.g. no updating). But it's still serves its purpose as no git or manual getting of tarballs is required. And we can have as many scaffolds as we wish, including third-party scaffolds like n2o-scaffold-bower with upstream n2o and third-party libraries sitting in bower_components, a minified scaffold, a scaffold with nginx config included and so on.

The point is that cabal unpack n2o serves the purpose of scaffolding rather poorly because it's polluted with n2o proper.

There is a subproblem is that production requires a separate .cabal for user project. So if a user wants to patch the chat incrementally until it becomes the user project, at some point he needs to split the .cabal.

Another problem is that the upstream n2o is not included in the tarball now: Readme.md and LICENSE are the only non-haskell files.

As for your question, shipping samples within the sdist or outside of it is not regulated. It seems hackage has both ways. So we are only guided by simplicity for our users. My argument is that the current removal of n2o proper and splitting .cabal is hardly any easier for a user than cabal unpack solution that I propose.

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

No branches or pull requests

2 participants