Skip to content

@Builtin_Method shall not be publicly accessible#14944

Open
JaroslavTulach wants to merge 52 commits intodevelopfrom
wip/jtulach/HidingBuiltinMethods6282
Open

@Builtin_Method shall not be publicly accessible#14944
JaroslavTulach wants to merge 52 commits intodevelopfrom
wip/jtulach/HidingBuiltinMethods6282

Conversation

@JaroslavTulach
Copy link
Copy Markdown
Member

@JaroslavTulach JaroslavTulach commented Apr 7, 2026

Pull Request Description

  • will fix Builtin methods shall not be publicly visible #6282
    • hides the differences when invoking @Builtin_Method away from Standard.Base user sights
  • first of all let's emit a warning when @Builtin_Method isn't private
    • the CI fails
    • fix 104 failures by moving the methods into private modules
  • remove autoRegister flag of builtin methods
    • now a builtin method is "just a bridge" between Enso code and Java runtime implementation
    • it will no longer automagically be registered anywhere
    • the method has to be registered somewhere and just the body is replaced by builtin invocation
  • certain builtins need to be inlined
    • Error.throw, Panic.catch needs to keep correct stack trace
    • Debug.eval needs to be inlined for proper surrounding context
    • Function.<| needs to be inlined and invisible in the stack
    • those get an "exception" from the CI check

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • All code follows the
    Scala,
    Java,
  • Unit tests continue to work

@JaroslavTulach JaroslavTulach self-assigned this Apr 7, 2026
@JaroslavTulach JaroslavTulach requested a review from 4e6 as a code owner April 7, 2026 07:30
@JaroslavTulach JaroslavTulach added the CI: No changelog needed Do not require a changelog entry for this PR. label Apr 7, 2026
@JaroslavTulach JaroslavTulach changed the title Emit a warning when a @Builtin_Method isn't private @Builtin_Method shall not be publicly accessible Apr 7, 2026
@JaroslavTulach
Copy link
Copy Markdown
Member Author

JaroslavTulach commented Apr 7, 2026

  • lintEnso nicely fails with all the @Builtin_Method that need to be hidden identified
  • there is 104 of them right now
  • time to hide them!

@JaroslavTulach JaroslavTulach added the CI: Clean build required CI runners will be cleaned before and after this PR is built. label Apr 7, 2026
to_text self -> Text =
'From: ' + self.from_address.to_text
+ '\nTo: ' + (self.to.map .to_text).join '; '
+ '\nTo: ' + ((self.to:Any).map .to_text).join '; '
Copy link
Copy Markdown
Member Author

@JaroslavTulach JaroslavTulach Apr 8, 2026

Choose a reason for hiding this comment

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

@github-actions github-actions bot added -libs-API-change-Base Marks a PR that changes the public API of Standard.Base labels Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

-libs-API-change-Base Marks a PR that changes the public API of Standard.Base CI: Clean build required CI runners will be cleaned before and after this PR is built. CI: No changelog needed Do not require a changelog entry for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Builtin methods shall not be publicly visible

1 participant