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

How to package something that relies on haskell-emacs for melpa? #56

Open
mwotton opened this issue Jul 4, 2016 · 9 comments
Open

How to package something that relies on haskell-emacs for melpa? #56

mwotton opened this issue Jul 4, 2016 · 9 comments

Comments

@mwotton
Copy link

mwotton commented Jul 4, 2016

sorry if this is a stupid question - do i need to do anything special to rely on haskell-emacs in a package submitted to melpa?

@knupfer
Copy link
Owner

knupfer commented Jul 4, 2016

Well, you'd declare it as a normal dependency.
Or do you want to distribute a haskell module for haskell-emacs via melpa?

@mwotton
Copy link
Author

mwotton commented Jul 4, 2016

the difficulty as i see it is that you might need a separate stack.yaml for each project that uses haskell-emacs, as they could have different package constraints - not quite sure how this could work in the monolithic setup that's there now.

@mwotton
Copy link
Author

mwotton commented Jul 4, 2016

i was thinking that i'd probably use stack to distribute the meat of the haskell code, with perhaps a small shim module with FromLisp/ToLisp instances.

@knupfer
Copy link
Owner

knupfer commented Jul 4, 2016

Hm, yes that is at least now a bit complicated. You'd have to instruct the user to add your dependency to his cabal and add your shim in his directory. Obviously, your melpa package could do that for the user, but that would be a bit intrusive. A good long term solution would be to allow multiple procs, so you could distribute with your melpa package a .cabal file and the rest would be automated... what do you think?

@mwotton
Copy link
Author

mwotton commented Jul 4, 2016

this is why I tend to rely on stack more than cabal - can easily define a build with respect to a given resolver, with a couple of explicit exceptions. But yes, I tend to agree - at least packaged libraries should have their own sandbox/stack working directory/whatever nix calls it.

@knupfer
Copy link
Owner

knupfer commented Jul 4, 2016

Note that stack doesn't solve the issue here either. If you'd just append to the extra-deps you could have there mutually exclusive libs.
The core issue is that these files are managed by the user so it isn't possible to manipulate them in a safe manner (but you can obviously instruct him to depend on your lib).

@mwotton
Copy link
Author

mwotton commented Jul 4, 2016

i was assuming you'd have different stack directories for each package using haskell-emacs? My worry is that you could have two separate libs that specify their dependencies that work apart, but can't exist in the same cabal sandbox/.stack-work.

@knupfer
Copy link
Owner

knupfer commented Jul 4, 2016

Yes, I intended to say the same. It would be ideal if every lib gets an own dir and an own process.
To accomplish that we must index some elisp variables by the directory in which is the library and give a function to register a library into haskell-emacs

@mwotton
Copy link
Author

mwotton commented Jul 4, 2016

sounds good :)

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

2 participants