Allow compiling standard sources#1684
Merged
alexarchambault merged 3 commits intoOct 8, 2025
Merged
Conversation
7c4f9dc to
01d9c45
Compare
3f3a159 to
70b8bcf
Compare
9ec6d1e to
8395604
Compare
Collaborator
Author
Member
|
@alexarchambault no opinion, looks great i think |
8395604 to
b66a6ca
Compare
|
Hi @alexarchambault ,very thanks for use almond.sh . now I could use almond.sh scala3.6.3 kernel to write pytorch |
alexarchambault
added a commit
that referenced
this pull request
Jan 22, 2026
) Follow-up of #1684 This makes `repl.load` accept "raw" sources starting with `package`. These are assumed to be standard Scala files, and are passed as-is to scalac. ```scala @ repl.load("""package thing case class Foo(n: Int) """) @ thing.Foo(2) res1: thing.Foo = Foo(n = 2) ``` Co-authored-by: Lorenzo Gabriele <lorenzolespaul@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds the ability to supply "raw sources" during an Ammonite session, like
Input code starting with
packageis assumed to be a raw source. It must end with two empty lines (the input parser stops expecting more input when it gets two empty lines in a row).This is a somewhat quick-and-dirty, yet handy way for users to import simple sources in Ammonite (and this should be handy in Almond too). This can also be helpful to work around issues that can arise because of code wrapping.