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

[question] Ammonite spark scripts #120

Open
james64 opened this issue Feb 20, 2020 · 1 comment
Open

[question] Ammonite spark scripts #120

james64 opened this issue Feb 20, 2020 · 1 comment

Comments

@james64
Copy link

james64 commented Feb 20, 2020

Hey,
thanks for amm-spark. It's a great tool with beautiful and readable code base! I noticed that it only can be used interactively because it relies on replApi instance. If I understand it correctly it is used to access classes which were defined or added after repl start but before spark session is started. In repl this is obviously needed. But I cannot stop wondering...

Would it be possible to create a sister of ammonite-spark which would be usable non-interactively in ammonite scripts? Having one project cover both these use cases would be better but looks unlikely.

Was this use case considered/investigated? It is known to be a dead end or it is worth looking at?

I am not as knowledgeable about ammonite internals yet and I want to save me a hassle of digging into it if there are known reasons why this would not work.

Thanks!

@alexarchambault
Copy link
Owner

As you said, ammonite-spark currently relies on replApi, which is only accessible from the repl, not from scripts. The things it accesses through replApi, mostly replApi.sess.frames could be made accessible from interpApi though. Minimal changes in Ammonite itself should be needed, it should be a matter of tweaking the way it handles its "bridges" / APIs.

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