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

When generating top-level extern methods check its annotations for link/define #3604

Merged

Conversation

WojciechMazur
Copy link
Contributor

Fixes #3603

Copy link
Member

@armanbilge armanbilge left a comment

Choose a reason for hiding this comment

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

Would we benefit from similar changes in Scala 2? We don't have top-level defs but wouldn't this allow individuals methods to be annotated @extern/@define within an object or package object?

@WojciechMazur
Copy link
Contributor Author

Would we benefit from similar changes in Scala 2? We don't have top-level defs but wouldn't this allow individuals methods to be annotated @extern/@define within an object or package object?

Good idea, I've ported the change to Scala2 compiler plugin

@WojciechMazur WojciechMazur merged commit a724248 into scala-native:main Nov 17, 2023
61 checks passed
@WojciechMazur WojciechMazur deleted the fix/toplevel-extern-annotaitons branch November 17, 2023 10:39
WojciechMazur added a commit that referenced this pull request Jan 17, 2024
…ink`/`define` (#3604)

* When generating top-level extern methods check it's annonations for @link/@define
* Port the change to Scala2 plugin to allow for marking with @link/@define only selected methods

(cherry picked from commit a724248)
WojciechMazur added a commit that referenced this pull request Jan 19, 2024
…ink`/`define` (#3604)

* When generating top-level extern methods check it's annonations for @link/@define
* Port the change to Scala2 plugin to allow for marking with @link/@define only selected methods

(cherry picked from commit a724248)
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.

@link("lib") is ignored with top-level @extern methods
2 participants