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

Merge the two ob-scala implementations #114

Closed
tarsius opened this Issue Aug 3, 2016 · 24 comments

Comments

Projects
None yet
6 participants
@tarsius

tarsius commented Aug 3, 2016

I previously raised this issue on an old pull request. I am opening this new issue so that you don't forget about this.

@fommil

This comment has been minimized.

Show comment
Hide comment
@fommil

fommil Aug 3, 2016

Contributor

@reactormonk can you please look into this?

Contributor

fommil commented Aug 3, 2016

@reactormonk can you please look into this?

@reactormonk

This comment has been minimized.

Show comment
Hide comment
@reactormonk

reactormonk Aug 4, 2016

Contributor

@fommil How would you specify the inf-ensime buffer to talk to? Would :session <buffer-name> work? With an added magic value that looks for an ensime buffer according to the current directory.

Contributor

reactormonk commented Aug 4, 2016

@fommil How would you specify the inf-ensime buffer to talk to? Would :session <buffer-name> work? With an added magic value that looks for an ensime buffer according to the current directory.

@fommil

This comment has been minimized.

Show comment
Hide comment
@fommil

fommil Aug 4, 2016

Contributor

I don't really have any preferences on this. We're assuming that ensime is available so just call functions as normal... if ensime is not available then it will fail. You may need to add some warning suppressions as a result of this.

Contributor

fommil commented Aug 4, 2016

I don't really have any preferences on this. We're assuming that ensime is available so just call functions as normal... if ensime is not available then it will fail. You may need to add some warning suppressions as a result of this.

@hvesalai

This comment has been minimized.

Show comment
Hide comment
@hvesalai

hvesalai Aug 20, 2016

Collaborator

Are we really assuming ensime is available. At least I still use scala-mode from time to time without ensime. I think scala-mode should at install and work even without ensime even if some functionality would not be available.

Collaborator

hvesalai commented Aug 20, 2016

Are we really assuming ensime is available. At least I still use scala-mode from time to time without ensime. I think scala-mode should at install and work even without ensime even if some functionality would not be available.

@fommil

This comment has been minimized.

Show comment
Hide comment
@fommil

fommil Aug 20, 2016

Contributor

@hvesalai we're never going to have a circular dependency between ensime and scala-mode. But the scala org-mode may have some features that are only available if ensime is available. I think it's for the repl support, if I recall, which is really just the .ensime parser (not the server component).

Contributor

fommil commented Aug 20, 2016

@hvesalai we're never going to have a circular dependency between ensime and scala-mode. But the scala org-mode may have some features that are only available if ensime is available. I think it's for the repl support, if I recall, which is really just the .ensime parser (not the server component).

@reactormonk

This comment has been minimized.

Show comment
Hide comment
@reactormonk

reactormonk Aug 20, 2016

Contributor

The current ob-scala is launching an ensime-inf-run-scala to load in the project, so you can use dependencies. The initial ob-scala just goes via scala binary, so you can't depend on anything.

Contributor

reactormonk commented Aug 20, 2016

The current ob-scala is launching an ensime-inf-run-scala to load in the project, so you can use dependencies. The initial ob-scala just goes via scala binary, so you can't depend on anything.

@fommil

This comment has been minimized.

Show comment
Hide comment
@fommil

fommil Aug 20, 2016

Contributor

certainly ob-scala should be moved into the org-mode. @reactormonk do you think you'd be able to find some time to do that anytime in the next few weeks / months?

Contributor

fommil commented Aug 20, 2016

certainly ob-scala should be moved into the org-mode. @reactormonk do you think you'd be able to find some time to do that anytime in the next few weeks / months?

@tarsius

This comment has been minimized.

Show comment
Hide comment
@tarsius

tarsius Dec 30, 2016

Any progress on this?

Please also note that Bastien (@bzg) prefers to remove such things out of the org repository, see larstvei/ox-gfm#14 (comment). Maybe in this case the best thing would be to use a third, dedicated repository.

tarsius commented Dec 30, 2016

Any progress on this?

Please also note that Bastien (@bzg) prefers to remove such things out of the org repository, see larstvei/ox-gfm#14 (comment). Maybe in this case the best thing would be to use a third, dedicated repository.

@sauyon

This comment has been minimized.

Show comment
Hide comment
@sauyon

sauyon Feb 12, 2017

Is there really any reason to use ensime-inf-run-scala instead of having a header argument that allows dependencies to be added inside the org file itself?

