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

compile mode with sbt thin client #165

Merged
merged 1 commit into from
Feb 5, 2021
Merged

compile mode with sbt thin client #165

merged 1 commit into from
Feb 5, 2021

Conversation

fommil
Copy link
Contributor

@fommil fommil commented Jan 20, 2021

no need for sbt-mode for me with this. I use it like this

(use-package scala-mode
  :mode ((rx (| ".scala" ".sbt") eos) . scala-mode)
  :config
  (require 'scala-compile) ;; not needed if this PR is merged because it is auto-loaded
  (bind-key "C-c c" #'scala-compile scala-mode-map))

and individual files can specify a preferred command to override the default (user-configurable) history, e.g. this at the end

// Local Variables:
// scala-compile-suggestion: "sbtn runMain foo.bar.Main"
// End:

folk that don't have sbtn can change the defaults to sbt --client, and it should also pave the way for maven / gradle / fury / whatever.

@fommil fommil force-pushed the sbtn branch 2 times, most recently from d5d4803 to c867e5b Compare January 20, 2021 16:13
scala-compile.el Outdated Show resolved Hide resolved
scala-compile.el Outdated Show resolved Hide resolved
@fommil
Copy link
Contributor Author

fommil commented Jan 20, 2021

This needs a function to spin up a server. I thought it did that automatically but apparently not. It can come in a follow up.

Looks like the server isn't staying up when called from emacs, it's a bug in sbtn sbt/sbt#6271

@fommil
Copy link
Contributor Author

fommil commented Jan 20, 2021

@hvesalai ok I made the changes, and fixed some things.

@fommil fommil force-pushed the sbtn branch 2 times, most recently from 7f5453b to 22935d6 Compare January 21, 2021 12:02
@fommil
Copy link
Contributor Author

fommil commented Jan 22, 2021

@hvesalai upstream changes to sbt have been merged, I think I've finished this PR now.

@hvesalai
Copy link
Owner

Any tips on what I need to do to test this?

@fommil
Copy link
Contributor Author

fommil commented Jan 22, 2021

if your project is using the latest sbt you should be able to just type M-x scala-compile from any scala buffer. Change the command from sbtn to sbt --client if you don't want to install any extra software but if you want the full experience then also install sbtn using the instructions in the header.

@fommil
Copy link
Contributor Author

fommil commented Jan 22, 2021

If you want to go the full hog, we could set up an automated testing rig like https://gitlab.com/tseenshe/haskell-tng.el/-/blob/tng/test/haskell-tng-compile-test.el but that would be a lot of effort at this point.

@fommil
Copy link
Contributor Author

fommil commented Feb 4, 2021

https://eed3si9n.com/sbt-1.4.7 is released; everything should work fine and dandy with it.

@hvesalai hvesalai merged commit 402d6df into hvesalai:master Feb 5, 2021
@jackcviers jackcviers mentioned this pull request Jan 4, 2022
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

Successfully merging this pull request may close these issues.

2 participants