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

Support incremental compilation in Scala Native 0.4.9 #2141

Merged
merged 2 commits into from
Nov 26, 2022

Conversation

lolgab
Copy link
Member

@lolgab lolgab commented Nov 24, 2022

Scala Native 0.4.9 added support for this feature: https://github.com/scala-native/scala-native/releases/tag/v0.4.9

@lolgab lolgab force-pushed the native-incremetal-compilation branch from 0492bc3 to ecf02ca Compare November 24, 2022 12:37
@lolgab lolgab marked this pull request as ready for review November 24, 2022 12:50
@lolgab lolgab requested a review from lefou November 24, 2022 12:52
Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

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

Nice addition. Would be good to seen it working in some test, tough.

@lolgab
Copy link
Member Author

lolgab commented Nov 24, 2022

Nice addition. Would be good to seen it working in some test, tough.

I thought about that. Since it doesn't change the binary behaviour, it's hard to assert it's working without assumptions that will probably break on the next version (since it's an experimental feature). Also Scala Native tests are expensive. If you think we need it I can add it. I just manual tested it in scratch.

@lefou
Copy link
Member

lefou commented Nov 24, 2022

Nice addition. Would be good to seen it working in some test, tough.

I thought about that. Since it doesn't change the binary behaviour, it's hard to assert it's working without assumptions that will probably break on the next version (since it's an experimental feature). Also Scala Native tests are expensive. If you think we need it I can add it. I just manual tested it in scratch.

I see. As I'm not familiar with Scala Native API, I can't tell whether it is easy, possible ,or useless, but maybe we can add some unit test just comparing the expected with the actual used config?

@lolgab
Copy link
Member Author

lolgab commented Nov 25, 2022

@lefou Added a test that exercises the incremental compilation feature in Scala Native (the scala.ll file is created only if you set nativeIncrementalCompilation = true otherwise the test fails.

@lolgab lolgab requested a review from lefou November 25, 2022 18:48
Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thanks for adding the extra test.

I wonder, whether we want to print a warning message, when a feature is enabled but ignored, because of an unsupported version.

@lefou lefou merged commit 505286b into com-lihaoyi:main Nov 26, 2022
@lefou lefou added this to the 0.10.10 milestone Nov 26, 2022
@lolgab lolgab deleted the native-incremetal-compilation branch November 26, 2022 13:33
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