It makes no sense to require the full-blown sbt/ensime stack when all that's needed is a simple -cp flag....

sauyon commented Feb 12, 2017

Is there really any reason to use ensime-inf-run-scala instead of having a header argument that allows dependencies to be added inside the org file itself?

It makes no sense to require the full-blown sbt/ensime stack when all that's needed is a simple -cp flag....

@reactormonk

This comment has been minimized.

Show comment
Hide comment
@reactormonk

reactormonk Feb 12, 2017

Contributor

You'll still have to download the dependencies. Coursier could take care of that.

Contributor

reactormonk commented Feb 12, 2017

You'll still have to download the dependencies. Coursier could take care of that.

@fommil

This comment has been minimized.

Show comment
Hide comment
@fommil

fommil Feb 12, 2017

Contributor

ensime-inf-run-scala doesn't depend on the sbt or the ensime stack. It only requires a .ensime file to exist, which defines where the jars are that go into that -cp flag.

I would be happy for somebody to move the scala REPL code from ensime into a separate emacs package (and for sbt-mode to use it instead of bundle its own REPL mode) but it would be a lot of work instead of just doing a dynamic dependency lookup.

Contributor

fommil commented Feb 12, 2017

ensime-inf-run-scala doesn't depend on the sbt or the ensime stack. It only requires a .ensime file to exist, which defines where the jars are that go into that -cp flag.

I would be happy for somebody to move the scala REPL code from ensime into a separate emacs package (and for sbt-mode to use it instead of bundle its own REPL mode) but it would be a lot of work instead of just doing a dynamic dependency lookup.

@sauyon

This comment has been minimized.

Show comment
Hide comment
@sauyon

sauyon Feb 12, 2017

Is it unexpected that it asks me to run the server when I attempt to run code then?

(Just a bit frustrated, mostly because the ensime server refuses to start for me)

sauyon commented Feb 12, 2017

Is it unexpected that it asks me to run the server when I attempt to run code then?

(Just a bit frustrated, mostly because the ensime server refuses to start for me)

@fommil

This comment has been minimized.

Show comment
Hide comment
@fommil

fommil Feb 12, 2017

Contributor

yes, that's definitely unexpected. It might be trying to generate a .ensime for you by calling out to sbt? That sounds like something that should be opt-in.

Contributor

fommil commented Feb 12, 2017

yes, that's definitely unexpected. It might be trying to generate a .ensime for you by calling out to sbt? That sounds like something that should be opt-in.

@tarsius

This comment has been minimized.

Show comment
Hide comment
@tarsius

tarsius Aug 16, 2017

Could someone please look into this again?

I am afraid I cannot help because I don't use scala and I don't understand the above discussion. It seems about dependencies between elisp libraries (that part understand) as well as about how the elisp part (I assume this implementation) communicates with the scala part / repl.

While that discussion might be relevant to the following, I would still like to reiterate the original issue I was trying to get resolved by opening this issue.

There are currently two ob-scala.el implementations. I was hoping that one of these implementations would be deprecated in favor of the other.

Both implementations might lack some features that the other has, and it might be a good idea to start by creating a list of such unique features.

tarsius commented Aug 16, 2017

Could someone please look into this again?

I am afraid I cannot help because I don't use scala and I don't understand the above discussion. It seems about dependencies between elisp libraries (that part understand) as well as about how the elisp part (I assume this implementation) communicates with the scala part / repl.

While that discussion might be relevant to the following, I would still like to reiterate the original issue I was trying to get resolved by opening this issue.

There are currently two ob-scala.el implementations. I was hoping that one of these implementations would be deprecated in favor of the other.

Both implementations might lack some features that the other has, and it might be a good idea to start by creating a list of such unique features.

@fommil

This comment has been minimized.

Show comment
Hide comment
@fommil

fommil Aug 16, 2017

Contributor

it seems the authors of the files don't really care, so I say we just kill one randomly and let them fight it out.

Contributor

fommil commented Aug 16, 2017

it seems the authors of the files don't really care, so I say we just kill one randomly and let them fight it out.

@tarsius

This comment has been minimized.

Show comment
Hide comment
@tarsius

tarsius Aug 16, 2017

😃 Yeah...

Okay, so I think ob-scala should ideally live in its own repository. But since there is no such implementation, my second preference is for it to live in "a scala repository", as opposed to in the Org repository.

@bzg do you think simply deleting the version in the Org repository would be acceptable? If so, then could you please do it?

