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

Fix declaring product of straight-to-jar compilation #20592

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

adpi2
Copy link
Member

@adpi2 adpi2 commented Jun 18, 2024

Currently the straight-to-JAR compilation does not declare any class file to Zinc, which prevents Zinc from compiling downstream modules incrementally.

For the context, we would like to enable straight-to-JAR compilation in sbt 2.x, and put remote caching on top of it.

def close(): Unit = this.synchronized(jpath.getFileSystem().close())
override def exists: Boolean = jpath.getFileSystem().isOpen() && super.exists
def allFileNames(): Iterator[String] =
java.nio.file.Files.walk(jpath).iterator().asScala.map(_.toString)

override def toString: String = jarPath.toString
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It used to print / (the root path inside the JAR) instead of /path/to/file.jar

@adpi2 adpi2 marked this pull request as ready for review June 19, 2024 11:35
@adpi2 adpi2 requested a review from bishabosha June 19, 2024 11:35
@adpi2 adpi2 force-pushed the fix-inc-compilation-on-jar branch from 1f07142 to e0b7001 Compare June 19, 2024 14:42
@adpi2
Copy link
Member Author

adpi2 commented Jun 19, 2024

@jamie For a class file in a JAR, I returned the PlainFile as you suggested. Also I added a test.

@bishabosha
Copy link
Member

xsbt.ExtractUsedNamesSpecification has started failing - looks like there are classes not found?

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.

None yet

2 participants