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

Detect at linktime usage of unsupported features #3472

Conversation

WojciechMazur
Copy link
Contributor

This change allows us to detect usage of unsupported features early at linktime based of linktime-resolved conditions.
Thanks to this feature, we can guard against of runtime failures for some well known execution flows. One of them is running Thread with disabled multithreading support.
By defining scala.scalanative.runtime.UnsupportedFeature as Java file it would never contain NIR. We can collect it's usages and adapt them to present more user friendly messages.

@WojciechMazur
Copy link
Contributor Author

@natsukagami It can be used later to guard against usage of delimited continuations on Windows. It would be great to add 1 more unsupported feature for continuations instead of reusing virtualThreads category.

@WojciechMazur WojciechMazur merged commit 5d81372 into scala-native:main Sep 6, 2023
79 checks passed
@WojciechMazur WojciechMazur deleted the feature/detect-usage-of-unsupported-feature branch September 6, 2023 08:52
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

1 participant