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

Add utility to extract macro classes from a classpath. #8201

Closed
wants to merge 1 commit into from

Conversation

olafurpg
Copy link
Contributor

@olafurpg olafurpg commented Aug 23, 2019

Problem

To build a native image for the Scala compiler, we need to know the names of the classes on the compile classpath that define Scala macros.

Solution

This PR introduces a new find-macros command-line tool that takes a classpath and prints out the names of the classes that define Scala macros. The tool finds class names by looking at the Scala signatures produced by the Scala compiler.

@cosmicexplorer cosmicexplorer requested a review from stuhood August 23, 2019 00:50
Copy link
Contributor Author

@olafurpg olafurpg left a comment

Choose a reason for hiding this comment

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

The CI failures seem unrelated to this change.

import java.io.File

class FindMacrosSuite extends FunSuite with DiffAssertions {
test("expect") {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it might be worth using ignore for this test since it downloads quite a lot of jars from Maven Central and I estimate the FindMacros class won't change so frequently.

@stuhood
Copy link
Member

stuhood commented Aug 24, 2019

Sorry: looks like you were struck by #8127.

Copy link
Member

@stuhood stuhood left a comment

Choose a reason for hiding this comment

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

Thanks gang! Before landing this, it would be good to see the dependent PR that will consume it (or a sketch of a design), so that we can know how it will fit into the workflow we're going for.

@cosmicexplorer
Copy link
Contributor

@stuhood will do! I was planning to make #8145 into the PR that would consume this -- after some work today, I should be able to have a up a diff on top of this which shows the expected usage.

@olafurpg
Copy link
Contributor Author

Closing since #8145 got closed as well.

@olafurpg olafurpg closed this Oct 17, 2019
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.

3 participants