Otherwise please delete the implementation from this repository @fommil.

tarsius commented Aug 16, 2017

😃 Yeah...

Okay, so I think ob-scala should ideally live in its own repository. But since there is no such implementation, my second preference is for it to live in "a scala repository", as opposed to in the Org repository.

@bzg do you think simply deleting the version in the Org repository would be acceptable? If so, then could you please do it?

Otherwise please delete the implementation from this repository @fommil.

@fommil

This comment has been minimized.

Show comment
Hide comment
@fommil

fommil Aug 16, 2017

Contributor

I am all for deleting it from org.

In fact I can't seem to get org to work these days for markdown export, I should really look into that. I've been using the version distributed with emacs for ages.

Thanks for the patience @tarsius

Contributor

fommil commented Aug 16, 2017

I am all for deleting it from org.

In fact I can't seem to get org to work these days for markdown export, I should really look into that. I've been using the version distributed with emacs for ages.

Thanks for the patience @tarsius

@bzg

This comment has been minimized.

Show comment
Hide comment
@bzg

bzg Aug 17, 2017

Yes, I will look into this tomorrow. Thanks!

bzg commented Aug 17, 2017

Yes, I will look into this tomorrow. Thanks!

@bzg

This comment has been minimized.

Show comment
Hide comment
@bzg

bzg Aug 18, 2017

Actually, I expected to see ob-scala listed in GNU ELPA or MELPA.

Is it available as an Emacs package somewhere?

I don't think it is a good idea to delete it from Org before it is available as a package elsewhere.

PS: Note that I will be offline for one week.

bzg commented Aug 18, 2017

Actually, I expected to see ob-scala listed in GNU ELPA or MELPA.

Is it available as an Emacs package somewhere?

I don't think it is a good idea to delete it from Org before it is available as a package elsewhere.

PS: Note that I will be offline for one week.

@fommil

This comment has been minimized.

Show comment
Hide comment
@fommil

fommil Aug 18, 2017

Contributor

@bzg it's part of scala-mode. It does not make sense to distribute it separately from scala-mode.

Contributor

fommil commented Aug 18, 2017

@bzg it's part of scala-mode. It does not make sense to distribute it separately from scala-mode.

@bzg

This comment has been minimized.

Show comment
Hide comment
@bzg

bzg Aug 18, 2017

Ok, done. Copying @unjello to notify him than ob-scala.el is to be removed from the next stable release of org-mode and to notify you guys in case you want to exchange on how to merge the two versions of ob-scala.el. Thanks.

bzg commented Aug 18, 2017

Ok, done. Copying @unjello to notify him than ob-scala.el is to be removed from the next stable release of org-mode and to notify you guys in case you want to exchange on how to merge the two versions of ob-scala.el. Thanks.

@fommil

This comment has been minimized.

Show comment
Hide comment
@fommil

fommil Aug 18, 2017

Contributor

Awesome, thanks @bzg. I am writing a book on Scala using org-mode https://leanpub.com/fp-scala-mortals and making heavy use of ob-scala so thank you all for such an amazing piece of free software! That said, current org-mode master is not working for me when I try to export markdown, so I suspect I may go down the rabbit hole if I try to get it set up at this point. I will try to minimise that problem and report / fix. To anybody who wants my help in getting ob-scala.el working better with org, your best bet is helping me to fix that problem.

Contributor

fommil commented Aug 18, 2017

Awesome, thanks @bzg. I am writing a book on Scala using org-mode https://leanpub.com/fp-scala-mortals and making heavy use of ob-scala so thank you all for such an amazing piece of free software! That said, current org-mode master is not working for me when I try to export markdown, so I suspect I may go down the rabbit hole if I try to get it set up at this point. I will try to minimise that problem and report / fix. To anybody who wants my help in getting ob-scala.el working better with org, your best bet is helping me to fix that problem.

@fommil fommil closed this Aug 18, 2017

xuchunyang pushed a commit to emacs-china/org-mode that referenced this issue Aug 18, 2017

@bzg

This comment has been minimized.

Show comment
Hide comment
@bzg

bzg Aug 18, 2017

Yes, thanks in advance for reporting your problem with the Markdown export!

bzg commented Aug 18, 2017

Yes, thanks in advance for reporting your problem with the Markdown export!

@tarsius

This comment has been minimized.

Show comment
Hide comment
@tarsius

tarsius commented Aug 18, 2017

Thanks!

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